Port energy and operation system cooperative load prediction method
Through the load forecasting model combining feature gating mechanism and BiLSTM network with dual attention mechanism, the complexity problem of load forecasting in the port energy system is solved, high-precision load forecasting is achieved, and the collaborative optimization capability of the port energy and operation system is improved.
Patent Information
- Application Number
- CN202510819896.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-16
AI Technical Summary
The load forecasting of port energy systems faces the problems of high noise, violent fluctuations, nonlinear coupling relationships, and difficulty in capturing long-term trend cycles. This leads to low prediction accuracy of traditional methods, and problems such as unstable gradients and insufficient feature extraction in the application of deep learning models.
A load forecasting model that adopts a feature gating mechanism, a bidirectional long short-term memory network (BiLSTM), and a dual attention mechanism is proposed. The feature gating mechanism is used to normalize and smooth the input data. The BiLSTM network captures temporal features. The local and feature attention mechanisms enhance feature extraction. The noise reparameterization technology is combined to improve the prediction accuracy.
The accuracy and robustness of port power load forecasting have been significantly improved, reducing the mean absolute percentage error (MAPE) by about 60%, the mean absolute error (MAE) by about 53%, and the root mean square error (RMSE) by about 65%, providing a reliable basis for the coordinated optimization of port energy and operation systems.
Smart Images

Figure CN120654892A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of energy management and load forecasting, and in particular to a method for collaborative load forecasting of port energy and operating systems. Background Art
[0002] Modern large-scale ports are usually connected to the power grid for power supply, supplemented by new energy forms such as solar photovoltaic and wind power generation to meet the diverse needs of ship shore power, cargo loading and unloading, etc., while also addressing the challenges of energy transformation and carbon emission reduction. The port energy system is characterized by the coexistence of multiple energy sources and strong coupling. Different energy subsystems (such as grid power supply, energy storage, electric drive equipment, etc.) need to be managed in coordination with the port operation system. This coordinated management and control requires the port to be able to reasonably allocate energy according to the operation plan (such as loading and unloading operation shifts, equipment working hours, seasonal business peaks, etc.). Accurately predicting the comprehensive energy load of the port is the key to achieving efficient coordination between energy and operation systems. It helps to optimize energy scheduling, improve energy utilization efficiency, reduce operating costs, and ensure sufficient energy supply during peak operations. However, due to the significant cyclical changes in port operations, factors such as seasons, holidays and weather will cause energy consumption fluctuations. Traditional load forecasting methods are difficult to fully capture this complex pattern and often fail to meet actual accuracy requirements.
[0003] The main energy system of the port is currently powered by electricity, with the main energy source being direct power from the grid, and a small amount of energy being supplied by solar photovoltaic and wind power generation. The energy supply of solar photovoltaic and wind power generation is mainly determined by weather conditions, including season, weather, temperature, and wind turbine settings. Photovoltaic power generation data is calculated using the formula Calculation, δ represents the solar declination angle, N represents the Nth day of the year, and the angle unit is degree. Formula The Weibull distribution is used to simulate the daily variation of wind speed. x represents the measured wind speed; k is the shape parameter, which determines the steepness of the wind speed distribution. Setting it to 2 here better accommodates highly variable wind speeds; λ is the scale parameter, representing the sample average wind speed. The Weibull distribution is highly adaptable to describing wind speed distributions. Its two parameters (shape parameter k and scale parameter λ) can well characterize the changing trend of wind speed, allowing it to describe both stable wind fields and areas with large wind speed variations.
[0004] The dynamic nature of renewable energy supply and the port's operating cycle jointly determine the complex variations in the integrated energy system's load. Based on an analysis of influencing factors (such as season, weather, temperature, holidays, operating hours, renewable energy output, etc.), statistical methods such as the Pearson correlation coefficient can be used to assess the linear correlation between each factor and grid load, thereby screening out the key influencing features. Correlation analysis revealed that some factors have a significant correlation with port grid load. Based on this, features with strong correlations can be prioritized as inputs to the prediction model to increase the model's sensitivity to key influencing factors. This feature selection strategy lays the foundation for the subsequent construction of deep learning prediction models.
[0005] Currently, deep learning methods such as recurrent neural networks (RNNs) have been used for time series prediction. The improved structure of the Long Short-Term Memory (LSTM) network, by introducing input, forget, and output gates, has alleviated the vanishing gradient problem in long sequences to a certain extent. Another type of network, the Gated Recurrent Unit (GRU), simplifies the gating structure to reduce parameters and improve training efficiency. Furthermore, the Bidirectional Long Short-Term Memory (BiLSTM) and Bidirectional GRU (BiGRU) can simultaneously consider both forward and backward information in a time series, thereby more fully capturing two-way temporal dependencies and demonstrating improved stability when processing highly dependent payload data. The Transformer architecture, proposed in 2017, introduced a self-attention mechanism, significantly revolutionizing the way sequence data is processed. This allows the model to dynamically assign weights based on the correlations between elements within the sequence, accurately modeling long-distance dependencies from a global perspective. These technologies provide new ideas for complex time series prediction. For example, the attention mechanism can highlight important time segments without increasing the dependence on sequence length; layer normalization (LayerNorm) can alleviate the instability caused by differences in the statistical distribution of data in different batches; and the GELU (Gaussian Error Linear Unit) activation function can take into account the sparsity of ReLU and the smoothness of ELU, thereby improving nonlinear expression capabilities.
[0006] The above methods have brought progress to energy load forecasting, but port energy demand forecasting still faces many challenges: (1) Historical load data often contain high noise and violent random fluctuations. Different energy sources and influencing factors (such as meteorological conditions and operation plans) have heterogeneous and nonlinear coupling relationships, and the load series has both short-term peak-valley fluctuations and long-term trend cycles. (2) Traditional statistical models have low prediction accuracy under extreme working conditions because they are difficult to capture nonlinear relationships. (3) Although deep learning models have powerful nonlinear fitting capabilities, they may still encounter problems such as gradient instability, insufficient feature extraction, and insufficient modeling of long-term dependencies in applications, resulting in unsatisfactory prediction results.
[0007] Therefore, there is an urgent need for an improved prediction method targeting the collaborative characteristics of the port energy system and the operation system, which can fully combine the characteristics of multi-source data and improve the ability to capture short-term sharp fluctuations and long-term trends, so as to improve the accuracy and reliability of load forecasting. Summary of the Invention
[0008] The purpose of this application is to provide a port energy and operating system collaborative load forecasting method that can adapt to the complex characteristics of the port's multi-energy system and improve the prediction accuracy and robustness of the port's power load.
[0009] To achieve the above objectives, this application provides the following solutions:
[0010] The present application provides a method for collaborative load prediction of port energy and operating system, which includes:
[0011] Acquire historical port data organized in chronological order; the port data includes: power load and influencing factors; the influencing factors include: season, weather, temperature, holidays, operating hours, and renewable energy output;
[0012] According to historical port data, a load forecasting model is trained to obtain a trained load forecasting model; the load forecasting model includes: a feature gating mechanism module, an LSTM network module, an attention fusion module and a prediction module; the feature gating mechanism module is used to normalize and smooth nonlinear mapping of the input port data to obtain a feature weight vector; and the feature weight vector is applied to the input port data to obtain weighted features; the LSTM network module is used to extract time series features from the weighted features to obtain high-dimensional sequence features; the attention fusion module includes: a local attention submodule and a feature attention submodule; the attention fusion module is used to use the local attention submodule and the feature attention submodule respectively according to the high-dimensional sequence features to obtain time attention features and feature attention features, and fuse the time attention features and the feature attention features to obtain fused features; the prediction module is used to output a load forecasting result based on the fused features;
[0013] Obtain real-time port data and use the trained load forecasting model to perform load forecasting.
[0014] Optionally, the step of obtaining the historical port data organized in chronological order further includes:
[0015] The historical port data is preprocessed; the data preprocessing includes: timestamp alignment and merging processing, outlier cleaning, data smoothing processing, time attribute extraction, sine and cosine transform encoding and sliding window processing.
[0016] Optionally, the data smoothing process adopts an exponentially weighted moving average method.
[0017] Optionally, the feature gating mechanism module uses a label encoder and a Gaussian error linear unit as an activation function to normalize and smooth the nonlinear mapping of the input port data.
[0018] Optionally, the LSTM network module adopts a BiLSTM network.
[0019] Optionally, the BiLSTM network is a two-layer stack, and the dimension of hidden units in each layer is 256.
[0020] Optionally, the prediction module adopts a noise reparameterization technique.
[0021] According to the specific embodiments provided in this application, this application has the following technical effects:
[0022] The present application provides a method for collaborative load forecasting of port energy and operating systems. The load forecasting model includes: a feature gating mechanism module, an LSTM network module, an attention fusion module, and a prediction module. The feature gating mechanism module performs normalization and smooth nonlinear mapping on the input port data to stabilize the data distribution and carefully capture the subtle relationship between features, thereby providing high-quality input representation for the time series modeling and attention aggregation of the entire model. The attention fusion module adopts a dual attention mechanism to extract important features in the time series and focus on the importance of different feature dimensions. The present application takes into account the collaborative operation mechanism of the port energy system and the operating system, and significantly improves the prediction accuracy and robustness of the port power load by introducing dynamic feature weight adjustment and a dual attention mechanism. The present application solves the problems of insufficient capture of short-term high-frequency fluctuations, insufficient long-term dependency modeling, and incomplete feature utilization in the existing technology through the LSTM network module. The present application can achieve high-precision prediction of the comprehensive energy load of dry bulk ports and provide decision support for port energy scheduling and operation planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 This is a flow chart of a method for collaborative load prediction of port energy and operating systems in one embodiment of the present application;
[0025] Figure 2 The annual grid energy demand distribution map for port energy;
[0026] Figure 3 This is the frequency distribution diagram of energy demand of the port power grid;
[0027] Figure 4 Monthly statistics of the port power grid energy;
[0028] Figure 5 It is a heat map of the correlation between various energy loads and influencing factors;
[0029] Figure 6 This is a schematic diagram of the data pre-processing process;
[0030] Figure 7 This is a schematic diagram of the LSTM network module structure;
[0031] Figure 8 Schematic diagram of the BiLSTM network structure;
[0032] Figure 9 This is a schematic diagram of the attention fusion module structure;
[0033] Figure 10 Schematic diagram of the branch processing flow after BiLSTM output;
[0034] Figure 11 This is a schematic diagram of the overall design process of a method for collaborative load prediction of port energy and operating systems in one embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0036] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0037] In an exemplary embodiment, Figure 1 and Figure 11 As shown, a method for predicting the coordinated load of port energy and operation systems is provided, which includes the following S101 to S103.
[0038] S101, obtaining historical port data organized in chronological order; the port data includes: power load and influencing factors; the influencing factors include: season, weather, temperature, holidays, operation time, and renewable energy output;
[0039] S101 and later also include:
[0040] The historical port data is preprocessed; the data preprocessing includes: timestamp alignment and merging processing, outlier cleaning, data smoothing processing, time attribute extraction, sine and cosine transform encoding and sliding window processing.
[0041] As a specific embodiment, the acquisition and preprocessing process of historical port data organized in chronological order is as follows:
[0042] In S1, historical port data is loaded from files and merged into a single dataset by timestamp. Timestamps are converted to datetime objects and then sorted by timestamp to ensure data temporality. This data processing provides ordered time series data for subsequent model training.
[0043] S2 applies the exponentially weighted moving average (EWMA) to smooth the ordered time series data to mitigate the volatility of the data. It also constructs time features such as week, hour, and month, and uses sine and cosine transforms to capture the cyclical changes of time.
[0044] S3 generates time series data based on the specified window size. A set of feature and target pairs is generated using a sliding window approach, ensuring that the load forecasting model can learn temporal dependencies.
[0045] S102, based on historical port data, train the load forecasting model to obtain a trained load forecasting model; the load forecasting model includes: a feature gating mechanism module, an LSTM network module, an attention fusion module and a prediction module; the feature gating mechanism module is used to normalize and smooth nonlinear mapping the input port data to obtain a feature weight vector; and the feature weight vector is applied to the input port data to obtain weighted features; the LSTM network module is used to extract time series features from the weighted features to obtain high-dimensional sequence features; the attention fusion module includes: a local attention submodule and a feature attention submodule; the attention fusion module is used to use the local attention submodule and the feature attention submodule respectively according to the high-dimensional sequence features to obtain time attention features and feature attention features, and fuse the time attention features and the feature attention features to obtain fused features; the prediction module is used to output the load forecasting result according to the fused features;
[0046] The feature gating mechanism module uses LayerNorm (label encoder) and GELU (Gaussian Error Linear Unit) as activation functions to normalize and smooth nonlinear mapping of the input port data. This stabilizes the data distribution and captures subtle relationships between features, providing high-quality input representation for the entire model's temporal modeling and attention aggregation.
[0047] The LSTM network module uses the BiLSTM network, which can better capture the previous and next dependencies in the sequence.
[0048] The BiLSTM network is a two-layer stack, and the dimension of hidden units in each layer is 256.
[0049] The local attention submodule enhances the representation of LSTM outputs through an attention mechanism, further extracting important features from the time series. Local attention focuses on individual time steps, limiting the window size, while global attention applies to all time steps. The feature attention submodule uses another attention layer to focus on the importance of different feature dimensions.
[0050] The prediction module adopts noise reparameterization technology to make the load forecasting model output contain noise, so as to increase the diversity and robustness of the prediction.
[0051] This application uses the existing Lion optimizer and learning rate scheduler (LambdaLR) during load forecasting model training, enabling dynamic adjustment of the learning rate. Gradient clipping is implemented during training to prevent gradient explosion. At the end of each epoch, the load forecasting model's performance is evaluated and early stopping is performed to prevent overfitting.
[0052] S103, obtaining real-time port data and performing load forecasting using the trained load forecasting model.
[0053] The load forecasting model integrates feature gating, bidirectional LSTM, and dual attention mechanisms, and can automatically extract key patterns from multi-source data to achieve deep modeling of energy consumption sequences. Compared with existing technologies, this application uses a dynamic feature gating mechanism to adaptively adjust the importance weights of input features, improving the load forecasting model's ability to identify different influencing factors and significantly improving the signal-to-noise ratio. The introduction of a BiLSTM network combined with a specific weight initialization and forget gate bias strategy enables the load forecasting model to capture long-term cyclical trends while suppressing short-term noise interference, and has a more excellent modeling capability for load data containing seasonal patterns. The designed dual-dimensional attention architecture of time and features can simultaneously focus on key time segments and key feature channels, achieving efficient information fusion and enhancing the load forecasting model's ability to characterize complex time series dependencies and feature interactions. In addition, by outputting probability distributions through a multi-layer fully connected network and adopting reparameterized sampling, the model has the ability to estimate uncertainty, making it more robust when dealing with high-fluctuation sections of port load.
[0054] The method proposed in this application significantly improves prediction accuracy compared to traditional methods, with the mean absolute percentage error (MAPE) reduced by approximately 60% compared to methods using traditional convolutional feature extraction, by approximately 53% compared to methods using GRU networks, and by over 65% compared to methods using only a global attention mechanism. Therefore, the load forecasting model provided in this application can more accurately predict the comprehensive energy demand of dry bulk ports, providing a reliable basis for the coordinated optimization and control of port energy systems and operating systems.
[0055] The following is a specific description of this application by taking a certain port as an example:
[0056] First, the data processing part organizes the historical port data in chronological order. Figure 2-Figure 5As shown in the figure, a data set of power load and related influencing factors (such as season, weather, temperature, holidays, operating hours, and renewable energy output) for the entire year of 2024 is obtained from port operation records. Data preprocessing includes aligning and merging data from various sources based on timestamps to ensure time series continuity. Outliers are removed, such as records showing zero grid demand during long holiday shutdowns, which can interfere with modeling and can be removed or replaced with the average value. The load series is then smoothed using an exponentially weighted moving average (EWMA) to mitigate high-frequency jitter in the raw data. Furthermore, time attributes are extracted as auxiliary features, including day of the week, hour, and month. These periodic time features are encoded using sine and cosine transforms to reflect patterns such as seasonal cycles and diurnal cycles. Furthermore, label encoders are used to convert categorical variables such as weather and season into numerical values. In combination with port operation information, a "working hours" feature is introduced to represent the actual operating hours (in hours) of the day, and a "holiday" feature is introduced to indicate whether a day is a holiday. The processed features, new energy output (photovoltaic power generation, wind power output, etc.) and historical load data are used as the input feature set X of the load forecasting model.
[0057] Next, we will Figure 6 The feature gating mechanism shown is applied to the input feature set to achieve dynamic feature screening. Using techniques such as LayerNorm (label encoder) and GELU (Gaussian Error Linear Unit) activation, the input features are normalized and smoothed nonlinearly to obtain a feature weight vector w. This vector is then applied to the original input X to obtain the weighted features X'. The load forecasting model can highlight key influencing factors at the input stage (for example, by increasing the corresponding weights to emphasize highly relevant features such as season and temperature) while simultaneously de-emphasizing noisy features (such as random interference).
[0058] Use Figure 8 The BiLSTM network shown in Figure 1 performs deep temporal feature extraction on the weighted feature sequence X'. BiLSTM consists of two LSTMs with opposite directions, and its structure is as follows: Figure 7 As shown in the figure. The forward LSTM processes features from the beginning to the end of the sequence, and the backward LSTM processes features from the end of the sequence in reverse. Each LSTM unit is internally connected through the input gate i t 、Forget Gate t , output gate o t Controls the flow of information and maintains a cell state c t To memorize long-term information. The single-step state update process of LSTM can be described by the formula:
[0059] i t =σ(W i[h t-1 , x t ]+b i );
[0060] f t =σ(W f [h t-1 , x t ]+b f );
[0061] o t =σ(W o [h t-1 , x t ]+b o );
[0062]
[0063] h t =o t ☉tanh(c t );
[0064] Among them, h t-1 and h t are the hidden states of the previous and current time steps, x t is the input feature of the current step, W and b are the weights and biases of each gate. Through such gated calculations, LSTM can decide which information to forget at the previous moment, which new information to record at the current moment, and produce the hidden representation h for the next moment. t In BiLSTM, the forward calculation obtains the hidden sequence Backward calculation The hidden vector is then concatenated at each time step As a bidirectional representation of that time step. Through the BiLSTM structure, the load forecasting model can simultaneously capture the contextual correlations of the past and future in the port load series. For example, high daytime load may indicate a decrease in nighttime load, and the equipment usage in the previous period will also affect the energy consumption trend in the next period.
[0065] To enhance BiLSTM's ability to learn long-term dependencies, this example optimizes BiLSTM parameters: The number of LSTM layers is set to two, achieving a good balance between capturing short-term and long-term patterns. The hidden unit dimension (hidden_size) of each layer is set to 256. A comparison reveals that a smaller hidden_size results in insufficient model capacity, while a larger hidden_size leads to overfitting. A value of 256 yields optimal model performance. Furthermore, a truncation strategy is employed for the LSTM gradient during training (e.g., limiting the gradient norm to prevent gradient explosion), and early stopping is used to monitor the validation set error to avoid overfitting.
[0066] Subsequently, the high-dimensional sequence features H output by BiLSTM are fed into Figure 9 The temporal attention-based local attention submodule shown in Figure 10 The feature attention submodule shown. The local attention submodule based on temporal attention calculates the attention weight for each time segment based only on several adjacent moments in the segment, rather than the entire sequence. For example, a sliding window of length 20 can be used to slide on H, and the above attention weight calculation formula can be executed in each window to filter out the time step features that have the greatest impact on the prediction in the window, and then the weighted summation in the window is used to obtain the local feature representation. The attention output of each window is accumulated along the time axis to form the total temporal attention output a time By limiting the scope of attention calculation, this local attention reduces the interference of remote irrelevant information, allowing the load forecasting model to focus more on the changes in load within a short period of port operations (such as within a shift), and improving the response speed to sudden increases and decreases in load. The feature attention module compresses the BiLSTM output in the time dimension to obtain the average contribution S of each feature channel in the entire prediction window, and then generates the feature weight w through the fully connected network and Sigmoid. f In this embodiment, the dimension of H is d=512 (because BiLSTM is a 2-layer bidirectional system with 256 hidden layers and a bidirectional output of 512 dimensions), so w f It is also a 512-dimensional vector, each dimension corresponds to strengthening or weakening a feature channel. f Linear projection to 512-dimensional space to obtain the feature attention submodule output vector a feat . a feat It comprehensively reflects the global impact of factors such as temperature, wind speed, and operation time on the current load state. Finally, the local attention submodule outputs a time And the feature attention submodule outputs a feat Spliced into a 1024-dimensional vector u (such as Figure 10 The first fully connected layer maps the 1024-dimensional u to a 128-dimensional hidden layer and uses ReLU activation. The second fully connected layer maps the hidden layer to two real values, which serve as the mean μ and logarithmic variance logσ of the prediction results. 2 The load forecasting model predicts the grid load demand value at the next moment (e.g., the next hour). Due to the introduction of variance prediction, the model of this application provides the uncertainty range of the prediction (characterized by σ) while giving the point prediction μ. During the training process, a negative log-likelihood loss function is used, and the true value is regarded as sampled from the predicted normal distribution. Its probability is calculated and the negative logarithm is taken as the loss, thereby optimizing the load forecasting model parameters.
[0067] The load forecasting model is trained and validated using actual port data, and compared with other models. The training platform is Python's PyTorch deep learning framework, and the hardware environment includes Core TM i5-13400F CPU, 16GB of memory and NVIDIA GeForce RTX 4060 GPU.
[0068] The processed 2024 data set of a certain port was divided into training set, validation set and test set in a ratio of 8:1:1. The load forecasting model training adopts the adaptive optimization algorithm Lion (an optimizer that integrates the advantages of momentum and adaptive learning rate). The initial learning rate is dynamically adjusted through a strategy combining warm-up and cosine annealing scheduling. In the early stage of training, the learning rate is slowly increased to stabilize convergence, and then the learning rate is gradually reduced to refine the optimization of the load forecasting model. After many attempts, the optimal initial learning rate was determined to be 0.001 and the batch size was 128. The gradient is clipped at each iteration (such as limiting the maximum norm to 5) to prevent gradient explosion from causing training instability. The MAPE indicator on the validation set is monitored during training. When the validation error no longer decreases for several consecutive rounds, early stopping is triggered to avoid overfitting.
[0069] In order to objectively evaluate the prediction performance, the mean absolute percentage error (MAPE), mean absolute error (MAE), root mean square error (RMSE) and coefficient of determination (R 2 ) Four indicators;
[0070] MAPE reflects the percentage of the deviation between the predicted value and the true value as a percentage of the true value. The formula is:
[0071]
[0072] Among them, y i is the true value, is the predicted value. The smaller the MAPE, the lower the relative error.
[0073] MAE measures the absolute error between the predicted value and the true value, and is the average of the absolute values of all prediction errors. MAE reflects the magnitude of the deviation between the predicted result and the true situation. The smaller the better. The formula is:
[0074]
[0075] Where n is the number of data;
[0076] RMSE magnifies the impact of larger errors to a certain extent, emphasizing larger deviations in the predicted values. A lower RMSE indicates a higher overall model accuracy. Its formula is:
[0077]
[0078] R 2 It indicates the degree to which the load forecasting model explains the fluctuation of actual data. Its calculation formula is:
[0079]
[0080] in, is the mean of the true values. 2 The value range is 0 to 1. The closer the value is to 1, the better the model fits the data. 2 When it is 1, it means that the predicted value is exactly the same as the true value.
[0081] To verify the effectiveness of the model described in this application, this embodiment selects five different model architectures for comparative test analysis. The model schemes and parameter configurations are listed in Table 1:
[0082] Table 1
[0083]
[0084] In Table 1, Model 4 corresponds to the method of this application, Models 1 to 3 are used as comparison models, and Model 5 is an extended and optimized version based on the model of this application. The above five models are used to perform load forecasting on the same port test data set and calculate evaluation indicators. The results are summarized in Table 2:
[0085] Table 2
[0086] Model RMSE MAPE / % <![CDATA[R 2 ]]> MAE Model 1 0.2734 17.13 0.8901 0.2200 Model2 0.2859 14.68 0.9105 0.2271 Model 3 0.2533 12.74 0.9352 0.2024 Model 4 0.2159 5.93 0.9697 0.1725 Model 5 0.2215 5.30 0.9522 0.1772
[0087] As can be seen from Table 2, the proposed model (Model 4) achieved excellent results in all indicators: RMSE was 0.2159 and MAE was 0.1725, both of which were the smallest among all models, indicating that the proposed model was the most effective in controlling the overall error and absolute error; 2The MAPE is as high as 0.9697, close to 1, indicating that our model can explain approximately 97% of the variance in load variation, demonstrating excellent fit. Particularly notable is the MAPE of only 5.93%, a significant decrease compared to all the compared models. For example, compared to Model 1, which only uses global attention, the MAPE drops from 17.13% to 5.93%, a reduction of approximately 65%, demonstrating that the local attention strategy significantly reduces the relative error of the load forecasting model for port loads. Compared to Model 2, which uses convolutional feature extraction, the MAPE decreases from 14.68% to 5.93% (a decrease of approximately 59.6%), demonstrating that dynamic feature gating is more effective in expressing feature importance than fixed convolutional kernels. Compared to Model 3, which uses GRU units, the MAPE decreases from 12.74% to 5.93% (a decrease of approximately 53.5%), reflecting the improved accuracy achieved by the BiLSTM's structural advantage in capturing long-term dependencies.
[0088] In summary, the load forecasting model proposed in this application has achieved significantly better results than traditional methods in the dry bulk port energy load forecasting scenario by innovatively integrating dynamic feature gating, BiLSTM bidirectional sequence modeling, and the dual mechanisms of local time attention and feature attention. This method comprehensively considers the coupling of port operation-related factors and multiple energy supplies, and can predict changes in energy demand under different operating intensities and climatic conditions in advance, providing a scientific basis for port dispatching departments to formulate energy procurement strategies, start and stop backup energy equipment, and optimize operation plans. In practical applications, this application can be integrated into the port energy management system to achieve real-time rolling prediction and early warning of future loads; combined with the port operation plan, it can also be further used to optimize the control decisions of the energy system (such as starting energy storage discharge during peak hours, performing equipment maintenance during off-peak hours, etc.), thereby achieving the purpose of coordinated optimization of the energy system and the production operation system.
[0089] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0090] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0091] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.
[0092] In this application, all actions to obtain signals, information or data are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.
[0093] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A method for collaborative load forecasting of port energy and operation systems, characterized in that: The port energy and operation system collaborative load forecasting method includes: Acquire historical port data organized in chronological order; the port data includes: power load and influencing factors; the influencing factors include: season, weather, temperature, holidays, operating hours, and renewable energy output; According to historical port data, a load forecasting model is trained to obtain a trained load forecasting model; the load forecasting model includes: a feature gating mechanism module, an LSTM network module, an attention fusion module and a prediction module; the feature gating mechanism module is used to normalize and smooth nonlinear mapping of the input port data to obtain a feature weight vector; and the feature weight vector is applied to the input port data to obtain weighted features; the LSTM network module is used to extract time series features from the weighted features to obtain high-dimensional sequence features; the attention fusion module includes: a local attention submodule and a feature attention submodule; the attention fusion module is used to use the local attention submodule and the feature attention submodule respectively according to the high-dimensional sequence features to obtain time attention features and feature attention features, and fuse the time attention features and the feature attention features to obtain fused features; the prediction module is used to output a load forecasting result based on the fused features; Obtain real-time port data and use the trained load forecasting model to perform load forecasting.
2. The method for predicting the coordinated load of port energy and operation systems according to claim 1, characterized in that: The acquisition of historical port data organized in chronological order further includes: The historical port data is preprocessed; the data preprocessing includes: timestamp alignment and merging processing, outlier cleaning, data smoothing processing, time attribute extraction, sine and cosine transform encoding and sliding window processing.
3. The method for predicting the coordinated load of port energy and operation systems according to claim 2, characterized in that: The data smoothing process adopts the exponential weighted moving average method.
4. The method for predicting the coordinated load of port energy and operation systems according to claim 1, characterized in that: The feature gating mechanism module uses a label encoder and a Gaussian error linear unit as the activation function to normalize and smooth the nonlinear mapping of the input port data.
5. The method for predicting the coordinated load of port energy and operation systems according to claim 1, characterized in that: The LSTM network module uses the BiLSTM network.
6. The method for predicting the coordinated load of port energy and operation systems according to claim 5, characterized in that: The BiLSTM network is a two-layer stack, and the dimension of hidden units in each layer is 256.
7. The method for predicting the coordinated load of port energy and operation systems according to claim 1, characterized in that: The prediction module uses noise reparameterization technology.
Citation Information
Cited By
Load demand prediction method based on space-time attention LSTM, model and construction method
CN121546554A