A ship fuel consumption prediction method and system based on working condition gated expert model
Patent Information
- Application Number
- CN202610711659.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2046-05-22
AI Technical Summary
然而,船舶实际营运环境具有显著动态性,不同海况与航速组合形成的运行工况下,输入变量与油耗的映射关系存在明显差异
[0014]Compared with existing technologies, the present invention, employing the above technical solution, has the following advantages: The present invention provides a ship fuel consumption prediction method and system based on a condition-gated expert model. After acquiring ship operation monitoring data including input features and corresponding fuel consumption values, it constructs sea state levels based on environmental disturbance features and speed gears based on speed, combining these to generate joint operating condition labels. Furthermore, it constructs a condition-gated expert model including an expert regression branch, an operating condition identification branch, and a mapping relationship between operating conditions and experts. It inputs speed and environmental disturbance features into the operating condition identification branch, outputting probability distributions belonging to each joint operating condition. It inputs input features from the ship operation monitoring data into the expert regression branch, outputting multiple expert prediction results. Based on the mapping relationship between operating conditions and experts, the probability distributions are converted into fusion weights to weightedly fuse multiple expert prediction results, generating a predicted ship fuel consumption value. The present invention enhances the model's adaptability to different operating conditions within a unified prediction framework by driving expert weight allocation through operating condition information.
Smart Images

Figure CN122276097B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship energy efficiency management technology, and in particular to a method and system for predicting ship fuel consumption based on a condition-gated expert model. Background Technology
[0002] Ship fuel consumption prediction is a crucial foundation for ship energy efficiency management and operational decision-making. Accurate and reliable predictions help optimize speed, reduce energy consumption, and lower emissions. Existing data-driven methods typically establish mapping relationships between factors such as speed, draft, wind, waves, and current, and fuel consumption based on ship operation monitoring data. However, the actual operating environment of ships is significantly dynamic, and the mapping relationship between input variables and fuel consumption varies significantly under different sea state and speed combinations. Current methods mainly fall into two categories: one uses a globally unified model with the overall average error as the optimization objective, which is easy to fit common operating conditions in the sample set but struggles to fully characterize the specificities under complex and unfavorable operating conditions; the other models separate models for each operating condition, which, while improving local adaptability, easily leads to insufficient subsamples, limited cross-condition information sharing, and prediction instability at the operating condition boundaries. Summary of the Invention
[0003] In view of this, the purpose of this invention is to propose a ship fuel consumption prediction method and system based on a condition-gated expert model. By introducing the structured operating conditions and adaptively adjusting the fusion weights of multiple experts, the invention achieves a balance between global information sharing and the characterization of operating condition differences.
[0004] To achieve the aforementioned technical objectives, in a first aspect, the technical solution adopted by the present invention is: a ship fuel consumption prediction method based on a condition-gated expert model, comprising: Acquire ship operation monitoring data, which includes input features and corresponding fuel consumption values. The input features include at least speed and environmental disturbance features. Sea state levels are constructed based on environmental disturbance characteristics, speed levels are constructed based on speed, and sea state levels and speed levels are combined to generate joint operating condition labels. Construct a working condition gating expert model, which includes an expert regression branch, a working condition identification branch, and a mapping relationship between working conditions and experts; Based on input features, joint operating condition labels and corresponding fuel consumption values, the operating condition gating expert model is trained. Input the speed and environmental disturbance characteristics in the ship operation monitoring data into the operating condition identification branch, and output the probability distribution of the ship operation monitoring data belonging to each joint operating condition; Input features from ship operation monitoring data are fed into the expert regression branch, and multiple expert prediction results are output. Based on the mapping relationship between working conditions and experts, the probability distribution is converted into the fusion weights corresponding to the prediction results of each expert; Based on the fusion weights, the predictions from multiple experts are weighted, fused, and normalized to generate predicted ship fuel consumption values.
[0005] In some embodiments, a sea state level is constructed based on environmental disturbance characteristics, a speed range is constructed based on speed, and the sea state level and speed range are combined to generate a joint operating condition label, including: The environmental disturbance characteristics are obtained, including wind speed, relative wind direction, flow velocity and relative flow direction, and the environmental disturbance characteristics are standardized. The K-Means clustering algorithm is used to cluster the standardized environmental disturbance features to obtain initial clusters. The clusters are then sorted according to the average wind speed level corresponding to each initial cluster to generate sea state level labels. Based on the empirical distribution of speed, the equal frequency binning method is used to determine the quantile points between low and high speeds. According to the quantile points, the speed is divided into low speed, medium speed and high speed, and speed tags are generated. The sea state level label and the speed gear label are combined and encoded to generate a mutually exclusive joint operating condition label, which is used to characterize the combined state of external disturbance intensity and propulsion load level.
[0006] In some embodiments, constructing a condition-gated expert model includes: An expert regression branch is constructed, which uses the TabM network as the basic regressor and generates multiple expert prediction results in parallel through an integration mechanism of parameter sharing. A working condition identification branch is constructed, which uses the GateNet network as a gating network. The gating network determines the working condition based on the input speed and environmental disturbance characteristics, and outputs a continuous probability distribution of the sample belonging to each joint operating condition. The continuous probability distribution is used to characterize the soft belonging degree of the sample among different joint operating conditions. The mapping relationship between operating conditions and experts is constructed. The mapping relationship between operating conditions and experts is a predefined fixed mapping matrix. Each joint operating condition in the fixed mapping matrix corresponds to a set of continuous expert channels. The continuous probability distribution output by the gated network is converted into the fusion weights corresponding to each expert channel through the fixed mapping matrix. By integrating the expert regression branch, the working condition identification branch, and the mapping relationship between working conditions and experts, a working condition gating expert model is obtained.
[0007] In some embodiments, the speed and environmental disturbance characteristics in the ship operation monitoring data are input to the operating condition identification branch, and the probability distribution of the ship operation monitoring data belonging to each joint operating condition is output, including: The ship's speed, wind speed, relative wind direction, current speed, and relative current direction are extracted from ship operation monitoring data and combined to form the input features for operating condition discrimination. The working condition discrimination input features are input into the GateNet network in the working condition recognition branch. The GateNet network sequentially performs multi-level linear transformation and non-linear activation function processing on the working condition discrimination input features, and extracts the deep representation related to working condition discrimination in the working condition discrimination input features through layer-by-layer non-linear mapping. The deep representation is input into the Softmax classification layer at the end of the GateNet network. The Softmax classification layer performs normalized exponential mapping on the deep representation and outputs a probability vector with a dimension equal to the number of joint operating condition categories. The elements of the probability vector correspond to the continuous probability values of the joint operating conditions, and the sum of all continuous probability values is 1. The probability vector is determined as the probability distribution of ship operation monitoring data belonging to various joint operation conditions and output.
[0008] In some embodiments, the operating condition discrimination input features are input into the GateNet network in the operating condition recognition branch. The GateNet network sequentially performs alternating processing of the operating condition discrimination input features with multi-level linear transformations and non-linear activation functions, extracting deep representations related to operating condition discrimination from the operating condition discrimination input features through layer-by-layer non-linear mapping, including: The GateNet network consists of multiple gated hidden layers stacked sequentially, each of which contains a linear transformation unit and a gated activation unit; The working condition discrimination input features are input into the first-layer gated hidden layer. The linear transformation unit in the first-layer gated hidden layer performs linear mapping on the working condition discrimination input features to generate the first linear transformation result. The gated activation unit in the first-layer gated hidden layer performs gated nonlinear activation on the first linear transformation result to generate the first gated hidden representation. The first gated hidden representation is input to the next gated hidden layer. The linear transformation unit in the gated hidden layer performs a linear mapping on the first gated hidden representation to generate a second linear transformation result. The gated activation unit in the gated hidden layer performs gated nonlinear activation on the second linear transformation result to generate a second gated hidden representation. Repeat the above process until all gated hiding layers have been processed, and the gated hiding representation output by the last gated hiding layer is obtained as the deep representation.
[0009] In some embodiments, input features from ship operation monitoring data are fed into an expert regression branch, outputting multiple expert prediction results, including: The input features from the ship operation monitoring data are fed into the TabM network in the expert regression branch. The TabM network adopts a structure of a shared bottom layer network and multiple expert head networks. The shared bottom layer network extracts features from the input features layer by layer through an integration mechanism of parameter sharing. It is processed by alternating layers of linear transformation and nonlinear activation functions to extract shared feature representations that reflect common patterns from the input features. The shared feature representations are distributed to multiple expert head networks. Each expert head network contains independent fully connected layer parameters. Based on the received shared feature representations, each expert head network performs independent regression mapping calculations in parallel using its own fully connected layer parameters, and generates candidate fuel consumption prediction values. By aggregating all the candidate fuel consumption predictions generated by the expert head network, multiple expert prediction results are obtained.
[0010] In some embodiments, based on the mapping relationship between working conditions and experts, the probability distribution is converted into fusion weights corresponding to the prediction results of each expert, including: Obtain a predefined fixed mapping matrix. The number of rows in the fixed mapping matrix is equal to the number of categories of joint operation conditions. The number of columns in the fixed mapping matrix is equal to the total number of expert prediction results. Each row in the fixed mapping matrix corresponds to a joint operation condition. The continuous expert channel positions corresponding to the joint operation condition in that row are filled with 1, and the other positions are filled with 0. Obtain the continuous probability distribution output by the working condition identification branch. The continuous probability distribution is a probability vector with a dimension equal to the number of joint operating condition categories. Perform matrix multiplication on the probability vector and the fixed mapping matrix to obtain a weight vector with a dimension equal to the total number of expert prediction results. The elements of the weight vector correspond to the fusion weights of the expert prediction results.
[0011] In some embodiments, a matrix multiplication operation is performed between the probability vector and a fixed mapping matrix to obtain a weight vector with a dimension equal to the total number of expert prediction results, including: The probability vector is viewed as a row vector, with the dimension of the probability vector being 1 row multiplied by the number of joint operating condition categories. The dimension of the fixed mapping matrix is defined as the number of rows of joint operating condition categories multiplied by the total number of columns of expert prediction results; Perform a row vector and matrix multiplication operation on the probability vector and the fixed mapping matrix. In the multiplication operation, each element of the probability vector is multiplied by all elements of the corresponding row of the fixed mapping matrix and then summed to generate the projection value of the probability vector on each column of the fixed mapping matrix. Arrange the projected values in each column sequentially to obtain a weight vector with a dimension of 1 row multiplied by the total number of expert prediction results. Each column position of the weight vector corresponds to an expert prediction result, and the value of the weight vector at that column position is the fusion weight corresponding to that expert prediction result.
[0012] In some embodiments, the prediction results of multiple experts are weighted and fused according to fusion weights to generate a predicted ship fuel consumption value, including: Obtain the multi-channel expert prediction vector output by the expert regression branch. The elements of the multi-channel expert prediction vector correspond to the candidate fuel consumption prediction values of the expert channels. Obtain the weight vector obtained by transforming the working condition and expert mapping relationship. The elements of the weight vector correspond to the fusion weights of the candidate fuel consumption prediction values of the expert channel. The multi-channel expert prediction vector and the weight vector are multiplied element by element to obtain the weighted prediction value of the expert channel. The weighted predicted values are summed to obtain a scalar value; After normalizing the scalar value based on the sum of each fusion weight, it is determined as the ship fuel consumption prediction value corresponding to the ship operation monitoring data, and the ship fuel consumption prediction value is output.
[0013] In a second aspect, the present invention also provides a ship fuel consumption prediction system based on a gated expert model for operating conditions, applicable to the method described in the first aspect. The system includes a data acquisition module, an operating condition construction module, a model construction module, an operating condition identification module, an expert regression module, a weight transformation module, and a prediction generation module. The data acquisition module acquires ship operation monitoring data, which includes input features and corresponding fuel consumption values. The input features include at least speed and environmental disturbance features. The operating condition construction module constructs sea state levels based on environmental disturbance features, constructs speed gears based on speed, and combines sea state levels and speed gears to generate a joint operating condition label. The model construction module constructs a gated expert model for operating conditions. The expert model, a condition-gated expert model, includes an expert regression branch, a condition identification branch, and a mapping relationship between conditions and experts. The condition identification module inputs the speed and environmental disturbance features from the ship operation monitoring data into the condition identification branch and outputs the probability distribution of the ship operation monitoring data belonging to each joint operation condition. The expert regression module inputs the input features from the ship operation monitoring data into the expert regression branch and outputs multiple expert prediction results. The weight transformation module converts the probability distribution into the fusion weights corresponding to each expert prediction result based on the mapping relationship between conditions and experts. The prediction generation module performs weighted fusion and normalization processing on multiple expert prediction results according to the fusion weights to generate ship fuel consumption prediction values.
[0014] Compared with existing technologies, the present invention, employing the above technical solution, has the following advantages: The present invention provides a ship fuel consumption prediction method and system based on a condition-gated expert model. After acquiring ship operation monitoring data including input features and corresponding fuel consumption values, it constructs sea state levels based on environmental disturbance features and speed gears based on speed, combining these to generate joint operating condition labels. Furthermore, it constructs a condition-gated expert model including an expert regression branch, an operating condition identification branch, and a mapping relationship between operating conditions and experts. It inputs speed and environmental disturbance features into the operating condition identification branch, outputting probability distributions belonging to each joint operating condition. It inputs input features from the ship operation monitoring data into the expert regression branch, outputting multiple expert prediction results. Based on the mapping relationship between operating conditions and experts, the probability distributions are converted into fusion weights to weightedly fuse multiple expert prediction results, generating a predicted ship fuel consumption value. The present invention enhances the model's adaptability to different operating conditions within a unified prediction framework by driving expert weight allocation through operating condition information. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of the ship fuel consumption prediction method based on a condition-gated expert model as described in the specific implementation method. Figure 2 This is a flowchart of the joint training process of the working condition gating expert model described in the specific implementation method. Detailed Implementation
[0017] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Please see Figures 1 to 2 In a first aspect, this embodiment provides a method for predicting ship fuel consumption based on a condition-gated expert model, including: Acquire ship operation monitoring data, which includes input features and corresponding fuel consumption values. Input features include at least speed and environmental disturbance features. Construct sea state levels based on environmental disturbance features, construct speed gears based on speed, and combine sea state levels and speed gears to generate joint operating condition labels. Construct a working condition gating expert model, which includes an expert regression branch, a working condition identification branch, and a mapping relationship between working conditions and experts; Based on input features, joint operating condition labels and corresponding fuel consumption values, the operating condition gating expert model is trained. Input the speed and environmental disturbance characteristics in the ship operation monitoring data into the operating condition identification branch, and output the probability distribution of the ship operation monitoring data belonging to each joint operating condition; Input features from ship operation monitoring data are fed into the expert regression branch, and multiple expert prediction results are output. Based on the mapping relationship between working conditions and experts, the probability distribution is converted into the fusion weights corresponding to the prediction results of each expert; Based on the fusion weights, the prediction results of multiple experts are weighted, fused, and normalized to generate the ship fuel consumption prediction value, which is expressed by formula (1) as follows: ; In formula (1), For the first The predicted ship fuel consumption value corresponding to each ship operation monitoring data point. The total number of expert predictions. For the first The first ship operation monitoring data corresponding to the first j The fusion weights of the expert prediction results For the first The first ship operation monitoring data corresponding to the first j According to expert predictions, This is a preset numerical stability term.
[0019] In this embodiment, the ship operation monitoring data comes from conventional data acquisition equipment such as the ship's engine room monitoring system or navigation data recorder. It comprises at least the ship's speed (characterizing its motion), environmental disturbance characteristics resulting from the combined forces exerted on the hull by environmental factors such as wind and current, and fuel consumption (serving as the monitoring target for the prediction task). This data provides the initial input for subsequent differential modeling based on operating conditions.
[0020] Sea state levels are obtained by discretizing and classifying environmental disturbance characteristics, quantifying the intensity of continuously changing external disturbances into a finite number of levels. Speed gears are discretized based on speed distribution to classify the ship's propulsion load levels. Joint operating condition labels are generated by combining sea state levels and speed gears, with each label uniquely corresponding to a specific combination of external disturbance intensity and propulsion load level. This abstracts complex and variable operating conditions into a discretized prior space with engineering significance.
[0021] The operating condition gating expert model incorporates the aforementioned joint operating condition information into the prediction architecture in a structured manner. Specifically, the expert regression branch consists of multiple parallel regression predictors, designed to learn from the input data and output diverse candidate fuel consumption predictions; the operating condition identification branch performs soft discrimination on the degree of belonging of samples to different joint operating conditions based on the input speed and environmental disturbance characteristics; and the operating condition-expert mapping relationship, as a predefined fixed rule, establishes a deterministic bridge between the probability distribution at the operating condition level and the weight distribution at the expert level.
[0022] The input to the operating condition identification branch is the speed and environmental disturbance features extracted from ship operation monitoring data. The output probability vector of this branch has the same dimension as the number of joint operating condition categories. Each element in the vector represents the continuous probability of a sample belonging to the corresponding operating condition, and the sum of all elements is 1. This soft allocation method ensures that the probability can smoothly transition near the operating condition boundary, avoiding the abrupt changes in prediction caused by rigid classification.
[0023] The expert regression branch, through its internal parallel architecture, has multiple regression predictors operating independently and simultaneously, each generating a candidate fuel consumption prediction value, which together constitute a multi-channel expert prediction result. These results characterize the mapping relationship between input and fuel consumption from different subspaces, providing a wealth of candidate hypotheses for subsequent fusion.
[0024] The probability distribution output by the operating condition identification branch is projected and transformed using a fixed rule governing the mapping relationship between operating conditions and experts. This process redistributes and combines the probability values corresponding to each joint operating condition with the fusion weights corresponding to each expert prediction result. This step enables operating condition information to accurately drive the contribution allocation of the corresponding expert groups.
[0025] The final predicted ship fuel consumption is obtained by weighted averaging of multiple expert predictions. Specifically, each expert prediction is multiplied by its corresponding fusion weight, summed, and then divided by the sum of all weights. A pre-defined numerical stabilization term is introduced during the calculation to prevent division by zero anomalies, and a scalar value is finally output. This mechanism ensures that the expert prediction that best matches the current sample operating conditions dominates the final output, achieving an adaptive response to complex operating conditions.
[0026] This embodiment uses joint operating conditions as structured priors, performs soft discrimination through an operating condition identification branch, and then transforms them into expert fusion weights through a fixed mapping relationship, ultimately completing weighted fusion prediction within a unified framework. This scheme preserves the ability to share global data information while enhancing the ability to characterize differences between different operating conditions. It effectively alleviates problems such as the difficulty of adapting traditional global models to local operating conditions, insufficient information utilization in sub-operating condition models, and unstable boundary predictions, thus improving the model's predictive robustness under complex and adverse operating conditions.
[0027] In some embodiments, a sea state level is constructed based on environmental disturbance characteristics, a speed range is constructed based on speed, and the sea state level and speed range are combined to generate a joint operating condition label, including: The environmental disturbance characteristics are obtained, including wind speed, relative wind direction, flow velocity and relative flow direction, and the environmental disturbance characteristics are standardized. The K-Means clustering algorithm is used to cluster the standardized environmental disturbance features to obtain initial clusters. The clusters are then sorted according to the average wind speed level corresponding to each initial cluster to generate sea state level labels. Based on the empirical distribution of speed, the equal frequency binning method is used to determine the quantile points between low and high speeds. According to the quantile points, the speed is divided into low speed, medium speed and high speed, and speed tags are generated. The sea state level label and the speed gear label are combined and encoded to generate a mutually exclusive joint operating condition label, which is used to characterize the combined state of external disturbance intensity and propulsion load level.
[0028] In this embodiment, the environmental disturbance features, including wind speed, relative wind direction, current speed, and relative current direction, can be traced back to shipboard anemometers, current meters, or sensor networks integrated via navigation data recorders. Standardization is performed using a Z-score transformation based on the training dataset, whereby the mean and standard deviation of each feature dimension are calculated, and then centered and scaled accordingly to ensure that features of different dimensions contribute equally to subsequent clustering analysis.
[0029] The K-Means clustering algorithm takes a standardized four-dimensional environmental disturbance feature vector as input. The algorithm iteratively calculates the Euclidean distance between samples and cluster centers and updates the cluster centers until convergence. The value of the cluster number K needs to consider both the discriminative power of the operating conditions and the sample support capability; in this embodiment, 3 is preferred to correspond to the low, medium, and high disturbance levels. Since the initial cluster numbers output by K-Means only represent the grouping index after algorithm convergence and do not have a physical order, the average wind speed value of all samples within each initial cluster is calculated, and the clusters are sorted from smallest to largest based on this value, thereby assigning each cluster a sea state level label with the meaning of "increasing disturbance intensity".
[0030] The construction of speed ranges relies on the empirical distribution of speed. The specific implementation of the equal-frequency binning method is as follows: All speed values in the training set are arranged in ascending order, and the speed values at the 1 / 3 and 2 / 3 positions are determined as quantiles. Based on these two quantiles, the continuous speed value range is divided into three intervals, corresponding to low-speed, medium-speed, and high-speed ranges, respectively. This binning strategy ensures that the number of samples within each range is approximately equal, effectively avoiding the problem of sparse samples in high and low speed regions caused by speed clustering in commonly used intervals.
[0031] The combined encoding of sea state level labels and speed gear labels is achieved through Cartesian product, forming a two-dimensional operating condition grid. Each grid cell corresponds to a unique mutually exclusive code; for example, when sea state is 3 and speed is 3, nine codes can be generated. This joint operating condition label does not presuppose any fuel consumption mechanism assumptions, but only performs joint discretization representation of the operating state from two dimensions: external disturbances and propulsion load, providing a structured prior reference for subsequent models.
[0032] This embodiment clarifies the complete generation process of joint operation condition labels: environmental disturbance characteristics are standardized and then automatically classified into sea state levels through clustering; speed is classified into gears based on empirical distribution through equal-frequency binning; the combination of these two forms a discrete operation condition space with engineering interpretability. This process provides a well-structured and balanced prior knowledge foundation for the operation condition gating expert model, which is a prerequisite for subsequent operation condition constraint prediction.
[0033] In some embodiments, constructing a condition-gated expert model includes: An expert regression branch is constructed, which uses the TabM network as the basic regressor and generates multiple expert prediction results in parallel through an integration mechanism of parameter sharing. A working condition identification branch is constructed, which uses the GateNet network as a gating network. The gating network determines the working condition based on the input speed and environmental disturbance characteristics, and outputs a continuous probability distribution of the sample belonging to each joint operating condition. The continuous probability distribution is used to characterize the soft belonging degree of the sample among different joint operating conditions. The mapping relationship between operating conditions and experts is constructed. The mapping relationship between operating conditions and experts is a predefined fixed mapping matrix. Each joint operating condition in the fixed mapping matrix corresponds to a set of continuous expert channels. The mapping relationship between operating conditions and experts is expressed by formula (2) as follows: ; In formula (2), For a fixed mapping matrix, The fixed mapping matrix is OK A real matrix of columns, The number of categories for joint operation conditions, For the fixed mapping matrix, the first... Line 1 The element of the column, the first The row corresponds to the first Joint operation mode, the first Column corresponding to the first According to expert predictions, For the first The set of expert channel indexes corresponding to the joint operation mode, when the first The expert belongs to the first When the expert group is in charge of the joint operation mode, ,at this time ,otherwise The continuous probability distribution output by the gated network is converted into the fusion weights corresponding to each expert channel through a fixed mapping matrix, which is expressed by formula (3) as follows: ; In formula (3), For the first Each ship operation monitoring data point corresponds to an expert weight vector, and the number of elements in the expert weight vector equals the total number of expert prediction results. , its first The element is the first The fusion weights corresponding to the expert prediction results; For the first The probability vector corresponding to each ship operation monitoring data point has the number of elements equal to the number of categories of the joint operating conditions. , its first The element is the ship operation monitoring data belonging to the first... Continuous probability values for joint operating conditions; By integrating the expert regression branch, the working condition identification branch, and the mapping relationship between working conditions and experts, a working condition gating expert model is obtained. Furthermore, the working condition gating expert model is jointly trained, and the objective function of the joint training is expressed by formula (5) as follows: ; In formula (5), The total loss during joint training; For regression loss under operating condition constraints; The first weighting coefficient for the regression loss under operating condition constraints; For global anchoring loss; This is the second weighting coefficient for the global anchoring loss; To control losses for diversity; The third weighting coefficient for diversity control loss; Losses due to monitoring of operating conditions; This is the fourth weighting coefficient for the loss of operating condition monitoring.
[0034] In this embodiment, the TabM network used in the expert regression branch consists of a shared bottom backbone network and multiple parallel expert head networks. The shared backbone network is responsible for extracting a general feature representation from the input features, while each expert head network independently performs regression mapping based on this shared representation, each outputting a candidate fuel consumption prediction value. The total number of expert prediction results is obtained by multiplying the number of joint operating condition categories by the number of experts configured for each category. For example, when there are 9 operating condition categories and 3 experts configured for each category, the total number of experts is 27. This parameter-sharing integration mechanism, compared to independently training multiple complete models, can significantly reduce the number of parameters and promote the learning of common patterns among different experts.
[0035] The GateNet network used in the operational condition identification branch has its input limited to airspeed and environmental disturbance features, and its output is a probability vector with a dimension equal to the number of joint operational condition categories. This gated network extracts information relevant to operational condition discrimination from the input features through internal multi-layer nonlinear transformations, and maps the output to a continuous probability distribution satisfying normalization conditions through a normalized exponential function in the final layer. This soft allocation method allows for a smooth transition of probabilities near operational condition boundaries, thus avoiding abrupt prediction changes caused by hard switching of operational conditions. The training of the gated network relies on operational condition supervision loss, which compares the gated output with the true joint operational condition labels to guide it in learning the correct operational condition discrimination boundaries.
[0036] The mapping relationship between operating conditions and experts is implemented through a predefined fixed mapping matrix. The number of rows in this matrix equals the number of joint operating condition categories, and the number of columns equals the total number of expert prediction results. Each row in the matrix corresponds to a joint operating condition, and the element at the index position of the consecutive expert channel corresponding to that condition in that row is set to 1, while the rest are set to 0. This sparse, non-learning mapping method ensures that the fusion process strictly follows the predefined operating condition organization structure, i.e., each expert serves only one specific operating condition group, and each operating condition group contains multiple consecutive experts to provide finer-grained representation capabilities. After performing a matrix multiplication operation between the probability vector output by the operating condition identification branch and this fixed mapping matrix, an expert weight vector with a dimension equal to the total number of experts is obtained, where each element corresponds to the fusion weight of an expert prediction result.
[0037] Integrating the above three components forms a complete operating condition gating expert model. The forward propagation path of this model is as follows: ship operation monitoring data is simultaneously input into the expert regression branch and the operating condition identification branch. The expert regression branch outputs multi-channel expert prediction results, and the operating condition identification branch outputs the operating condition probability distribution. The operating condition probability distribution is projected through a fixed mapping matrix to obtain the expert weight vector. Finally, the expert weight vector is used to weight and fuse the multi-channel expert prediction results to output the ship fuel consumption prediction value.
[0038] Preferably, the joint training of the operating condition gating expert model has an objective function consisting of a weighted sum of four losses. The operating condition constraint regression loss measures the deviation between the weighted fusion predicted value and the actual fuel consumption value; its gradient is backpropagated to the expert regression branch through the weights, giving experts more consistent with the current operating condition a greater weight in parameter updates. The global anchoring loss maintains the model's ability to characterize the overall sample distribution by constraining the mean of all expert output predictions, preventing the model from being overly biased towards local operating conditions. The diversity control loss constrains the dispersion of expert output predictions, causing them to fluctuate around a preset target variance, thus maintaining a moderate balance between convergence and disordered dispersion of expert outputs. The operating condition supervision loss measures the difference between the probability distribution output by the gating network and the actual joint operating condition label through cross-entropy, and is used to supervise the learning of the operating condition identification branch. The weight coefficients of each loss are determined through hyperparameter search to balance the impact of different training objectives on the final model performance.
[0039] This embodiment defines the structural composition, data flow path, and joint training mechanism of the working condition gating expert model. Through TabM's parameter-sharing multi-expert structure, GateNet's soft-discrimination of working conditions, and the structured association of a fixed mapping matrix, it realizes the introduction, transmission, and utilization of working condition information within a unified framework. The multi-task joint training objective ensures that the model can effectively learn the differentiated mapping relationships under different working conditions while maintaining global predictive ability. End-to-end collaborative optimization of the working condition identification branch and the expert regression branch is achieved through the collaborative constraints of multiple loss terms.
[0040] In some embodiments, the speed and environmental disturbance characteristics in the ship operation monitoring data are input to the operating condition identification branch, and the probability distribution of the ship operation monitoring data belonging to each joint operating condition is output, including: The ship's speed, wind speed, relative wind direction, current speed, and relative current direction are extracted from ship operation monitoring data and combined to form the input features for operating condition discrimination. The working condition discrimination input features are input into the GateNet network in the working condition recognition branch. The GateNet network sequentially performs multi-level linear transformation and non-linear activation function processing on the working condition discrimination input features, and extracts the deep representation related to working condition discrimination in the working condition discrimination input features through layer-by-layer non-linear mapping. The deep representation is input into the Softmax classification layer at the end of the GateNet network. The Softmax classification layer performs normalized exponential mapping on the deep representation and outputs a probability vector with a dimension equal to the number of joint operating condition categories. The probability vector is expressed by formula (4) as follows: ; In formula (4), For the first The deep representation vector corresponding to each ship operation monitoring data point has the number of elements equal to the number of categories of joint operating conditions. The elements of the probability vector correspond to the continuous probability values of the joint operation condition, and the sum of all continuous probability values is 1. The probability vector is determined as the probability distribution of ship operation monitoring data belonging to various joint operation conditions and output.
[0041] In this embodiment, ship speed, wind speed, relative wind direction, current speed, and relative current direction respectively characterize the ship's propulsion load level and the intensity of external environmental disturbances, and are the core factors determining the operating conditions. When extracting these variables from ship operation monitoring data, the corresponding values are obtained through data indexing or field mapping, and concatenated in a preset order into a fixed-dimensional feature vector, which serves as the dedicated input to the gating network.
[0042] The GateNet network processes the input features for operating condition discrimination by stacking multiple alternating linear transformation layers and nonlinear activation layers. Each linear transformation layer maps the input features to a new feature space through a learnable weight matrix. Subsequently, a nonlinear activation function introduces nonlinear transformation capabilities, enabling the network to fit complex operating condition decision boundaries. Through layer-by-layer mapping, the original low-dimensional operating condition features are gradually abstracted into a deep representation highly correlated with operating condition discrimination. This representation contains the relative attribution information of samples under different joint operating conditions.
[0043] The Softmax classification layer calculates the natural exponent for each element in the deep representation vector and then divides it by the sum of all element exponents, thereby compressing the output of any real number field into a probability vector with values between 0 and 1, and a sum of all components equal to 1. The dimension of this probability vector is equal to the number of joint operating condition categories, and each component corresponds to a continuous probability value of the sample belonging to that category of operating condition.
[0044] The probability vector output by the Softmax classification layer is determined as the probability distribution of ship operation monitoring data belonging to various joint operating conditions, and is output as the final result of the operating condition identification branch. This probability distribution is a continuous soft assignment result, which can reflect the fuzzy belonging status of samples in the operating condition space, and is especially suitable for transitional samples near the operating condition boundary.
[0045] This embodiment extracts ship speed, wind speed, relative wind direction, current speed, and relative current direction from ship operation monitoring data to form the input features for operational condition discrimination. Deep representations are extracted through multi-layer nonlinear transformations of the GateNet network, and then a normalized operational condition probability distribution is output through a Softmax classification layer. This process closely links the input data with the operational condition discrimination task, achieving a mapping from original features to operational condition probabilities through an end-to-end neural network structure. This provides a continuous and differentiable input foundation for subsequent expert weight allocation under operational condition constraints.
[0046] In some embodiments, the operating condition discrimination input features are input into the GateNet network in the operating condition recognition branch. The GateNet network sequentially performs alternating processing of the operating condition discrimination input features with multi-level linear transformations and non-linear activation functions, extracting deep representations related to operating condition discrimination from the operating condition discrimination input features through layer-by-layer non-linear mapping, including: The GateNet network consists of multiple gated hidden layers stacked sequentially, each of which contains a linear transformation unit and a gated activation unit; The working condition discrimination input features are input into the first-layer gated hidden layer. The linear transformation unit in the first-layer gated hidden layer performs linear mapping on the working condition discrimination input features to generate the first linear transformation result. The gated activation unit in the first-layer gated hidden layer performs gated nonlinear activation on the first linear transformation result to generate the first gated hidden representation. The first gated hidden representation is input to the next gated hidden layer. The linear transformation unit in the gated hidden layer performs a linear mapping on the first gated hidden representation to generate a second linear transformation result. The gated activation unit in the gated hidden layer performs gated nonlinear activation on the second linear transformation result to generate a second gated hidden representation. Repeat the above process until all gated hiding layers have been processed, and the gated hiding representation output by the last gated hiding layer is obtained as the deep representation.
[0047] In this embodiment, the internal implementation of the gated activation unit differs from that of a conventional fixed nonlinear activation function. It processes the input data through two parallel computational paths: one path generates candidate feature representations via the Tanh function, and the other path generates a gating signal with a value between 0 and 1 via the Sigmoid function. The two signals are then multiplied element-wise to obtain the unit's output. This structure allows the gated activation unit to adaptively adjust the proportion of feature information passed to the next layer based on the characteristics of the input data, thereby achieving fine-grained control of the information flow. The number of gated hidden layers, as a network hyperparameter, is optimized through performance testing on a validation set, typically between two and four layers.
[0048] The learnable parameters within a linear transformation unit include a weight matrix and a bias vector. The dimension of the weight matrix is determined by both the input and output feature dimensions of that layer. The output feature dimension is the number of neurons in that gated hidden layer, and each layer can be set independently. These parameters are updated and optimized during joint model training using the backpropagation algorithm. The input dimension of the first linear transformation unit is determined by the dimension of the condition-discriminating input features, while the input dimension of subsequent layers is determined by the number of neurons in the previous gated hidden layer.
[0049] The output of each gated hidden layer, i.e., the gated hidden representation, has a dimension equal to the number of neurons in that layer. The first gated hidden representation, as the result of the initial layer processing, carries the feature information after preliminary gating transformation and is passed to the next layer for further abstraction. Each subsequent gated hidden layer repeats the linear transformation and gating activation process, but each layer independently maintains its own weight parameters, thereby progressively refining the features at different levels of abstraction.
[0050] After processing through all gated hidden layers, the gated hidden representation output by the last layer is the deep representation. The dimension of this deep representation is determined by the number of neurons in the last gated hidden layer, and its numerical distribution reflects the network's criteria for classifying the current sample's working condition. It is directly fed into the Softmax classification layer to generate the final working condition probability distribution. Throughout the process, the parameters of all gated hidden layers are jointly optimized using the gradient of the working condition supervision loss.
[0051] This embodiment introduces a gated activation unit, enabling the GateNet network to adaptively filter feature information. The gating mechanism allows the network to dynamically adjust the contribution weights of features in each dimension during the learning process. Compared to traditional multilayer perceptrons that use fixed activation functions, it can more flexibly capture key patterns in work condition discrimination, thereby improving the accuracy and robustness of work condition identification.
[0052] In some embodiments, input features from ship operation monitoring data are fed into an expert regression branch, outputting multiple expert prediction results, including: The input features from the ship operation monitoring data are fed into the TabM network in the expert regression branch. The TabM network adopts a structure of a shared bottom layer network and multiple expert head networks. The shared bottom layer network extracts features from the input features layer by layer through an integration mechanism of parameter sharing. It is processed by alternating layers of linear transformation and nonlinear activation functions to extract shared feature representations that reflect common patterns from the input features. The shared feature representations are distributed to multiple expert head networks. Each expert head network contains independent fully connected layer parameters. Based on the received shared feature representations, each expert head network performs independent regression mapping calculations in parallel using its own fully connected layer parameters, and generates candidate fuel consumption prediction values. By aggregating all the candidate fuel consumption predictions generated by the expert head network, multiple expert prediction results are obtained.
[0053] In this embodiment, the depth and width of the shared underlying network are used as network hyperparameters, and their specific values are determined through grid search or random search of the model performance on the validation set. The nonlinear activation function applied after each linear transformation layer uses a modified linear unit and its variants to introduce nonlinear transformation capability and alleviate the gradient vanishing problem. Input features from ship operation monitoring data are used as input; each dimension of these features undergoes standardization based on training set statistics before being fed into the network to ensure that each feature has a similar scale in the initial stage of the network.
[0054] The shared underlying network progressively maps the original input to a high-dimensional feature space through alternating linear transformations and nonlinear activations layer by layer. The shared feature representation output after the final transformation layer has a dimension determined by the number of neurons in that layer, typically set to several hundred dimensions to retain sufficient expressive power. This shared feature representation is copied and distributed to all expert head networks. Each expert head network receives exactly the same feature content, but subsequent processing is independent for each network.
[0055] Within each expert head network, the fully connected layers have a weight matrix whose dimension is determined by both the dimension of the shared feature representation and the output dimension. The output dimension is set to a single neuron to generate a scalar prediction. The parameters of the fully connected layers in each expert head network are initialized using different random seeds to break symmetry at the start of training, prompting different experts to evolve in different prediction directions. These parameters are differentially updated during joint training using the gradients of the working-conditional regression loss and the global anchoring loss.
[0056] After all the expert head networks complete their respective fully connected layer computations in parallel, each outputs a scalar-form candidate fuel consumption prediction value. These candidate values are arranged according to the fixed index order of the expert head networks and concatenated into a one-dimensional vector, thus obtaining multiple expert prediction results. Each element in this vector corresponds to the prediction output of an expert channel, and its numerical distribution reflects the different judgments of different experts on the fuel consumption of the current sample.
[0057] This embodiment achieves parameter-efficient multi-expert prediction by employing a shared underlying network and multiple independent expert head networks. The shared underlying network learns general feature representations from all training data, while each expert head network learns differentiated regression maps based on independent parameters. This approach balances the extraction of common patterns and personalized prediction expressions within a unified framework, providing diverse candidate prediction sources for subsequent weighted fusion based on operating conditions.
[0058] In some embodiments, based on the mapping relationship between working conditions and experts, the probability distribution is converted into fusion weights corresponding to the prediction results of each expert, including: Obtain a predefined fixed mapping matrix. The number of rows in the fixed mapping matrix is equal to the number of categories of joint operation conditions. The number of columns in the fixed mapping matrix is equal to the total number of expert prediction results. Each row in the fixed mapping matrix corresponds to a joint operation condition. The continuous expert channel positions corresponding to the joint operation condition in that row are filled with 1, and the other positions are filled with 0. Obtain the continuous probability distribution output by the working condition identification branch. The continuous probability distribution is a probability vector with a dimension equal to the number of joint operating condition categories. Perform matrix multiplication on the probability vector and the fixed mapping matrix to obtain a weight vector with a dimension equal to the total number of expert prediction results. The elements of the weight vector correspond to the fusion weights of the expert prediction results.
[0059] In this embodiment, the construction of the fixed mapping matrix occurs during the model initialization phase. The number of rows is determined by the number of categories of joint operating conditions, and the number of columns is determined by the total number of expert prediction results. The range of consecutive expert channel indices filled with the value 1 in each row of the matrix is determined by the number of experts configured for each type of joint operating condition. This configuration number is set as a model hyperparameter before training. The number of experts configured for all operating condition categories remains consistent to ensure fairness in the allocation of expert resources among each operating condition group.
[0060] The continuous probability distribution output by the operating condition identification branch reflects the soft attribution degree of the current sample in each joint operating condition. This probability vector is not subjected to any additional normalization or thresholding before being fed into the weight transformation step, in order to preserve the boundary transition information contained in the original output of the Softmax classification layer.
[0061] When performing matrix multiplication on a probability vector and a fixed mapping matrix, the probability vector is multiplied as a row vector. Due to the sparse binary structure of the fixed mapping matrix, the computational complexity of this multiplication operation is low. Its physical meaning can be understood as broadcasting and distributing the probability value of each working condition component in the probability vector to the corresponding continuous expert channels according to the distribution pattern of the non-zero elements in that row of the fixed mapping matrix.
[0062] The elements in the weight vector correspond to the fusion weights of the expert prediction results. Since each row of the fixed mapping matrix contains multiple consecutive non-zero elements, and all non-zero elements in the same row have a value of 1, the fusion weights of each expert channel within the same work condition group are completely equal, and their values are the probability values of the corresponding work condition components in the probability vector. This weight allocation method allows for a smooth transition of weights between adjacent work condition groups on boundary samples, because boundary samples simultaneously assign non-zero probabilities to adjacent work conditions in the probability vector, thereby activating expert channels from multiple work condition groups to participate in the final prediction.
[0063] This embodiment achieves a deterministic transformation from operating condition probabilities to expert weights through a predefined fixed mapping matrix. This mapping method requires no additional learning parameters, the calculation process is simple and efficient, and it ensures that the fusion process strictly follows the pre-set operating condition organization structure, providing structurally clear and semantically explicit weight inputs for subsequent weighted fusion.
[0064] In some embodiments, a matrix multiplication operation is performed between the probability vector and a fixed mapping matrix to obtain a weight vector with a dimension equal to the total number of expert prediction results, including: The probability vector is viewed as a row vector, with the dimension of the probability vector being 1 row multiplied by the number of joint operating condition categories. The dimension of the fixed mapping matrix is defined as the number of rows of joint operating condition categories multiplied by the total number of columns of expert prediction results; Perform a row vector and matrix multiplication operation on the probability vector and the fixed mapping matrix. In the multiplication operation, each element of the probability vector is multiplied by all elements of the corresponding row of the fixed mapping matrix and then summed to generate the projection value of the probability vector on each column of the fixed mapping matrix. Arrange the projected values in each column sequentially to obtain a weight vector with a dimension of 1 row multiplied by the total number of expert prediction results. Each column position of the weight vector corresponds to an expert prediction result, and the value of the weight vector at that column position is the fusion weight corresponding to that expert prediction result.
[0065] In this embodiment, the probability vector participates in the operation as a row vector with 1 row and the number of columns is equal to the number of categories of joint operating conditions. This makes the probability vector in the left multiplication position in matrix multiplication. The number of rows in the operation result is determined by the number of rows of the left matrix and the number of columns is determined by the number of columns of the right matrix.
[0066] The dimension of the fixed mapping matrix is defined as follows: the number of rows equals the number of joint operating condition categories, and the number of columns equals the total number of expert prediction results. The number of rows in this matrix is equal to the number of columns in the probability vector, satisfying the basic requirement of dimension matching for matrix multiplication, that is, the number of columns in the left matrix must be equal to the number of rows in the right matrix.
[0067] The multiplication of row vectors and matrices follows the standard matrix multiplication rules. For each column of the fixed mapping matrix, the elements of the probability vector are multiplied by the elements of the corresponding row and then summed to obtain the projection value for that column. Due to the sparse binary nature of the fixed mapping matrix, each column has at most one non-zero element with a value of 1. Therefore, the calculation of each projection value degenerates into directly selecting a probability value at a specific position in the probability vector, without needing to perform actual multiplication and summation operations.
[0068] The projected values calculated for each column are arranged in ascending order of column index, forming a row vector with one row and the same number of columns as the total number of expert predictions. This row vector is the weight vector. The value at each column position in the weight vector corresponds to the fusion weight of a specific expert prediction. Since multiple consecutive columns belonging to the same working condition group in the fixed mapping matrix share the same non-zero row index, the projected values corresponding to these columns are equal, meaning that experts within the same working condition group receive the same fusion weight.
[0069] This embodiment describes in detail the multiplication process of a probability vector and a fixed mapping matrix from the perspective of the dimensional rules and computational details of linear algebra operations. This operation utilizes the sparse binary structure of the fixed mapping matrix to simplify matrix multiplication into an index-based selective value operation. While maintaining computational accuracy, this significantly reduces computational complexity, providing an efficient weight calculation scheme for real-time model inference.
[0070] In some embodiments, the prediction results of multiple experts are weighted and fused according to fusion weights to generate a predicted ship fuel consumption value, including: Obtain the multi-channel expert prediction vector output by the expert regression branch. The elements of the multi-channel expert prediction vector correspond to the candidate fuel consumption prediction values of the expert channels. Obtain the weight vector obtained by transforming the working condition and expert mapping relationship. The elements of the weight vector correspond to the fusion weights of the candidate fuel consumption prediction values of the expert channel. The multi-channel expert prediction vector and the weight vector are multiplied element by element to obtain the weighted prediction value of the expert channel. The weighted predicted values are summed to obtain a scalar value; After normalizing the scalar value based on the sum of each fusion weight, it is determined as the ship fuel consumption prediction value corresponding to the ship operation monitoring data. The ship fuel consumption prediction value is output. The calculation method of the ship fuel consumption prediction value is shown in formula (1).
[0071] In this embodiment, the multi-channel expert prediction vector is formed by concatenating the outputs of all expert head networks in the expert regression branch according to a fixed index order, and its dimension is equal to the total number of experts. Each element in this vector corresponds to a candidate fuel consumption prediction value for a specific expert channel, and these prediction values may exhibit different distributions due to differences in expert parameters. The weight vector is obtained by transforming the probability vector output by the operating condition identification branch through a fixed mapping matrix, and its dimension is completely consistent with the multi-channel expert prediction vector. The two are in one-to-one correspondence according to their index positions, ensuring that the prediction value of each expert channel is correctly associated with its fused weight.
[0072] Element-wise multiplication works as follows: for two vectors with the same dimension, their elements at the same index position are multiplied to generate a new vector with the same dimension. This operation does not involve cross-channel information mixing; the predicted value of each expert channel only interacts with its own fusion weights, and the output is the weighted predicted value of that expert channel. The elements with larger values in the weighted predicted value vector indicate that the corresponding expert channel contributed a higher weight to the prediction of the current sample.
[0073] The summation operation accumulates the weighted prediction values from all expert channels to obtain a scalar value. This scalar value represents the comprehensive response of each expert's prediction results after weighting, but its value has not yet taken into account the normalization characteristics of the weight vector itself. According to the definition of formula (1), the final ship fuel consumption prediction value is divided by the sum of all weights, and a preset numerical stabilization term is introduced to prevent division by zero anomalies, thereby obtaining the normalized weighted average prediction result.
[0074] The predicted ship fuel consumption, as the final output of the entire prediction process, maintains the same numerical dimensions as the original fuel consumption value. This predicted value integrates information from all expert channels, but through the adjustment of the weight vector, the expert channel that best matches the current sample operating conditions takes the lead in the final result, achieving adaptive response to different operating conditions.
[0075] This embodiment achieves weighted fusion prediction with adaptive operating conditions through a combination of element-wise multiplication and summation operations. The calculation process involves only basic linear algebra operations, resulting in low computational complexity and facilitating real-time deployment and inference within ship energy efficiency management systems. Through normalization, the predicted values remain within a reasonable range, ensuring the stability and interpretability of the output results.
[0076] In a second aspect, this embodiment also provides a ship fuel consumption prediction system based on a gating expert model for operating conditions, applicable to the method described in the first aspect. The system includes a data acquisition module, an operating condition construction module, a model construction module, an operating condition identification module, an expert regression module, a weight transformation module, and a prediction generation module. The data acquisition module is used to acquire ship operation monitoring data, which includes at least speed, environmental disturbance characteristics, and fuel consumption values. The operating condition construction module is used to construct sea state levels based on environmental disturbance characteristics, construct speed gears based on speed, and combine sea state levels and speed gears to generate a joint operating condition label. The model construction module is used to construct a gating expert model for operating conditions. The expert model, a condition-gated expert model, includes an expert regression branch, a condition identification branch, and a mapping relationship between conditions and experts. The condition identification module is used to input the speed and environmental disturbance characteristics in the ship operation monitoring data into the condition identification branch, and outputs the probability distribution of the ship operation monitoring data belonging to each joint operation condition. The expert regression module is used to input the ship operation monitoring data into the expert regression branch, and outputs multiple expert prediction results. The weight transformation module is used to convert the probability distribution into the fusion weights corresponding to each expert prediction result based on the mapping relationship between conditions and experts. The prediction generation module is used to perform weighted fusion of multiple expert prediction results according to the fusion weights to generate the ship fuel consumption prediction value.
[0077] In this embodiment, the modules work together to predict ship fuel consumption under operating conditions. The data acquisition module collects speed, environmental disturbance characteristics, and fuel consumption as raw inputs. The operating condition construction module generates joint operating condition labels based on these. The model construction module builds an operating condition gated expert model that includes an expert regression branch, an operating condition identification branch, and a mapping relationship between operating conditions and experts. The operating condition identification module and the expert regression module output the operating condition probability distribution and the multi-expert prediction results, respectively. The weight conversion module converts the probability distribution into fusion weights. Finally, the prediction generation module completes the weighted fusion and outputs the ship fuel consumption prediction value, thereby achieving adaptive prediction for different operating conditions within a unified system architecture.
[0078] By adopting the above technical solution, this invention differs from existing technologies and has the following beneficial effects: By constructing a joint operating condition label formed by a combination of sea state level and speed gear, and based on this, constructing an operating condition gating expert model that includes an expert regression branch, an operating condition identification branch, and a mapping relationship between operating conditions and experts, operating condition information is introduced into the prediction process in a structured manner; the continuous probability distribution of each joint operating condition is output using the operating condition identification branch, and converted into a fusion weight of each expert prediction result through a predefined mapping relationship between operating conditions and experts, thereby weighted fusion of multiple expert prediction results to generate a predicted ship fuel consumption value. The above technical solution, while retaining the ability to share and learn information across all samples, achieves differentiated adaptive processing of samples from different operating conditions, effectively enhancing the prediction stability of the model under complex operating conditions, reducing prediction error fluctuations across operating conditions, and improving prediction accuracy under adverse operating conditions.
[0079] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0080] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0081] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for predicting ship fuel consumption based on a condition-gated expert model, characterized in that, include: Acquire ship operation monitoring data, which includes input features and corresponding fuel consumption values. The input features include at least speed and environmental disturbance features. A sea state level is constructed based on the environmental disturbance characteristics, a speed level is constructed based on the speed, and the sea state level and the speed level are combined to generate a joint operating condition label. Construct a working condition gating expert model, which includes an expert regression branch, a working condition identification branch, and a mapping relationship between working conditions and experts; Based on the input features, the joint operating condition labels and the corresponding fuel consumption values, the operating condition gating expert model is trained. The ship speed and environmental disturbance characteristics in the ship operation monitoring data are input into the operating condition identification branch, and the probability distribution of the ship operation monitoring data belonging to each joint operating condition is output. The input features from the ship operation monitoring data are input into the expert regression branch, and multiple expert prediction results are output. Based on the mapping relationship between the working conditions and experts, the probability distribution is converted into fusion weights corresponding to the prediction results of each expert. Based on the fusion weights, the prediction results of the multiple experts are weighted, fused, and normalized to generate ship fuel consumption prediction values. A sea state level is constructed based on the environmental disturbance characteristics, a speed range is constructed based on the speed, and the sea state level and the speed range are combined to generate a joint operating condition label, including: The environmental disturbance features, including wind speed, relative wind direction, flow velocity, and relative flow direction, are obtained, and the environmental disturbance features are standardized. The K-Means clustering algorithm is used to cluster the standardized environmental disturbance features to obtain initial clusters. The clusters are then sorted according to the average wind speed level corresponding to each initial cluster to generate sea state level labels. Based on the empirical distribution of the speed, the equal frequency binning method is used to determine the dividing point between the low speed and the high speed. According to the dividing point, the speed is divided into low speed, medium speed and high speed, and speed label is generated. The sea state level label and the speed gear label are combined and encoded to generate a mutually exclusive joint operating condition label, which is used to characterize the combined state of external disturbance intensity and propulsion load level. Constructing a gating expert model for operating conditions includes: An expert regression branch is constructed, which uses the TabM network as the basic regressor and generates multiple expert prediction results in parallel through an integration mechanism of parameter sharing. A working condition identification branch is constructed, which uses the GateNet network as a gating network. The gating network determines the working condition based on the input speed and environmental disturbance characteristics, and outputs a continuous probability distribution of the sample belonging to each joint operating condition. The continuous probability distribution is used to characterize the soft belonging degree of the sample among different joint operating conditions. A mapping relationship between operating conditions and experts is constructed. The mapping relationship between operating conditions and experts is a predefined fixed mapping matrix. Each joint operating condition in the fixed mapping matrix corresponds to a set of continuous expert channels. The continuous probability distribution output by the gated network is converted into the fusion weights corresponding to each expert channel through the fixed mapping matrix. The expert regression branch, the working condition identification branch, and the working condition-expert mapping relationship are integrated to obtain the working condition gating expert model; Based on the mapping relationship between the operating conditions and experts, the probability distribution is converted into fusion weights corresponding to the prediction results of each expert, including: Obtain a predefined fixed mapping matrix. The number of rows in the fixed mapping matrix is equal to the number of categories of joint operating conditions. The number of columns in the fixed mapping matrix is equal to the total number of expert prediction results. Each row in the fixed mapping matrix corresponds to a joint operating condition. The continuous expert channel positions corresponding to the joint operating condition in that row are filled with 1, and the other positions are filled with 0. Obtain the continuous probability distribution output by the working condition identification branch, wherein the continuous probability distribution is a probability vector with a dimension equal to the number of joint operating condition categories; Perform matrix multiplication on the probability vector and the fixed mapping matrix to obtain a weight vector with a dimension equal to the total number of expert prediction results. The elements of the weight vector correspond to the fusion weights of the expert prediction results.
2. The ship fuel consumption prediction method based on a condition-gated expert model according to claim 1, characterized in that, The ship speed and environmental disturbance characteristics from the ship operation monitoring data are input into the operating condition identification branch, and the probability distribution of the ship operation monitoring data belonging to each joint operating condition is output, including: The ship operation monitoring data is extracted and combined with the ship speed, wind speed, relative wind direction, current speed and relative current direction to form the operating condition discrimination input features. The working condition discrimination input features are input into the GateNet network in the working condition identification branch. The GateNet network sequentially performs alternating processing of the working condition discrimination input features with multi-level linear transformations and non-linear activation functions, and extracts the deep representation related to working condition discrimination in the working condition discrimination input features through layer-by-layer non-linear mapping. The deep representation is input to the Softmax classification layer at the end of the GateNet network. The Softmax classification layer performs normalized exponential mapping on the deep representation and outputs a probability vector with a dimension equal to the number of joint operating condition categories. The elements of the probability vector correspond to the continuous probability values of the joint operating conditions, and the sum of all continuous probability values is 1. The probability vector is determined as the probability distribution of the ship operation monitoring data belonging to each joint operation condition and output.
3. The ship fuel consumption prediction method based on a condition-gated expert model according to claim 2, characterized in that, The operating condition discrimination input features are input into the GateNet network in the operating condition recognition branch. The GateNet network sequentially performs alternating processing of the operating condition discrimination input features with multi-level linear transformations and non-linear activation functions. Through layer-by-layer non-linear mapping, it extracts deep representations related to operating condition discrimination from the operating condition discrimination input features, including: The GateNet network contains multiple gated hidden layers stacked sequentially, and each gated hidden layer contains a linear transformation unit and a gated activation unit; The working condition discrimination input features are input to the first-layer gated hidden layer. The linear transformation unit in the first-layer gated hidden layer performs linear mapping on the working condition discrimination input features to generate a first linear transformation result. The gated activation unit in the first-layer gated hidden layer performs gated nonlinear activation on the first linear transformation result to generate a first gated hidden representation. The first gated hiding representation is input to the next gated hiding layer. The linear transformation unit in the gated hiding layer performs a linear mapping on the first gated hiding representation to generate a second linear transformation result. The gated activation unit in the gated hiding layer performs gated nonlinear activation on the second linear transformation result to generate a second gated hiding representation. Repeat the above process until all gated hiding layers have been processed, and obtain the gated hiding representation output by the last gated hiding layer as the deep representation.
4. The ship fuel consumption prediction method based on a condition-gated expert model according to claim 1, characterized in that, The input features from the ship operation monitoring data are fed into the expert regression branch, outputting multiple expert prediction results, including: The input features from the ship operation monitoring data are input into the TabM network in the expert regression branch. The TabM network adopts a structure of a shared bottom layer network and multiple expert head networks. The shared bottom layer network extracts features from the input features layer by layer through an integration mechanism of parameter sharing. It is processed by alternating multiple linear transformations and nonlinear activation functions to extract shared feature representations that reflect common patterns from the input features. The shared feature representation is distributed to the multiple expert head networks respectively. Each expert head network contains independent fully connected layer parameters. Based on the received shared feature representation, each expert head network performs independent regression mapping calculations in parallel using its own fully connected layer parameters and generates candidate fuel consumption prediction values. By aggregating all the candidate fuel consumption predictions generated by the expert head network, multiple expert prediction results are obtained.
5. The ship fuel consumption prediction method based on a condition-gated expert model according to claim 1, characterized in that, Performing matrix multiplication between the probability vector and the fixed mapping matrix yields a weight vector with a dimension equal to the total number of expert prediction results, including: The probability vector is considered as a row vector, and the dimension of the probability vector is 1 row multiplied by the number of joint operating condition categories. The dimension of the fixed mapping matrix is defined as the number of rows of joint operating condition categories multiplied by the total number of columns of expert prediction results; Perform a row vector and matrix multiplication operation on the probability vector and the fixed mapping matrix. In the multiplication operation, each element of the probability vector is multiplied by all elements of the corresponding row of the fixed mapping matrix and then summed to generate the projection value of the probability vector on each column of the fixed mapping matrix. Arrange the projected values in each column sequentially to obtain a weight vector with a dimension of 1 row multiplied by the total number of expert prediction results. Each column position of the weight vector corresponds to an expert prediction result, and the value of the weight vector at that column position is the fusion weight corresponding to that expert prediction result.
6. The ship fuel consumption prediction method based on a condition-gated expert model according to claim 1, characterized in that, The multiple expert prediction results are weighted and fused according to the fusion weights to generate a predicted ship fuel consumption value, including: Obtain the multi-channel expert prediction vector output by the expert regression branch, where each element of the multi-channel expert prediction vector corresponds to a candidate fuel consumption prediction value for the expert channel. Obtain the weight vector obtained by transforming the working condition and expert mapping relationship, where the elements of the weight vector correspond to the fusion weights of the candidate fuel consumption prediction values of the expert channel; The multi-channel expert prediction vector is multiplied element-wise with the weight vector to obtain the weighted prediction value of the expert channel. The weighted predicted values are summed to obtain a scalar value; After normalizing the scalar value based on the fusion weight, it is determined as the ship fuel consumption prediction value corresponding to the ship operation monitoring data, and the ship fuel consumption prediction value is output.
7. A ship fuel consumption prediction system based on a condition-gated expert model, characterized in that, The system applicable to the method of any one of claims 1 to 6, the system comprising: The data acquisition module is used to acquire ship operation monitoring data, which includes input features and corresponding fuel consumption values. The input features include at least ship speed and environmental disturbance features. The operating condition construction module is used to construct a sea state level based on the environmental disturbance characteristics, construct a speed gear based on the speed, and combine the sea state level and the speed gear to generate a joint operating condition label. The model building module is used to build and train the working condition gating expert model, which includes an expert regression branch, a working condition identification branch, and a mapping relationship between working conditions and experts. The operating condition identification module is used to input the speed and environmental disturbance characteristics in the ship operation monitoring data into the operating condition identification branch, and output the probability distribution of the ship operation monitoring data belonging to each joint operating condition; The expert regression module is used to input the input features from the ship operation monitoring data into the expert regression branch and output multiple expert prediction results. The weight conversion module is used to convert the probability distribution into fusion weights corresponding to the prediction results of each expert based on the mapping relationship between the working conditions and experts. The prediction generation module is used to perform weighted fusion and normalization processing on the multiple expert prediction results according to the fusion weights to generate ship fuel consumption prediction values.
Citation Information
Patent Citations
Oil consumption prediction method and system for intelligent ship, intelligent ship and medium
CN116703001A
Multi-working-condition industrial process soft measurement method based on multi-task learning and probability modeling
CN121997169A