A method for predicting railway coal transportation volume based on the Informer model
By using the Informer model and an improved loss function, combined with a self-attention distillation module, the accuracy problem of railway coal transportation volume prediction was solved, the prediction accuracy was improved, and efficient scheduling of railway operations was achieved.
Patent Information
- Application Number
- CN202310292221.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2043-03-23
AI Technical Summary
Existing technologies make it difficult to accurately predict railway coal transport volumes, affecting the efficiency of railway operation scheduling.
The Informer model is used to train railway transportation data. By using an improved loss function and activation function, combined with a multi-head ProbSparse self-attention module and a self-attention distillation module, time series features are extracted to predict coal transportation volume.
This improved the accuracy of railway coal transport volume forecasting and enabled the efficient use of railway resources.
Smart Images

Figure CN116307207B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of coal transportation volume prediction technology, and in particular to a method for predicting railway coal transportation volume based on the Informer model. Background Technology
[0002] Coal rail transport refers to the transportation of coal using railway cars along railway lines. Railways offer large transport capacity, high train loads, and operate around the clock, making them ideal for transporting bulk coal. All coal-producing countries worldwide have developed railway coal transport. In China, railways are the mainstay of coal transport, accounting for the largest share among various modes of coal transportation; coal has consistently maintained a high proportion in railway freight volume. Knowing the coal transport volume by rail in advance allows for efficient railway operation planning. Summary of the Invention
[0003] The purpose of this invention is to improve the accuracy of railway coal transportation volume prediction and to provide a railway coal transportation volume prediction method based on the Informer model.
[0004] To achieve the above-mentioned objectives, the embodiments of the present invention provide the following technical solutions:
[0005] A method for predicting railway coal transportation volume based on the Informer model includes the following steps:
[0006] Step 1: Organize railway transportation data samples as a training set, and add labels to the training set according to the coal transportation volume at each time to form a time series training set;
[0007] Step 2: Extract sample features from the time series training set and train the Informer neural network model;
[0008] Step 3: Perform inverse normalization on the predicted coal transportation volume output by the Informer neural network model to obtain the final coal transportation volume.
[0009] Furthermore, the railway transportation data sample includes historical railway coal production, coal prices, historical coal transportation volume, coal transportation time, and transportation costs; this is organized into a training set x at time i. i = {Pi, Price, Trans, Time, Money}, where Pi represents the historical coal production of railways, Price represents the coal price, Trans represents the historical coal transportation volume, Time represents the coal transportation time, and Money represents the transportation cost, i = 1, 2, ..., t, and there are t time points in total;
[0010] Form a time series training set X = {x1, x2, ..., x} t}
[0011] Furthermore, the step of extracting sample features from the time series training set and training the Informer neural network model includes:
[0012] A unit vector (w1, w2, w3, w4, w5) of length 1 is obtained through a fully connected loop;
[0013] Compare the unit vector with the training set x i Perform a dot product on {Pi, Price, Trans, Time, Money} to obtain the vector (v1, v2, v3, v4, v5), then pass it through a fully connected layer to obtain the input Th of the Informer neural network model at time i. i-input ;
[0014] The amount of coal transported at time i, y i As the output of the Informer neural network model, the Informer neural network model is trained until the training reaches the preset step size or the model converges, thus obtaining the trained Informer neural network model.
[0015] Furthermore, the predictive loss function L of the aforementioned Informer neural network model pre for:
[0016]
[0017] Among them, y i Let be the actual value of coal transportation volume at time i. Let be the predicted value of coal transportation volume at time i.
[0018] Furthermore, the reconstructive loss function L of the aforementioned Informer neural network model rec for:
[0019]
[0020] Where j represents the j-th railway transportation data sample, J = 5; This represents the influence function of the j-th railway transportation data sample. This represents the j-th railway transportation data sample and its corresponding true value y for coal transportation volume. i The extent of the impact, compared with the forecast value of coal transportation volume. The difference between the degree of influence; This represents the L2 norm.
[0021] Furthermore, the memory loss function L of the aforementioned Informer neural network model rem for:
[0022]
[0023] Among them, y max y represents the maximum coal transport volume. i,max This represents the maximum coal transport volume at time i.
[0024] Furthermore, the total loss function L of the Informer neural network model is:
[0025] L = L pre +γ·L rec +ε·L rem
[0026] Where γ represents the amplification factor and ε represents the penalty factor.
[0027] Furthermore, the amount of coal transported at time i is y i As the output of the Informer neural network model, the steps for training the Informer neural network model include:
[0028] The Informer neural network model includes an encoder and a decoder. The encoder includes a multi-head ProbSparse self-attention module and a self-attention distillation module.
[0029] Th i-input The input encoder undergoes the following processing:
[0030]
[0031] in, This represents the output of the (j+1)th layer self-attention distillation module. represents the output of the self-attention distillation module in layer j; Conv1D represents a one-dimensional convolution in the time dimension; Softplus represents the activation function; MaxPool represents the max pooling downsampling operation;
[0032] The input to the decoder is:
[0033]
[0034] in, This represents the input to the decoder. Indicates the start character, Indicates a placeholder for the decoder's prediction; L token L represents the length of the input sequence. y d represents the predicted sequence length. model Indicates the model dimension; Concat indicates the concatenation operation.
[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0036] This invention uses an Informer neural network model to improve the accuracy of coal transportation volume prediction. The improved loss function constrains and analyzes relevant data in the coal transportation scenario from multiple aspects, and the improved activation function improves prediction accuracy, thereby achieving efficient use of railway resources. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart of the method of the present invention;
[0039] Figure 2 This is a schematic diagram illustrating the extraction of sample features according to an embodiment of the present invention;
[0040] Figure 3 This is a schematic diagram of the informer neural network model structure according to an embodiment of the present invention. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0042] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, the terms "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance, or suggesting any such actual relationship or order between these entities or operations. Additionally, the terms "connected," "linked," etc., can refer to a direct connection between elements or an indirect connection via other elements.
[0043] Example:
[0044] This invention is achieved through the following technical solutions, such as... Figure 1 As shown, a method for predicting railway coal transportation volume based on the Informer model includes the following steps:
[0045] Step 1: Organize railway transportation data samples as a training set, and add labels to the training set according to the coal transportation volume at each time to form a time series training set.
[0046] The railway transportation data sample includes historical railway coal production, coal prices, historical coal transportation volume, coal transportation time, and transportation costs; organized into a training set x at time i. i = {Pi, Price, Trans, Time, Money}, where Pi represents historical coal production by rail, Price represents coal price, Trans represents historical coal transport volume, Time represents coal transport time, and Money represents transport cost, i = 1, 2, ..., t, and there are t time points. Form a time series training set X = {x1, x2, ..., xt}. t}, the amount of coal transported at time i is y i As training set x i The tag.
[0047] Step 2: Extract sample features from the time series training set and train the Informer neural network model.
[0048] Please see Figure 2 A unit vector (w1, w2, w3, w4, w5) of length 1 is obtained through a fully connected layer. This unit vector is then linked to the training set x. i Perform a dot product on {Pi, Price, Trans, Time, Money} to obtain the vector (v1, v2, v3, v4, v5), then pass it through a fully connected layer to obtain the input Th of the Informer neural network model at time i. i-input In other words, the extracted sample features.
[0049] The input Th at time i i-input The corresponding label yi, i.e., the coal transportation volume yi, is used as the output of the Informer neural network model. The Informer neural network model is trained until the training completes the preset step size or the model reaches convergence, and the trained Informer neural network model is obtained.
[0050] For details, please see Figure 3The Informer neural network model includes an encoder and a decoder. The encoder includes a multi-head ProbSparse self-attention module and a self-attention distillation module. After extracting features from a long-sequence time-series training set X at multiple time points, the samples are input into the encoder. With limited memory, the self-attention distillation module halves the number of features at a single layer in the time dimension, allowing the encoder to process longer sequence inputs. Since the ProbSparse self-attention module results in redundant combinations of values V in the encoder's feature maps, distillation is used to assign higher weights to dominant attention features and generate self-attention feature maps in the next layer.
[0051] Th i-input The distillation process from layer j to layer j+1 in the input encoder is as follows:
[0052]
[0053] in, This represents the output of the (j+1)th layer self-attention distillation module. `j` represents the output of the self-attention distillation module in layer j; `Conv1D` represents a one-dimensional convolution in the time dimension; `Softplus` represents the activation function; and `MaxPool` represents the max-pooling downsampling operation. Using `Softplus` instead of `ELU` as the activation function more closely resembles the activation model of brain neurons, thereby improving the model's accuracy. To enhance the robustness of the attention distillation mechanism, multiple half-length copies of the main sequence are constructed. These copy sequences undergo the same attention distillation mechanism as the main sequence, thus constructing multiple feature maps of length L / 4. These feature maps are then concatenated to form the final feature map of the input encoder.
[0054] The decoder employs batch generative prediction to directly output multi-step prediction results. Through a single forward pass, it predicts all outputs of a long sequence, avoiding the propagation of accumulated errors during the prediction phase. The decoder's input is:
[0055]
[0056] in, This represents the input to the decoder. Indicates the start character, Indicates a placeholder for the decoder's prediction; L token L represents the length of the input sequence. y d represents the predicted sequence length. modelThis indicates the model dimension; Concat represents the concatenation operation. The original single "token" is expanded into a generative approach, dynamically sampling portions of the input sequence closest to the prediction target as "tokens." This improves output efficiency through multiple outputs and computational methods.
[0057] As another implementation method, the high-frequency components can be extracted using any one of the following methods: singular value decomposition, wavelet analysis, or Fourier transform, and then a Maxpool operation can be performed.
[0058]
[0059] or:
[0060]
[0061] Here, SVD and Fourier represent singular value decomposition and Fourier transform, respectively. Taking the SVD method as an example, the result of the SoftPlus function is a one-dimensional array. A Hankel matrix (denoted by H) is constructed from the one-dimensional array. Singular value decomposition is performed on the H matrix. A threshold T is set, and a one-dimensional vector is reconstructed using eigenvalues with eigenvalues greater than T and eigenvectors. The reconstructed one-dimensional vector is then used as the object of MaxPool operation, that is, a max pooling operation is performed on the reconstructed one-dimensional vector.
[0062] The total loss function L of the informer neural network model is:
[0063] L = L pre +γ·L rec +ε·L rem
[0064] Where γ represents the amplification factor and ε represents the penalty factor; L pre L represents the predictive loss function. rec L represents the reconstructive loss function. rem This represents the memory loss function.
[0065] The predictive loss function L pre for:
[0066]
[0067] Among them, y i Let be the actual value of coal transportation volume at time i. Let be the predicted coal transportation volume at time i. The predictive loss function is used to constrain the true value of the model output by inputting the true value of the model.
[0068] The reconstructive loss function L rec for:
[0069]
[0070] Where j represents the j-th railway transportation data sample, J = 5; This represents the influence function of the j-th railway transportation data sample. This represents the j-th railway transportation data sample and its corresponding true value y for coal transportation volume. i The extent of the impact, compared with the forecast value of coal transportation volume. The difference between the degree of influence; Let represent the L2 norm. j=1 represents the historical coal production volume Pi by rail, j=2 represents the coal price Price, j=3 represents the historical coal transport volume Trans, j=4 represents the coal transport time Time, and j=5 represents the transport cost Money. The reconstructive loss function is used to analyze the impact of each factor (i.e., the rail transport data sample) on the coal transport volume.
[0071] The memory loss function L rem for:
[0072]
[0073] Among them, y max y represents the maximum coal transport volume. i,max Let represent the maximum coal transport volume at time i. Considering transportation safety, a maximum coal transport volume is set; it cannot be assumed that a larger transport volume is always better. Therefore, a memory loss function is used to constrain the predicted coal transport volume.
[0074] Step 3: Perform inverse normalization on the predicted coal transportation volume output by the Informer neural network model to obtain the final coal transportation volume.
[0075] Real-time railway transportation data is acquired as a test set to predict the trained Informer neural network model, thus eliminating the adverse effects of outlier data on prediction performance. After the final prediction results are obtained, inverse normalization is performed to restore the predicted values to the original data, facilitating further analysis of the prediction performance and obtaining the final coal transportation volume.
[0076] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting railway coal transportation volume based on the Informer model, characterized in that: Includes the following steps: Step 1: Organize railway transportation data samples as a training set, and add labels to the training set according to the coal transportation volume at each time to form a time series training set; The railway transportation data sample includes historical railway coal production, coal prices, historical coal transportation volume, coal transportation time, and transportation costs; organized into a training set x at time i. i ={Pi,Price,Trans,Time,Money}, where Pi represents the historical coal production of railways, Price represents the coal price, Trans represents the historical coal transportation volume, Time represents the coal transportation time, and Money represents the transportation cost, i=1,2,...,t, and there are t time points in total; Form a time series training set X={x1,x2,...,x t }; Step 2: Extract sample features from the time series training set and train the Informer neural network model; The step of extracting sample features from the time series training set and training the Informer neural network model includes: A unit vector (w1, w2, w3, w4, w5) of length 1 is obtained through a fully connected loop; Compare the unit vector with the training set x i Perform a dot product on {Pi, Price, Trans, Time, Money} to obtain the vector (v1, v2, v3, v4, v5), then pass it through a fully connected layer to obtain the input Th of the Informer neural network model at time i. i-input ; The amount of coal transported at time i, y i As the output of the Informer neural network model, the Informer neural network model is trained until the training completes at the preset step size or the model reaches convergence, thus obtaining the trained Informer neural network model. The predictive loss function L of the informer neural network model pre for: in, Let be the actual value of coal transportation volume at time i. Let be the predicted value of coal transportation volume at time i. The reconstructive loss function L of the Informer neural network model rec for: Where j represents the j-th railway transportation data sample, J=5; This represents the influence function of the j-th railway transportation data sample. This represents the j-th railway transportation data sample and its representation of the true value of coal transportation volume. The extent of the impact, compared with the forecast value of coal transportation volume. The difference between the degree of influence; Represents the L2 norm; The memory loss function L of the Informer neural network model rem for: in, This indicates the maximum coal transport volume. This represents the maximum coal transport volume at time i. The total loss function L of the informer neural network model is: in, Indicates the magnification factor. Indicates the penalty factor; The amount of coal transported at time i is y i As the output of the Informer neural network model, the steps for training the Informer neural network model include: The Informer neural network model includes an encoder and a decoder. The encoder includes a multi-head ProbSparse self-attention module and a self-attention distillation module. Th i-input The input encoder undergoes the following processing: in, This represents the output of the (j+1)th layer self-attention distillation module. represents the output of the self-attention distillation module in layer j; Conv1D represents a one-dimensional convolution in the time dimension; Softplus represents the activation function; MaxPool represents the max pooling downsampling operation; The input to the decoder is: in, This represents the input to the decoder. Indicates the start character, Placeholders indicating the decoder's prediction; Indicates the length of the input sequence. Indicates the predicted sequence length. Indicates the model dimension; Concat indicates the concatenation operation; Step 3: Perform inverse normalization on the predicted coal transportation volume output by the Informer neural network model to obtain the final coal transportation volume.
Citation Information
Patent Citations
Method for improving fuel economy test precision in on-road vehicles
US20180052025A1