Ship propulsion load prediction method, system, equipment and medium under high fluctuation conditions

Through the improved timing convolution network and bidirectional long and short-term memory network combined with attention mechanism, the problem of insufficient prediction accuracy in traditional TCN models under high fluctuation conditions is solved, accurate load prediction and real-time response under high fluctuation conditions is achieved, and the dynamic energy management optimization capability of the ship propulsion system is improved.

CN120317027BActive Publication Date: 2025-08-22SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510796751.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-08-22
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

Traditional timing convolutional networks cannot effectively capture the mutation load characteristics of reverse association under high fluctuations, resulting in insufficient prediction accuracy, and the loss of local details and linear mapping mechanisms in deep networks are difficult to maintain the nonlinear relationship between high-dimensional features and prediction sequences, affecting prediction stability.

Method used

The improved timing convolution network is used to build a bidirectional expansion causal convolution branch, combining the bidirectional long and short-term memory network and attention mechanism unit, through the combination strategy of forward and reverse expansion factor, residual connection module and full connection layer, multi-scale feature extraction, bidirectional dependency analysis and dynamic attention enhancement are achieved, and prediction accuracy and real-time response capabilities are improved.

Benefits of technology

The problems of the lack of reverse correlation, local details and linear mapping non-correlation of the one-way expansion strategy are solved, and the prediction accuracy and real-time response capabilities of the propulsion load under high fluctuation conditions are improved, and the dynamic balance of the ship's power system under the impact of multi-scale loads is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120317027B_ABST
    Figure CN120317027B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of ship propulsion load prediction, and specifically to a method, system, device, and medium for ship propulsion load prediction under highly fluctuating operating conditions, including: obtaining a ship operating parameter sequence under highly fluctuating operating conditions; inputting the ship operating parameter sequence into a pre-trained propulsion load prediction model, and outputting a ship propulsion load prediction sequence at a specified time scale; the propulsion load prediction model includes an improved temporal convolutional network, a bidirectional long short-term memory network, an attention mechanism unit, and a fully connected layer. The present application achieves the coordinated optimization of propulsion load prediction accuracy and real-time response capability under highly fluctuating operating conditions by improving the temporal convolutional network to extract bidirectional multi-scale features, using a bidirectional long short-term memory network to separate forward and backward temporal processing paths to resolve bidirectional dependencies, using an attention mechanism unit to enhance key feature focus using three-stage weight distribution, and using a fully connected layer to implement nonlinear mapping.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of ship propulsion load prediction, and in particular to a method, system, equipment and medium for predicting ship propulsion load under highly fluctuating working conditions. Background Art

[0002] Marine propulsion systems face significant challenges operating in complex marine environments due to high operating conditions. These conditions are often triggered by sudden environmental disturbances coupled with multiple energy systems, resulting in non-stationary, multi-scale, and strongly random propulsion loads. Traditional marine propulsion systems, often designed with control strategies based on steady-state conditions, struggle to adapt to the rapid response demands of highly volatile environments. Accurate load forecasting is urgently needed to optimize dynamic energy management.

[0003] In existing technologies, traditional temporal convolutional networks (TCNs) construct temporal dependencies through dilated causal convolutions. These networks are effective in extracting local load variation characteristics under normal ship operating conditions and are commonly used for ship propulsion load prediction. The TCN model employs a unidirectionally increasing dilation factor expansion strategy, gradually expanding the temporal receptive field by stacking convolutional layers and utilizing residual connections to transfer underlying features. For steady-state load sequences, a single-layer fully connected structure maps convolutional features to a prediction space, demonstrating good prediction performance under typical ship operating conditions.

[0004] However, the traditional TCN model faces three structural defects under high-volatility conditions: first, the incremental expansion strategy of the unidirectional expansion factor can only capture the forward time series pattern and cannot analyze the reverse-related sudden load characteristics; second, the continuously increasing expansion factor in the deep network leads to the loss of local detail information, weakening the ability to capture sudden load peaks; third, the linear mapping mechanism of the single-layer fully connected structure has difficulty maintaining the nonlinear correlation between high-dimensional features and the predicted sequence, affecting the prediction stability under random mutation conditions. Summary of the Invention

[0005] In response to the technical problem that the existing ship propulsion load prediction method using traditional time series convolutional network has insufficient prediction accuracy due to unidirectional dilated convolution, local detail loss and linear mapping defects under highly fluctuating working conditions, the present application provides a ship propulsion load prediction method, system, equipment and medium under highly fluctuating working conditions. By improving the time series convolutional network to extract bidirectional multi-scale features, the bidirectional long short-term memory network separates the forward and backward time series processing paths to parse bidirectional dependencies, the attention mechanism unit adopts three-stage weight distribution to enhance the focus on key features, and the fully connected layer implements nonlinear mapping to form a complete processing chain of multi-scale feature extraction-bidirectional dependency analysis-dynamic attention enhancement-spatial conversion, thereby achieving the coordinated optimization of propulsion load prediction accuracy and real-time response capability under highly fluctuating working conditions.

[0006] In a first aspect, the present application provides a method for predicting propulsion load of a ship under highly fluctuating working conditions, comprising the following steps:

[0007] S1. Obtain a ship operating parameter sequence under highly volatile operating conditions. The ship operating parameter sequence is the time series data of the ship operating parameters within a preset time window. The ship operating parameters include fuel cell output parameters, lithium battery status parameters, propulsion motor operating parameters, and environmental monitoring data.

[0008] S2. Input the ship operation parameter sequence into the pre-trained propulsion load prediction model and output the ship propulsion load prediction sequence at a specified time scale. The propulsion load prediction model includes an improved temporal convolutional network, a bidirectional long short-term memory network, an attention mechanism unit, and a fully connected layer, where:

[0009] The improved time series convolutional network receives the input of the propulsion load forecasting model, generates a forward feature sequence through the forward expansion causal convolution branch, and generates a feature sequence through the reverse expansion causal convolution branch. The residual connection module fuses the forward and reverse feature sequences and compresses the channel dimension, outputting a global feature sequence that integrates multi-scale time series features.

[0010] The bidirectional long short-term memory network receives the feature sequence to extract the temporal features and outputs a bidirectional temporal dependency feature sequence;

[0011] The attention mechanism unit applies a three-stage attention mechanism to the bidirectional temporal dependency feature sequence and outputs an attention-enhanced feature sequence;

[0012] The fully connected layer receives the attention-enhanced feature sequence and performs nonlinear mapping to generate a ship propulsion load prediction sequence at a specified time scale.

[0013] It should be further explained that, in step S1, the fuel cell output parameters include fuel cell output voltage, output current and temperature parameters;

[0014] Lithium battery status parameters include charge and discharge current, state of charge and temperature parameters of the lithium battery;

[0015] Speed, torque and power parameters of the propulsion motor;

[0016] Environmental monitoring data includes wind speed, wind direction, wave height and ship draft.

[0017] It should be further explained that in step S2, the ship operation parameter sequence is first normalized and constructed into an input sequence of continuous time steps, and then input into the improved temporal convolutional network.

[0018] It should be further explained that in the improved temporal convolutional network:

[0019] The forward expansion factor in the causal convolution branch increases exponentially as the number of network layers increases;

[0020] The reverse expansion factor in the causal convolution branch decreases exponentially as the number of network layers increases;

[0021] The residual connection module concatenates the forward feature vector and the reverse feature vector along the channel dimension, then compresses the channel dimension through a one-dimensional convolutional layer and uses the ReLU activation function for nonlinear processing.

[0022] It should be further explained that the number of layers of the improved temporal convolutional network is 5, and the forward expansion factor increases by 1, 2, 4, 8, and 16 as the number of network layers increases, while the reverse expansion factor decreases by 16, 8, 4, 2, and 1 as the number of network layers increases.

[0023] It should be further explained that the bidirectional long short-term memory network includes a forward LSTM layer and a backward LSTM layer set in parallel;

[0024] The forward LSTM layer is a unidirectional network composed of multiple LSTM units in chronological order, which is used to extract the historical state evolution characteristics of the global feature vector;

[0025] The backward LSTM layer is a unidirectional network composed of multiple LSTM units in reverse time sequence, which is used to mine and extract potential future features of the global feature vector.

[0026] It should be further explained that the output function of the bidirectional long short-term memory network is:

[0027]

[0028] Where: represents the hidden layer output of the forward LSTM layer at time t;

[0029] represents the hidden layer output of the backward LSTM layer at time t;

[0030] The weight matrix representing the forward time series features is used to map the forward hidden layer output to the prediction space;

[0031] The weight matrix representing the backward time series features is used to map the backward hidden layer output to the prediction space;

[0032] Represents the bias term of the output layer;

[0033] Represents the activation function.

[0034] It should be further explained that each LSTM unit contains an input gate, a forget gate, and an output gate. The operation process of the LSTM unit is as follows:

[0035]

[0036] in, 、 、 Represent the weight matrices of the input gate, forget gate, and output gate respectively;

[0037] 、 、 Represent the bias items of the input gate, forget gate, and output gate respectively;

[0038] 、 、 Represent the control parameters of the input gate, forget gate, and output gate respectively;

[0039] represents the input vector at time t;

[0040] Represents the hidden layer output vector at time t;

[0041] Represents the hidden layer output vector at the previous moment;

[0042] Represents the sigmoid function;

[0043] represents the tanh function;

[0044] Represents the state candidate vector in the memory process;

[0045] Represents the state candidate bias item in the memory process;

[0046] Represents the updated memory unit.

[0047] It should be further explained that the specific steps of the attention mechanism unit to apply the three-stage attention mechanism to the feature sequence include:

[0048] In the first stage, the feature vector of the current moment in the time-dependent feature sequence is used as the query vector Query, and the feature vector of each historical moment is used as a key vector Key. The cosine similarity between the query vector and each key vector Key is calculated to obtain the initial similarity. The initial similarity of the i-th historical moment is Expressed as:

[0049]

[0050] Where, Represents the feature vector of the i-th historical moment;

[0051] In the second stage, the initial similarity sequence is normalized by the SoftMAX function, and each initial similarity value is constrained to the interval [0,1] to generate the attention distribution weight coefficient. The attention distribution weight coefficient of the i-th historical moment is Expressed as:

[0052]

[0053] Where, Represents the feature vector of the jth historical moment;

[0054] represents the total number of historical moments;

[0055] In the third stage, the feature vector of each historical moment is used as a value vector Value, and each value vector Value is weighted and fused based on the attention distribution weight coefficient to obtain the attention enhancement vector. All attention enhancement vectors are summarized as the attention enhancement feature sequence. The attention enhancement vector of the i-th historical moment is Expressed as:

[0056] .

[0057] It should be further explained that the training steps of the load forecasting model include:

[0058] S201. Perform sliding window sampling on the time series data of historical ship operating parameters and historical actual loads to generate multiple sample pairs of historical ship operating parameter sequences and actual load sequences to form a historical dataset. The historical ship operating parameter sequences are the time series data of historical ship operating parameters within a preset time window, and the actual load sequences are the actual ship propulsion load sequences at a specified time scale after the cutoff time of the corresponding historical ship operating parameter sequences.

[0059] Divide the historical dataset into training set, validation set and test set;

[0060] S202. Initialize the weight matrices of the improved temporal convolutional network and bidirectional long short-term memory network in the propulsion load forecasting model using the Xavier initialization method.

[0061] S203. Use the multi-step mean square error function as the loss function:

[0062]

[0063] Where, represents the actual ship propulsion load value at the k+1th time step in the future of the nth sample pair;

[0064] It represents the predicted value of the ship propulsion load at the k+1th time step in the future in the output of the model for the nth sample pair;

[0065] t represents the predicted starting time of the nth sample pair, that is, the starting time of the actual load sequence in the sample pair;

[0066] N is the total number of sample pairs;

[0067] represents the number of time steps in the specified time scale;

[0068] S204. Input the training set into the propulsion load forecasting model to obtain a predicted load sequence for each sample pair. Minimize the loss function using the Adam optimizer and update the model parameters using error backpropagation.

[0069] An early stopping mechanism is set during training. When the validation set loss does not decrease for five consecutive training cycles, training is terminated and the optimal model parameters are retained.

[0070] S205. Use the test set to evaluate the retained optimal model, calculate the final performance indicators, and save the optimal model as a pre-trained propulsion load forecasting model after confirming that it meets the requirements.

[0071] In a second aspect, the present application provides a ship propulsion load prediction system for highly fluctuating working conditions, which is used to implement the above-mentioned ship propulsion load prediction method, including:

[0072] Data acquisition module, used to obtain ship operating parameter sequences under highly fluctuating conditions;

[0073] The propulsion load prediction module is used to input the ship operation parameter sequence into the pre-trained propulsion load prediction model and output the ship propulsion load prediction sequence at a specified time scale. It includes an improved temporal convolutional network submodule, a bidirectional long short-term memory network submodule, an attention mechanism submodule, and a fully connected prediction submodule;

[0074] Among them, the improved time series convolutional network submodule is used to receive the input of the propulsion load forecasting model through the improved time series convolutional network, generate a forward feature sequence through the forward expansion causal convolution branch, and generate a feature sequence through the reverse expansion causal convolution branch. The residual connection module fuses the forward feature sequence and the reverse feature sequence and compresses the channel dimension, and outputs a global feature sequence that integrates multi-scale time series features.

[0075] The bidirectional long short-term memory network submodule is used to extract temporal features by receiving feature sequences through the bidirectional long short-term memory network and output a bidirectional temporal dependency feature sequence;

[0076] The attention mechanism submodule is used to apply a three-stage attention mechanism to the bidirectional temporal dependency feature sequence through the attention mechanism unit and output an attention-enhanced feature sequence;

[0077] The fully connected prediction submodule is used to receive the attention-enhanced feature sequence through the fully connected layer and perform nonlinear mapping to generate a ship propulsion load prediction sequence of a specified time scale.

[0078] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the steps of the above-mentioned ship propulsion load prediction method when executing the computer program.

[0079] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, which implements the steps of the above-mentioned ship propulsion load prediction method when executed by a processor.

[0080] It can be seen from the above technical solutions that this application has the following advantages:

[0081] 1. This application improves the temporal convolutional network to construct a bidirectional dilation causal convolution branch, adopting a combination strategy of forward exponentially increasing and reverse exponentially decreasing dilation factors to solve the problem of missing reverse correlation in the unidirectional dilation strategy and achieve collaborative analysis of the forward and reverse temporal patterns of the mutation load.

[0082] 2. This application uses a residual connection module to perform channel compression and nonlinear fusion on bidirectional expansion features, reducing the loss of details caused by the increase in the expansion factor of the deep network, solving the problem of insufficient capture of burst peak features, and improving the accuracy of local feature analysis in high-fluctuation ranges.

[0083] 3. This application introduces a nonlinear activation function through a fully connected layer to implement feature space transformation, overcoming the non-correlation defect of the single-layer linear mapping mechanism, solving the instability problem of the prediction sequence under random mutation conditions, and ensuring the dynamic balance capability of the ship power system under multi-scale load shocks.

[0084] 4. This application improves the cascade processing flow of temporal convolutional networks, bidirectional long short-term memory networks, attention mechanism units, and fully connected layers to construct a spatial conversion path from multi-scale feature extraction to dynamic prediction, thereby solving the problem of insufficient hierarchical feature integration in traditional single-module models and achieving a simultaneous improvement in load forecasting accuracy and real-time response capabilities under highly fluctuating working conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for the description. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0086] Figure 1 This is a flow chart of a method for predicting ship propulsion load under highly fluctuating working conditions in one embodiment of the present application.

[0087] Figure 2 This is a structural diagram of an improved temporal convolutional network in one embodiment of the present application.

[0088] Figure 3 It is a structural diagram of a bidirectional long short-term memory network in one embodiment of the present application.

[0089] Figure 4 It is a structural diagram of the attention mechanism unit in one embodiment of the present application.

[0090] Figure 5 It is a prediction error curve for the next 1 minute under ship operating conditions in one embodiment of the present application.

[0091] Figure 6 This is a prediction error curve for the next 3 minutes under ship operating conditions in one embodiment of the present application.

[0092] Figure 7 It is a prediction error curve for the next 5 minutes under ship operating conditions in one embodiment of the present application.

[0093] Figure 8 It is a prediction error curve for the next 1 minute under emergency or port conditions in one embodiment of the present application.

[0094] Figure 9 This is a prediction error curve for the next 3 minutes under emergency or port conditions in one embodiment of the present application.

[0095] Figure 10 It is a prediction error curve for the next 5 minutes under emergency or port conditions in one embodiment of the present application.

[0096] Figure 11 This is a comparative characteristic diagram of prediction errors of various prediction models under high fluctuation conditions in one embodiment of the present application.

[0097] Figure 12 It is a box plot of the prediction error distribution of the ITCN-BiLSTMA model in one embodiment of the present application.

[0098] Figure 13It is a schematic block diagram of a ship propulsion load prediction system for highly fluctuating working conditions in one embodiment of the present application.

[0099] Figure 14 It is a schematic diagram of the hardware structure of an electronic device in one embodiment of the present application. DETAILED DESCRIPTION

[0100] In order to make the application objectives, features, and advantages of this application more obvious and easy to understand, the technical solutions protected by this application will be clearly and completely described below using specific embodiments and drawings. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this patent, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this patent.

[0101] The following describes in detail the ship propulsion load prediction method involved in this application. Specific details, such as specific system structures and technologies, are provided for illustrative purposes, not for limitation, to facilitate a thorough understanding of the embodiments of this application. However, those skilled in the art will appreciate that this application may also be implemented in other embodiments without these specific details.

[0102] In the ship propulsion load prediction method involved in this application, the term "comprising" is used to indicate the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or their combinations. The terms "including," "comprising," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.

[0103] To facilitate the clear description of the technical solutions of this application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or order of execution, and the words "first" and "second" do not necessarily mean different.

[0104] The phrases "one embodiment" or "some embodiments" described in this application mean that the specific features, structures, or characteristics described in the embodiment are included in one or more embodiments of the application. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. that appear in different places in this application do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized.

[0105] The following are some explanations of terms in this plan to facilitate a better understanding of this plan:

[0106] High-fluctuation ship operating conditions: High-fluctuation ship operating conditions refer to conditions during navigation or operation where the ship's state (e.g., significant increases in roll, pitch, and heave amplitudes, and dramatic fluctuations in heading and speed) or key operating parameters (e.g., main engine speed, shafting torque, and hull stress) fluctuate dramatically and frequently due to the complex external environment (e.g., severe sea conditions such as strong winds, huge waves, and rapid currents) or dynamic changes in internal systems (e.g., drastic adjustments in main engine load, large turns, and uneven cargo loading and unloading). Two typical high-fluctuation conditions are ship operating conditions and emergency or port conditions. High-fluctuation conditions pose greater challenges to ship stability and maneuverability, potentially impacting navigation safety, equipment life, and operational efficiency.

[0107] Bidirectional Long Short-Term Memory Network: Bidirectional Long Short-Term Memory (Bi-LSTM) is an extension of the Long Short-Term Memory (LSTM) network. By setting two LSTM layers in opposite directions in the network structure, one propagates forward from the starting position of the input sequence (forward propagation) and the other propagates backward from the end position of the input sequence (backward propagation), the network can simultaneously capture the past (front) and future (back) contextual information in the input sequence, thereby more comprehensively understanding the semantics and dependencies of sequence data. It has been widely used in natural language processing, time series analysis and other fields.

[0108] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0109] The ship propulsion load prediction method provided in the embodiment of the present application is executed by a computer device, and accordingly, the ship propulsion load prediction system for dynamic balance of the ship's center of gravity runs in the computer device.

[0110] Figure 1 This is a flow chart of a method for predicting ship propulsion load under high-fluctuation working conditions according to an embodiment of the present application. Figure 1 The execution subject may be a ship propulsion load prediction system. According to different requirements, the order of the steps in the flowchart may be changed, and some steps may be omitted.

[0111] like Figure 1 As shown in FIG, the ship propulsion load prediction method for this high-fluctuation working condition includes:

[0112] Step S1, obtaining a ship operating parameter sequence under high-fluctuation working conditions. The ship operating parameter sequence is the time series data of the ship operating parameters in a preset time window. The ship operating parameters include fuel cell output parameters, lithium battery status parameters, propulsion motor operating parameters and environmental monitoring data.

[0113] By obtaining the time series data of ship operating parameters within a preset time window, time alignment and continuity constraints of multi-source heterogeneous data can be achieved, the problem of information fragmentation caused by sampling frequency differences can be solved, and a standardized input basis can be provided for the model.

[0114] In some embodiments, the fuel cell output parameters include fuel cell output voltage, output current, and temperature parameters;

[0115] Lithium battery status parameters include charge and discharge current, state of charge and temperature parameters of the lithium battery;

[0116] Speed, torque and power parameters of the propulsion motor;

[0117] Environmental monitoring data includes wind speed, wind direction, wave height and ship draft.

[0118] By constructing a full-chain combination of fuel cells, lithium batteries, propulsion motors and environmental parameters, the synchronous quantitative input of multi-physical field parameters of the energy end, load end and environmental end is achieved, thereby improving the physical completeness and working condition coverage of the model input.

[0119] Step S2: Input the ship operation parameter sequence into the pre-trained propulsion load prediction model and output the ship propulsion load prediction sequence of the specified time scale. The propulsion load prediction model includes an improved time convolutional network (ITCN), a bidirectional long short-term memory network (Bi-LSTM), an attention mechanism unit and a fully connected layer, where:

[0120] The improved time series convolutional network receives the input of the propulsion load forecasting model, generates a forward feature sequence through the forward expansion causal convolution branch, and generates a feature sequence through the reverse expansion causal convolution branch. The residual connection module fuses the forward and reverse feature sequences and compresses the channel dimension, outputting a global feature sequence that integrates multi-scale time series features.

[0121] The bidirectional long short-term memory network receives the feature sequence to extract the temporal features and outputs a bidirectional temporal dependency feature sequence;

[0122] The attention mechanism unit applies a three-stage attention mechanism to the bidirectional temporal dependency feature sequence and outputs an attention-enhanced feature sequence;

[0123] The fully connected layer receives the attention-enhanced feature sequence and performs nonlinear mapping to generate a ship propulsion load prediction sequence at a specified time scale.

[0124] Among them, the exponential increase of the forward expansion factor is used to capture long-term trends, and the exponential decrease of the reverse expansion factor is used to extract short-term mutations. Combined with the channel compression of the residual connection and ReLU fusion, the forward-reverse complementary enhancement of multi-scale time series features is achieved, solving the problem of detail loss in unidirectional convolution.

[0125] By using forward LSTM to extract historical evolution patterns and backward LSTM to mine independent paths of potential future trends and linear weighted fusion, we can achieve decoupling and analysis of explicit temporal dependencies and implicit trends, solving the problem of feature coupling interference in traditional bidirectional networks.

[0126] Through the three-stage processing of cosine similarity calculation, SoftMAX normalization and weighted fusion, dynamic focusing and noise suppression are achieved at key mutation moments, the problem of single-stage attention weight quantization deviation is solved, and the accuracy of feature selection in high-fluctuation intervals is enhanced.

[0127] High-dimensional space mapping is implemented through nonlinear activation functions to achieve adaptive conversion of multi-dimensional features to prediction dimensions, solve the problem of prediction instability caused by linear mapping correlation breakage, and ensure the dynamic smoothness of prediction results under complex working conditions.

[0128] In some specific embodiments, the ship operation parameter sequence is first normalized and constructed into an input sequence of continuous time steps, and then input into the improved temporal convolutional network.

[0129] Through normalization processing and continuous time step construction, the dimensional differences of multi-source data and the problems of time window discontinuity are eliminated, the time synchronization and balanced feature contribution of the model input are ensured, and the training convergence stability is improved.

[0130] In some specific embodiments, in the improved temporal convolutional network:

[0131] The forward expansion factor in the causal convolution branch increases exponentially as the number of network layers increases;

[0132] The reverse expansion factor in the causal convolution branch decreases exponentially as the number of network layers increases;

[0133] The residual connection module concatenates the forward feature vector and the reverse feature vector along the channel dimension, then compresses the channel dimension through a one-dimensional convolutional layer and uses the ReLU activation function for nonlinear processing.

[0134] By configuring exponential expansion factors with positive exponential increase and reverse exponential decrease, cross-scale interaction between shallow fine-grained and deep coarse-grained features is achieved, and the multi-level resolution accuracy of highly fluctuating load peaks is optimized.

[0135] In some specific embodiments, the number of layers of the improved temporal convolutional network is 5, the forward expansion factor increases by 1, 2, 4, 8, and 16 as the number of network layers increases, and the reverse expansion factor decreases by 16, 8, 4, 2, and 1 as the number of network layers increases.

[0136] By limiting the 5-layer network structure and exponential expansion factor changes, we can balance network depth and computational efficiency, avoid the loss of details and surge in computational costs caused by excessive expansion factors, and ensure the feasibility of real-time prediction.

[0137] In some specific embodiments, the bidirectional long short-term memory network includes a forward LSTM layer and a backward LSTM layer arranged in parallel;

[0138] The forward LSTM layer is a unidirectional network composed of multiple LSTM units in chronological order, which is used to extract the historical state evolution characteristics of the global feature vector;

[0139] The backward LSTM layer is a unidirectional network composed of multiple LSTM units in reverse time sequence, which is used to mine and extract potential future features of the global feature vector.

[0140] Through the independent forward and backward LSTM paths and linear weighted fusion, we can achieve controllable decoupling of historical evolution and future trends, enhance the ability to analyze the direction of time-dependent dependencies, and solve the parameter coupling problem of traditional bidirectional networks.

[0141] In some specific embodiments, the output function of the bidirectional long short-term memory network is:

[0142]

[0143] Where: represents the hidden layer output of the forward LSTM layer at time t;

[0144] represents the hidden layer output of the backward LSTM layer at time t;

[0145] The weight matrix representing the forward time series features is used to map the forward hidden layer output to the prediction space;

[0146] The weight matrix representing the backward time series features is used to map the backward hidden layer output to the prediction space;

[0147] Represents the bias term of the output layer;

[0148] Represents the activation function.

[0149] Through the directional projection optimization of the weight matrix of the forward and backward hidden layer outputs, the bidirectional feature contribution is dynamically adjusted to solve the prediction bias problem caused by fixed fusion weights and improve the adaptability of complex time series patterns.

[0150] In some specific embodiments, each LSTM unit includes an input gate, a forget gate, and an output gate. The operation process of the LSTM unit is as follows:

[0151]

[0152] in, 、 、 Represent the weight matrices of the input gate, forget gate, and output gate respectively;

[0153] 、 、 Represent the bias items of the input gate, forget gate, and output gate respectively;

[0154] 、 、 Represent the control parameters of the input gate, forget gate, and output gate respectively;

[0155] represents the input vector at time t;

[0156] Represents the hidden layer output vector at time t;

[0157] Represents the hidden layer output vector at the previous moment;

[0158] Represents the sigmoid function;

[0159] represents the tanh function;

[0160] Represents the state candidate vector in the memory process;

[0161] Represents the state candidate bias item in the memory process;

[0162] Represents the updated memory unit.

[0163] Through the three-stage process of cosine similarity-SoftMAX-weighted fusion, the feature correlation strength and key time step positioning are accurately quantified, the single-stage attention distortion problem is solved, and the effectiveness of features in high-fluctuation intervals is optimized.

[0164] In some specific embodiments, the specific steps of the attention mechanism unit applying the three-stage attention mechanism to the feature sequence include:

[0165] In the first stage, the feature vector of the current moment in the time-dependent feature sequence is used as the query vector Query, and the feature vector of each historical moment is used as a key vector Key. The cosine similarity between the query vector and each key vector Key is calculated to obtain the initial similarity. The initial similarity of the i-th historical moment is Expressed as:

[0166]

[0167] Where, Represents the feature vector of the i-th historical moment;

[0168] In the second stage, the initial similarity sequence is normalized by the SoftMAX function, and each initial similarity value is constrained to the interval [0,1] to generate the attention distribution weight coefficient. The attention distribution weight coefficient of the i-th historical moment is Expressed as:

[0169]

[0170] Where, Represents the feature vector of the jth historical moment;

[0171] represents the total number of historical moments;

[0172] In the third stage, the feature vector of each historical moment is used as a value vector Value, and each value vector Value is weighted and fused based on the attention distribution weight coefficient to obtain the attention enhancement vector. All attention enhancement vectors are summarized as the attention enhancement feature sequence. The attention enhancement vector of the i-th historical moment is Expressed as:

[0173] .

[0174] Through the progressive logic of cosine alignment of query vector and key vector, SoftMAX normalization and value vector fusion, we can avoid the problem of feature misfocus, ensure the consistency of attention weight distribution with physical meaning, and improve the accuracy of causal association.

[0175] In some specific embodiments, the step of training the load forecasting model includes:

[0176] S201. Perform sliding window sampling on the time series data of historical ship operating parameters and historical actual loads to generate multiple sample pairs of historical ship operating parameter sequences and actual load sequences to form a historical dataset. The historical ship operating parameter sequences are the time series data of historical ship operating parameters within a preset time window, and the actual load sequences are the actual ship propulsion load sequences at a specified time scale after the cutoff time of the corresponding historical ship operating parameter sequences.

[0177] Divide the historical dataset into training set, validation set and test set;

[0178] S202. Initialize the weight matrices of the improved temporal convolutional network and bidirectional long short-term memory network in the propulsion load forecasting model using the Xavier initialization method.

[0179] S203. Use the multi-step mean square error function as the loss function:

[0180]

[0181] Where, represents the actual ship propulsion load value at the k+1th time step in the future of the nth sample pair;

[0182] It represents the predicted value of the ship propulsion load at the k+1th time step in the future in the output of the model for the nth sample pair;

[0183] t represents the predicted starting time of the nth sample pair, that is, the starting time of the actual load sequence in the sample pair;

[0184] N is the total number of sample pairs;

[0185] represents the number of time steps in the specified time scale;

[0186] S204. Input the training set into the propulsion load forecasting model to obtain a predicted load sequence for each sample pair. Minimize the loss function using the Adam optimizer and update the model parameters using error backpropagation.

[0187] An early stopping mechanism is set during training. When the validation set loss does not decrease for five consecutive training cycles, training is terminated and the optimal model parameters are retained.

[0188] S205. Use the test set to evaluate the retained optimal model, calculate the final performance indicators, and save the optimal model as a pre-trained propulsion load forecasting model after confirming that it meets the requirements.

[0189] Through multi-step mean square error balanced weighting, Adam adaptive learning rate and early stopping mechanism, we can control gradient stability and overfitting risk, solve the problem of single-step loss error accumulation, and enhance the model's generalization ability and robustness.

[0190] In a specific embodiment, the method for predicting propulsion load of a ship under high fluctuation conditions includes the following steps:

[0191] Step S1, obtaining a ship operating parameter sequence under a high-fluctuation operating condition, where the ship operating parameter sequence is time series data of the ship operating parameters in a preset time window, and the ship operating parameters include fuel cell output parameters, lithium battery status parameters, propulsion motor operating parameters, and environmental monitoring data;

[0192] The fuel cell output parameters include fuel cell output voltage, output current and temperature parameters;

[0193] Lithium battery status parameters include charge and discharge current, state of charge and temperature parameters of the lithium battery;

[0194] Speed, torque and power parameters of the propulsion motor;

[0195] Environmental monitoring data includes wind speed, wind direction, wave height and ship draft.

[0196] In step S2, the ship operation parameter sequence is first normalized and constructed into an input sequence of continuous time steps, and then the pre-trained propulsion load prediction model is input to output the ship propulsion load prediction sequence of the specified time scale. The propulsion load prediction model includes an improved temporal convolutional network, a bidirectional long short-term memory network, an attention mechanism unit, and a fully connected layer, wherein:

[0197] Figure 2 This is a schematic diagram of the structure of the improved temporal convolutional network in this embodiment. Figure 2 As shown in the figure, the improved time series convolutional network receives the input of the propulsion load forecasting model, generates a forward feature sequence through the forward expansion causal convolution branch, and generates a feature sequence through the reverse expansion causal convolution branch. The residual connection module fuses the forward feature sequence and the reverse feature sequence and compresses the channel dimension, and outputs a global feature sequence that integrates multi-scale time series features.

[0198] The forward expansion factor in the causal convolution branch increases exponentially as the number of network layers increases;

[0199] The reverse expansion factor in the causal convolution branch decreases exponentially as the number of network layers increases;

[0200] The residual connection module concatenates the forward feature vector and the reverse feature vector along the channel dimension, then compresses the channel dimension through a one-dimensional convolutional layer and uses the ReLU activation function for nonlinear processing.

[0201] The bidirectional long short-term memory network receives the feature sequence to extract the temporal features and outputs a bidirectional temporal dependency feature sequence.

[0202] Figure 3 is a schematic diagram of the structure of the bidirectional long short-term memory network in this embodiment, as shown in FIG. Figure 3 As shown in Figure 2, the bidirectional long short-term memory network contains a forward LSTM layer and a backward LSTM layer set in parallel;

[0203] The forward LSTM layer is a unidirectional network composed of multiple LSTM units in chronological order, which is used to extract the historical state evolution characteristics of the global feature vector;

[0204] The backward LSTM layer is a unidirectional network composed of multiple LSTM units in reverse time order, which is used to mine and extract potential future features of the global feature vector;

[0205] The output function of the bidirectional long short-term memory network is:

[0206]

[0207] Where: represents the hidden layer output of the forward LSTM layer at time t;

[0208] represents the hidden layer output of the backward LSTM layer at time t;

[0209] The weight matrix representing the forward time series features is used to map the forward hidden layer output to the prediction space;

[0210] The weight matrix representing the backward time series features is used to map the backward hidden layer output to the prediction space;

[0211] Represents the bias term of the output layer;

[0212] represents the activation function;

[0213] Each LSTM unit contains an input gate, a forget gate, and an output gate. The operation process of the LSTM unit is as follows:

[0214]

[0215] in, 、 、 Represent the weight matrices of the input gate, forget gate, and output gate respectively;

[0216] 、 、 Represent the bias items of the input gate, forget gate, and output gate respectively;

[0217] 、 、 Represent the control parameters of the input gate, forget gate, and output gate respectively;

[0218] represents the input vector at time t;

[0219] Represents the hidden layer output vector at time t;

[0220] Represents the hidden layer output vector at the previous moment;

[0221] Represents the sigmoid function;

[0222] represents the tanh function;

[0223] Represents the state candidate vector in the memory process;

[0224] Represents the state candidate bias item in the memory process;

[0225] Represents the updated memory unit.

[0226] Figure 4 This is a schematic diagram of the structure of the attention mechanism unit in this embodiment. Figure 4 As shown, the attention mechanism unit applies a three-stage attention mechanism to the bidirectional temporal dependency feature sequence and outputs an attention-enhanced feature sequence, including;

[0227] In the first stage, the feature vector of the current moment in the time-dependent feature sequence is used as the query vector Query, and the feature vector of each historical moment is used as a key vector Key. The cosine similarity between the query vector and each key vector Key is calculated to obtain the initial similarity. The initial similarity of the i-th historical moment is Expressed as:

[0228]

[0229] Where, Represents the feature vector of the i-th historical moment;

[0230] In the second stage, the initial similarity sequence is normalized by the SoftMAX function, and each initial similarity value is constrained to the interval [0,1] to generate the attention distribution weight coefficient. The attention distribution weight coefficient of the i-th historical moment is Expressed as:

[0231]

[0232] Where, Represents the feature vector of the jth historical moment;

[0233] represents the total number of historical moments;

[0234] In the third stage, the feature vector of each historical moment is used as a value vector Value, and each value vector Value is weighted and fused based on the attention distribution weight coefficient to obtain the attention enhancement vector. All attention enhancement vectors are summarized as the attention enhancement feature sequence. The attention enhancement vector of the i-th historical moment is Expressed as:

[0235] .

[0236] The fully connected layer receives the attention-enhanced feature sequence and performs nonlinear mapping to generate a ship propulsion load prediction sequence at a specified time scale.

[0237] The training steps for the load forecasting model include:

[0238] S201. Perform sliding window sampling on the time series data of historical ship operating parameters and historical actual loads to generate multiple sample pairs of historical ship operating parameter sequences and actual load sequences to form a historical dataset. The historical ship operating parameter sequences are the time series data of historical ship operating parameters within a preset time window, and the actual load sequences are the actual ship propulsion load sequences at a specified time scale after the cutoff time of the corresponding historical ship operating parameter sequences.

[0239] Divide the historical dataset into training set, validation set and test set;

[0240] S202. Initialize the weight matrices of the improved temporal convolutional network and bidirectional long short-term memory network in the propulsion load forecasting model using the Xavier initialization method.

[0241] S203. Use the multi-step mean square error function as the loss function:

[0242]

[0243] Where, represents the actual ship propulsion load value at the k+1th time step in the future of the nth sample pair;

[0244] It represents the predicted value of the ship propulsion load at the k+1th time step in the future in the output of the model for the nth sample pair;

[0245] t represents the predicted starting time of the nth sample pair, that is, the starting time of the actual load sequence in the sample pair;

[0246] N is the total number of sample pairs;

[0247] represents the number of time steps in the specified time scale;

[0248] S204. Input the training set into the propulsion load forecasting model to obtain a predicted load sequence for each sample pair. Minimize the loss function using the Adam optimizer and update the model parameters using error backpropagation.

[0249] An early stopping mechanism is set during training. When the validation set loss does not decrease for five consecutive training cycles, training is terminated and the optimal model parameters are retained.

[0250] S205. Use the test set to evaluate the retained optimal model, calculate the final performance indicators, and save the optimal model as a pre-trained propulsion load forecasting model after confirming that it meets the requirements.

[0251] Since the propulsion load forecasting model of this embodiment uses an improved temporal convolutional network (ITCN), a bidirectional long short-term memory network (Bi-LSTM), and an attention mechanism (MA), the propulsion load forecasting model of this embodiment is referred to as an ITCN-BiLSTMA model.

[0252] The ITCN-BiLSTMA model in this example includes the following core parameter configurations:

[0253] Improved temporal convolutional network: manually edit the number of network layers to 5, set the number of filters to 128, the size to 2, and increase and decrease the forward / reverse dilation factors by 1 / 2 / 4 / 8 / 16 respectively;

[0254] Bidirectional long short-term memory network: built with the Keras library, with a 4-hidden layer structure determined by grid search, and the number of nodes set to 32 / 64 / 1238 / 256;

[0255] Attention mechanism unit: the input dimension is adaptively adjusted, and the attention space dimension is fixed at 32;

[0256] Fully connected layer: The number of layers is set to 1, and a total of 128 nodes are configured.

[0257] The ITCN-BiLSTMA model of this embodiment is used together with eight comparative models for simulation analysis and comparative experiments. The experimental environment is based on the Python 3.7 platform, built with the TensorFlow 1.13.1, Keras 2.24, and Scikit-learn 0.23.2 libraries, and the hardware adopts a 64-bit system with an Intel Core i5-123400F processor (2.5 GHz) and 16 GB of memory.

[0258] The prediction model, training parameter settings, training time, loading and prediction time used in the simulation analysis and comparative experiments are shown in Table 1.

[0259] Table 1 Simulation analysis and comparative experimental model training information

[0260]

[0261] Among them, TCN-BiLSTM is a deep learning model that combines the advantages of temporal convolutional network (TCN) and bidirectional long short-term memory network (BiLSTM).

[0262] During the simulation analysis and comparative experiments, the ship operation data of two highly fluctuating working conditions, namely ship operating conditions and emergency or port conditions, were input into each prediction model respectively, with the specified time scales of 1 minute, 3 minutes and 5 minutes, to generate a ship propulsion load prediction sequence of the specified time scale.

[0263] Multi-dimensional error indicators are used to comprehensively evaluate the prediction results of each prediction model: the mean absolute error (MAE) reflects the average deviation between the predicted value and the actual value; the root mean square error (RMSE) represents the standard deviation of the residual distribution; the mean absolute percentage error (MAPE) measures the relative error level. The specific formula is as follows:

[0264]

[0265] Where n represents the number of samples, and Represent the actual value and predicted value of the i-th data respectively.

[0266] Various evaluation metrics reveal model performance characteristics from a multidimensional perspective: Mean Absolute Error (MAE) quantifies forecast accuracy using the mean residual error. While its numerical value is intuitive, it depends on the order of magnitude of the data, lacks a universal evaluation benchmark, and is difficult to accurately measure forecast accuracy. MAPE, expressed as a percentage, better reflects the relative error between actual and predicted data, but can distort results when the actual value is low. Root Mean Square Error (RMSE), the square root of the residual standard deviation, measures the magnitude of the forecast error, but is sensitive to extreme or outliers, limiting its stability. Each of these metrics has distinct advantages and disadvantages. A comprehensive, multidimensional evaluation system overcomes the inherent shortcomings of a single metric and ensures a systematic and scientific evaluation of model performance.

[0267] Based on the ship propulsion load prediction series output by the ITCN-BiLSTMA model of this embodiment and the actual ship propulsion load series of the corresponding time scale, the prediction error curves under two high-fluctuation working conditions are drawn, as shown in Figure 2. Figures 5-10 shown.

[0268] in, Figure 5 It is the prediction error curve for the next 1 minute under ship operation conditions;

[0269] Figure 6 It is the prediction error curve for the next 3 minutes under ship operation conditions;

[0270] Figure 7 It is the prediction error curve for the next 5 minutes under ship operation conditions;

[0271] Figure 8 It is the prediction error curve for the next 1 minute under emergency or port conditions;

[0272] Figure 9 It is the prediction error curve for the next 3 minutes under emergency or port conditions;

[0273] Figure 10 It is the prediction error curve for the next 5 minutes under emergency or port conditions.

[0274] The evaluation indicators of the prediction results of each model under ship operating conditions are shown in Table 2:

[0275] Table 2 Evaluation index table under ship operating conditions

[0276]

[0277] From Table 2 and Figure 5-Figure 7As can be seen, due to the severe load fluctuations (large peak-to-valley differences and rapid curve changes) and strong randomness of ship operating conditions, the MAE values ​​of traditional models generally increase by 13.5%-25.5%. The ITCN-BiLSTMA model of this embodiment achieves 19.8% MAE, 28.5% RMSE, and 17.5% MAPE error reductions compared to the convolutional long short-term memory network in a one-minute forecast. It also achieves a further 11.5%-22.1% reduction in error compared to the TCN-BiLSTM model, demonstrating the synergistic optimization effect of bidirectional dilated convolution and attention gating mechanisms for complex operating conditions.

[0278] The evaluation indicators of the prediction results of each model under emergency or port conditions are shown in Table 2:

[0279] Table 3 Evaluation index table under emergency or port conditions

[0280]

[0281] From Table 3 and Figures 8-10 It can be seen that emergency or port conditions place more stringent requirements on the prediction model due to the surge in the frequency of propulsion load mutations, the increase in numerical inflection points, and the strengthening of irregular characteristics. Under these conditions, the ITCN-BiLSTMA model of this embodiment still maintains controllable errors: the MAE of the convolutional long short-term memory network is reduced by 28.4%, 32.3%, and 33.2% under three time spans, further achieving an error reduction of 18.7%, 21.1%, and 22.9% compared to the TCN-BiLSTM model. Compared with the operating conditions, the three evaluation indicators of the ITCN-BiLSTMA model of this embodiment increased by 6%, 10.7%, and 13.4% respectively at a scale of 1 minute.

[0282] From the experimental results of the two high-fluctuation working conditions, it can be seen that under the high-fluctuation working condition, the ITCN-BiLSTMA of this embodiment leads the second-best TCN-BiLSTM model with an average advantage of 15.8%, followed by the convolutional long short-term memory network, the temporal convolutional network, the long short-term memory network, the recurrent neural network, the deep belief network, the support vector regression model, the autoregressive moving average model and the linear regression model, which confirms that the ITCN-BiLSTMA model proposed in this embodiment has higher prediction accuracy and robustness advantages in complex navigation scenarios, and is more suitable for the complex environmental conditions faced by all-electric ships in actual navigation.

[0283] The prediction error comparison characteristic diagram of each prediction model under high fluctuation conditions is as follows Figure 11 shown. Figure 11A violin plot simultaneously presents the statistical summary and distribution: a white dot and a blue line mark the mean error, thick black vertical lines define the upper and lower quartiles, and whiskers indicate the extreme error range. The width of the violin corresponds to the vertical axis scale, reflecting the density of the data distribution—the wider the violin corresponding to a given error value, the greater the cumulative amount of data in that interval.

[0284] from Figure 11 It can be seen that the ITCN-BiLSTMA model of this embodiment maintains optimal concentration characteristics, with the central region of its violin plot [-20, 20] being significantly wider than the two sides, reflecting the characteristics of dense error distribution. In comparison, the error distribution of the TCN-BiLSTM model is significantly wider than that of conventional operating conditions, with the main distribution band extending to the range [-50, 40]. The remaining models all show obvious distributional deviations: the long short-term memory network error shows a negative offset characteristic, the deep belief network error shows a clear positive clustering trend, and the linear regression model exhibits strong discrete characteristics, with extreme values ​​exceeding ±150kW. Comprehensive analysis shows that by optimizing the time series feature extraction mechanism, the ITCN-BiLSTMA maintains a minimum core error band even in a strong interference environment, verifying its engineering applicability to fluctuating interference.

[0285] In order to fully verify the effectiveness of the ITCN-BiLSTMA model, this embodiment also statistically analyzes the error distribution of the model under different scale predictions. The prediction error distribution box plot of the ITCN-BiLSTMA model is shown in the figure below. Figure 12 As shown. Figure 12 It can be seen that the ITCN-BiLSTMA model exhibits a bidirectional diffusion pattern in its prediction error as the step length increases under highly volatile operating conditions. Affected by the frequent changes in highly volatile operating conditions, the model's error extremes significantly increase and the distribution dispersion increases: during the first prediction step, the error extremes exceed ±40kW, but the core error still converges to the [-20, 20]kW range; by the 10th prediction step, the extreme value boundaries expand to ±80kW, and the main distribution band widens to the [-40, 40]kW range. The statistical line shows that although the median and mean intermittently deviate due to the randomness of the operating conditions, they remain anchored near the zero scale line overall, indicating that the model maintains basic stability under complex operating conditions, and its error expansion rate is significantly lower than the increase level of traditional models under similar operating conditions.

[0286] Through the above experimental results and comparisons of prediction accuracy and error distribution, we can draw the following conclusions:

[0287] The ITCN-BiLSTMA model of this application shows significant performance advantages in the highly fluctuating operating conditions of ships. Its prediction accuracy comprehensively surpasses that of comparative models such as TCN-BiLSTM, and its robustness advantage is outstanding, making it more suitable for the highly fluctuating operating conditions of all-electric ships.

[0288] The following is an embodiment of a ship propulsion load prediction system for highly fluctuating working conditions provided in an embodiment of the present application. The ship propulsion load prediction system for highly fluctuating working conditions and the ship propulsion load prediction methods of the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the ship propulsion load prediction system, please refer to the embodiment of the above-mentioned ship propulsion load prediction method for highly fluctuating working conditions.

[0289] like Figure 13 As shown in Figure 1, the ship propulsion load prediction system for high-fluctuation conditions includes:

[0290] Data acquisition module, used to obtain ship operating parameter sequences under highly fluctuating conditions;

[0291] The propulsion load prediction module is used to input the ship operation parameter sequence into the pre-trained propulsion load prediction model and output the ship propulsion load prediction sequence at a specified time scale. It includes an improved temporal convolutional network submodule, a bidirectional long short-term memory network submodule, an attention mechanism submodule, and a fully connected prediction submodule;

[0292] Among them, the improved time series convolutional network submodule is used to receive the input of the propulsion load forecasting model through the improved time series convolutional network, generate a forward feature sequence through the forward expansion causal convolution branch, and generate a feature sequence through the reverse expansion causal convolution branch. The residual connection module fuses the forward feature sequence and the reverse feature sequence and compresses the channel dimension, and outputs a global feature sequence that integrates multi-scale time series features.

[0293] The bidirectional long short-term memory network submodule is used to extract temporal features by receiving feature sequences through the bidirectional long short-term memory network and output a bidirectional temporal dependency feature sequence;

[0294] The attention mechanism submodule is used to apply a three-stage attention mechanism to the bidirectional temporal dependency feature sequence through the attention mechanism unit and output an attention-enhanced feature sequence;

[0295] The fully connected prediction submodule is used to receive the attention-enhanced feature sequence through the fully connected layer and perform nonlinear mapping to generate a ship propulsion load prediction sequence of a specified time scale.

[0296] The ship propulsion load prediction system of this embodiment is used to implement a ship propulsion load prediction method for highly fluctuating working conditions.

[0297] This application also provides an electronic device for implementing each embodiment of this application. Figure 14 A hardware structure diagram of an electronic device for implementing various embodiments of the present application is shown in FIG. Figure 14 As shown, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0298] Those skilled in the art will understand that the electronic device structure involved in the embodiments of the present application does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0299] In the embodiments of the present application, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or claimed herein.

[0300] In the embodiment of the present application, the processor can be implemented by using at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to perform the functions described herein. In some cases, such an embodiment can be implemented in a controller. For software implementation, an embodiment such as a process or function can be implemented with a separate software module that allows the execution of at least one function or operation. The software code can be implemented by a software application (or program) written in any appropriate programming language, and the software code can be stored in a memory and executed by a controller.

[0301] In addition, the electronic device includes some functional modules not shown, which will not be described here.

[0302] Those skilled in the art will appreciate that various aspects of the electronic device provided herein may be implemented as a system, method, or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."

[0303] The present application also provides a storage medium storing a program product for a method for predicting ship propulsion loads that achieves dynamic balancing of the ship's center of gravity. In some possible implementations, various aspects of the present application may also be implemented in the form of a program product comprising program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to execute the steps described in the "Exemplary Methods" section above according to various exemplary implementations of the present application.

[0304] The storage medium can be any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0305] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for predicting ship propulsion load under high-fluctuation conditions, characterized in that: include: S1. Obtain a ship operating parameter sequence under highly volatile operating conditions. The ship operating parameter sequence is the time series data of the ship operating parameters within a preset time window. The ship operating parameters include fuel cell output parameters, lithium battery status parameters, propulsion motor operating parameters, and environmental monitoring data. S2. Input the ship operation parameter sequence into the pre-trained propulsion load prediction model and output the ship propulsion load prediction sequence at a specified time scale. The propulsion load prediction model includes an improved temporal convolutional network, a bidirectional long short-term memory network, an attention mechanism unit, and a fully connected layer, where: The improved time series convolutional network receives the input of the propulsion load forecasting model, generates a forward feature sequence through the forward expansion causal convolution branch, and generates a feature sequence through the reverse expansion causal convolution branch. The residual connection module fuses the forward and reverse feature sequences and compresses the channel dimension, outputting a global feature sequence that integrates multi-scale time series features. The bidirectional long short-term memory network receives the feature sequence to extract the temporal features and outputs a bidirectional temporal dependency feature sequence; The attention mechanism unit applies a three-stage attention mechanism to the bidirectional temporal dependency feature sequence and outputs an attention-enhanced feature sequence; The fully connected layer receives the attention-enhanced feature sequence and performs nonlinear mapping to generate a ship propulsion load prediction sequence at a specified time scale.

2. The ship propulsion load prediction method according to claim 1, characterized in that: In step S1, the fuel cell output parameters include fuel cell output voltage, output current and temperature parameters; Lithium battery status parameters include charge and discharge current, state of charge and temperature parameters of the lithium battery; Speed, torque and power parameters of the propulsion motor; Environmental monitoring data includes wind speed, wind direction, wave height and ship draft.

3. The ship propulsion load prediction method according to claim 1, wherein: In the improved temporal convolutional network: The forward expansion factor in the causal convolution branch increases exponentially as the number of network layers increases; The reverse expansion factor in the causal convolution branch decreases exponentially as the number of network layers increases; The residual connection module concatenates the forward feature vector and the reverse feature vector along the channel dimension, then compresses the channel dimension through a one-dimensional convolutional layer and uses the ReLU activation function for nonlinear processing.

4. The ship propulsion load prediction method according to claim 1, wherein: The bidirectional long short-term memory network includes a forward LSTM layer and a backward LSTM layer arranged in parallel; The forward LSTM layer is a unidirectional network composed of multiple LSTM units in chronological order, which is used to extract the historical state evolution characteristics of the global feature vector; The backward LSTM layer is a unidirectional network composed of multiple LSTM units in reverse time sequence, which is used to mine and extract potential future features of the global feature vector.

5. The ship propulsion load prediction method according to claim 1, wherein: The output function of the bidirectional long short-term memory network is: Where: represents the hidden layer output of the forward LSTM layer at time t; represents the hidden layer output of the backward LSTM layer at time t; The weight matrix representing the forward time series features is used to map the forward hidden layer output to the prediction space; The weight matrix representing the backward time series features is used to map the backward hidden layer output to the prediction space; Represents the bias term of the output layer; Represents the activation function.

6. The ship propulsion load prediction method according to claim 1, characterized in that: The specific steps of the attention mechanism unit applying the three-stage attention mechanism to the feature sequence include: In the first stage, the feature vector of the current moment in the time-dependent feature sequence is used as the query vector Query, and the feature vector of each historical moment is used as a key vector Key. The cosine similarity between the query vector and each key vector Key is calculated to obtain the initial similarity. The initial similarity of the i-th historical moment is Expressed as: Where, Represents the feature vector of the i-th historical moment; In the second stage, the initial similarity sequence is normalized by the SoftMAX function, and each initial similarity value is constrained to the interval [0,1] to generate the attention distribution weight coefficient. The attention distribution weight coefficient of the i-th historical moment is Expressed as: Where, Represents the feature vector of the jth historical moment; represents the total number of historical moments; In the third stage, the feature vector of each historical moment is used as a value vector Value, and each value vector Value is weighted and fused based on the attention distribution weight coefficient to obtain the attention enhancement vector. All attention enhancement vectors are summarized as the attention enhancement feature sequence. The attention enhancement vector of the i-th historical moment is Expressed as: 。 7. The ship propulsion load prediction method according to claim 1, wherein: The training steps of the propulsion load prediction model include: S201. Perform sliding window sampling on the time series data of historical ship operating parameters and historical actual loads to generate multiple sample pairs of historical ship operating parameter sequences and actual load sequences to form a historical dataset. The historical ship operating parameter sequences are the time series data of historical ship operating parameters within a preset time window, and the actual load sequences are the actual ship propulsion load sequences at a specified time scale after the cutoff time of the corresponding historical ship operating parameter sequences. Divide the historical dataset into training set, validation set and test set; S202. Initialize the weight matrices of the improved temporal convolutional network and bidirectional long short-term memory network in the propulsion load forecasting model; S203. Use the multi-step mean square error function as the loss function: Where, represents the actual ship propulsion load value at the k+1th time step in the future of the nth sample pair; It represents the predicted value of the ship propulsion load at the k+1th time step in the future in the output of the model for the nth sample pair; t represents the predicted starting time of the nth sample pair, that is, the starting time of the actual load sequence in the sample pair; N is the total number of sample pairs; represents the number of time steps in the specified time scale; S204. Input the training set into the propulsion load forecasting model to obtain a predicted load sequence for each sample pair. Minimize the loss function using the Adam optimizer and update the model parameters using error backpropagation. An early stopping mechanism is set during training. When the validation set loss does not decrease for five consecutive training cycles, training is terminated and the optimal model parameters are retained. S205. Use the test set to evaluate the retained optimal model, calculate the final performance indicators, and save the optimal model as a pre-trained propulsion load forecasting model after confirming that it meets the requirements.

8. A ship propulsion load prediction system for highly fluctuating working conditions, characterized in that: A method for predicting ship propulsion load according to any one of claims 1 to 7, comprising: Data acquisition module, used to obtain ship operating parameter sequences under highly fluctuating conditions; The propulsion load prediction module is used to input the ship operation parameter sequence into the pre-trained propulsion load prediction model and output the ship propulsion load prediction sequence at a specified time scale. It includes an improved temporal convolutional network submodule, a bidirectional long short-term memory network submodule, an attention mechanism submodule, and a fully connected prediction submodule; Among them, the improved time series convolutional network submodule is used to receive the input of the propulsion load forecasting model through the improved time series convolutional network, generate a forward feature sequence through the forward expansion causal convolution branch, and generate a feature sequence through the reverse expansion causal convolution branch. The residual connection module fuses the forward feature sequence and the reverse feature sequence and compresses the channel dimension, and outputs a global feature sequence that integrates multi-scale time series features. The bidirectional long short-term memory network submodule is used to extract temporal features by receiving feature sequences through the bidirectional long short-term memory network and output a bidirectional temporal dependency feature sequence; The attention mechanism submodule is used to apply a three-stage attention mechanism to the bidirectional temporal dependency feature sequence through the attention mechanism unit and output an attention-enhanced feature sequence; The fully connected prediction submodule is used to receive the attention-enhanced feature sequence through the fully connected layer and perform nonlinear mapping to generate a ship propulsion load prediction sequence of a specified time scale.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the steps of the ship propulsion load prediction method according to any one of claims 1 to 7 when executing the computer program.

10. A storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the ship propulsion load prediction method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Ship control motion forecasting method based on self-attention bidirectional long short-term memory network

    CN117634661A

  • Short-term load prediction method and system for ship electric propulsion system

    CN119091524A