Product oil demand degree prediction method and device based on multi-factor variable deep learning
By adopting the multi-factor variable deep learning method in the demand prediction of refined oil, a multi-factor variable prediction long and short-term memory network is constructed, which solves the problems of dealing with nonlinear relationships and long-term dependence in the existing technology, and achieves efficient and accurate demand prediction, improving system performance and cost-effectiveness.
Patent Information
- Application Number
- CN202510164757.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-07-01
AI Technical Summary
When predicting the demand for refined oil, the prior art is difficult to deal with complex nonlinear relationships and long-term dependence problems, poor computing power, unsuitable for large-scale data processing, low degree of automation, high system cost, and low prediction efficiency and accuracy.
The demand prediction method for refined oil based on deep learning based on multi-factor variables is adopted. By constructing a multi-factor variable prediction long and short-term memory network (MFVP-LSTM), including the first long and short-term memory network based on the adaptive attention mechanism and the second long and short-term memory network based on the enhanced information gating mechanism, combined with the full connection layer, the demand prediction is carried out in combination with multi-factor variables and massive data.
This method can more comprehensively capture the inherent laws of demand fluctuations, accurately and efficiently capture complex time series patterns, improve data utilization, system computing power and automation, thereby improving prediction efficiency and accuracy, and saving system costs.
Smart Images

Figure CN120235641A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, in particular to the field of artificial intelligence technology, and more particularly to a method and device for predicting the demand degree of refined oil based on multi-factor variable deep learning. Background Art
[0002] In modern development, refined oil, as an important energy resource, the prediction of its demand degree is of great significance to enterprise operation. In related technologies, linear regression and time series analysis are used for demand prediction. Although these methods can capture the trend of sales volume changes to a certain extent, they often have difficulty in dealing with complex non-linear relationships and long-term dependence problems; the computing power is poor, not suitable for large-scale data processing, the degree of automation is low, the system cost is high, and the prediction efficiency is poor; traditional methods analyze single factors, and the data utilization rate is low, resulting in low prediction accuracy. Summary of the Invention
[0003] An object of the present invention is to provide a method for predicting the demand degree of refined oil based on multi-factor variable deep learning, which can more comprehensively capture the internal law of demand degree fluctuations, accurately and efficiently capture complex time series patterns, and realize the accurate prediction of the demand degree of refined oil through a prediction model based on deep learning that synthesizes multi-factor variables and massive data, improving the data utilization rate, system computing power and degree of automation, thereby enhancing the prediction efficiency and accuracy and saving system costs. Another object of the present invention is to provide a device for predicting the demand degree of refined oil based on multi-factor variable deep learning. Still another object of the present invention is to provide a computer-readable medium. Yet another object of the present invention is to provide a computer device.
[0004] To achieve the above objectives, on the one hand, the present invention discloses a method for predicting the demand degree of refined oil based on multi-factor variable deep learning, including:
[0005] According to the obtained historical sales volume dataset, historical environment dataset and historical price adjustment fluctuation dataset of refined oil, a multi-factor variable prediction long short-term memory network is constructed to obtain a refined oil demand degree prediction model. The multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer and a second fully connected layer;
[0006] Obtain the target sales volume data, target key information of refined oil in a specified time period before the date to be predicted, and the current key information of the date to be predicted;
[0007] Through the refined oil demand degree prediction model, demand prediction is performed according to the historical sales volume data, historical key information and current key information of refined oil, and the demand degree of refined oil on the date to be predicted is generated.
[0008] Optionally, based on the obtained historical sales volume dataset, historical environment dataset, and historical price adjustment fluctuation dataset of refined oil products, construct a multi-factor variable prediction long short-term memory network to obtain a refined oil demand degree prediction model, including:
[0009] Analyze the influencing factors of the historical sales volume dataset to generate short-term influencing factors;
[0010] Perform price correction based on the historical price adjustment fluctuation dataset and the historical sales volume dataset to generate a corrected discount amount;
[0011] Determine the short-term influencing factors, historical environment dataset, corrected discount amount, and historical price adjustment fluctuation dataset as the historical key information set;
[0012] Based on the historical key information set and the historical sales volume dataset, train the multi-factor variable prediction long short-term memory network to generate a refined oil demand degree prediction model.
[0013] Optionally, analyze the influencing factors of the historical sales volume dataset to generate short-term influencing factors, including:
[0014] Based on the historical sales volume dataset, draw a historical sales volume time series diagram;
[0015] Perform Fourier transform on the historical sales volume time series diagram to generate short-term influencing factors.
[0016] Optionally, perform price correction based on the historical price adjustment fluctuation dataset and the historical sales volume dataset to generate a corrected discount amount, including:
[0017] Perform linear regression analysis based on the historical price adjustment fluctuation dataset and the historical sales volume dataset to generate price sensitivity and quantity-price relationship equations;
[0018] Determine the corrected discount amount through the price sensitivity and quantity-price relationship equations.
[0019] Optionally, based on the historical key information set and the historical sales volume dataset, train the multi-factor variable prediction long short-term memory network to generate a refined oil demand degree prediction model, including:
[0020] Process and encode the historical key information set and the historical sales volume dataset to generate a feature dataset;
[0021] According to the preset division ratio, divide the feature dataset into a training dataset and a test dataset;
[0022] Through the training dataset, train the multi-factor variable prediction long short-term memory network to construct an initial prediction model;
[0023] Optimize the model parameters of the initial prediction model according to the test data set through a preset loss function to generate a refined oil demand prediction model.
[0024] Optionally, through the refined oil demand prediction model, perform demand prediction based on the historical sales data, historical key information, and current key information of refined oil to generate the refined oil demand for the date to be predicted, including:
[0025] Through the first long short-term memory network based on the adaptive attention mechanism, perform attention weighted calculation according to the characteristics of historical key information and output the first encoded feature;
[0026] Through the second long short-term memory network based on the enhanced information gating mechanism, perform enhanced gate mapping according to the characteristics of the first encoded feature and historical sales data and output the second encoded feature;
[0027] Through the first fully connected layer, calculate the second encoded feature to generate a feature vector;
[0028] Through the second fully connected layer, calculate the feature vector and the current key information to generate the refined oil demand for the date to be predicted.
[0029] The present invention also discloses a refined oil demand prediction device based on multi-factor variable deep learning, including:
[0030] A prediction model construction unit for constructing a model of a preset multi-factor variable prediction long short-term memory network according to the obtained historical sales data set, historical environment data set, and historical price adjustment fluctuation data set of refined oil to obtain a refined oil demand prediction model, where the multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer, and a second fully connected layer;
[0031] A data acquisition unit for acquiring the target sales data, target key information of refined oil for a specified time period before the date to be predicted, and the current key information of the date to be predicted;
[0032] A demand prediction unit for performing demand prediction through the refined oil demand prediction model according to the historical sales data, historical key information, and current key information of refined oil to generate the refined oil demand for the date to be predicted.
[0033] Preferably, the prediction model construction unit is specifically configured to perform an impact factor analysis on the historical sales data set to generate short-term impact factors; perform price correction based on the historical price adjustment fluctuation data set and the historical sales data set to generate a corrected discount amount; determine the short-term impact factors, the historical environment data set, the corrected discount amount, and the historical price adjustment fluctuation data set as the historical key information set; and perform model training on the multi-factor variable prediction long short-term memory network according to the historical key information set and the historical sales data set to generate a refined oil demand prediction model.
[0034] Preferably, the prediction model construction unit is specifically configured to draw a historical sales time series graph based on the historical sales data set; perform Fourier transform on the historical sales time series graph to generate short-term impact factors.
[0035] Preferably, the prediction model construction unit is specifically configured to perform linear regression analysis based on the historical price adjustment fluctuation data set and the historical sales data set to generate a price sensitivity and a quantity-price relationship equation; and determine the corrected discount amount through the price sensitivity and the quantity-price relationship equation.
[0036] Preferably, the prediction model construction unit is specifically configured to process and encode the historical key information set and the historical sales data set to generate a feature data set; divide the feature data set into a training data set and a test data set according to a preset division ratio; perform model training on the multi-factor variable prediction long short-term memory network through the training data set to construct an initial prediction model; and optimize the model parameters of the initial prediction model according to the test data set through a preset loss function to generate a refined oil demand prediction model.
[0037] Preferably, the demand prediction unit is configured to perform attention weighted calculation based on the features of the historical key information through a first long short-term memory network based on an adaptive attention mechanism, and output a first encoded feature; perform enhanced gate mapping based on the first encoded feature and the features of the historical sales data through a second long short-term memory network based on an enhanced information gating mechanism, and output a second encoded feature; calculate the second encoded feature through a first fully connected layer to generate a feature vector; and calculate the feature vector and the current key information through a second fully connected layer to generate the refined oil demand degree of the date to be predicted.
[0038] The present invention also discloses a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method is implemented.
[0039] The present invention also discloses a computer device, including a memory and a processor, the memory is used to store information including program instructions, the processor is used to control the execution of the program instructions, and when the processor executes the program, the above-mentioned method is implemented.
[0040] The present invention also discloses a computer program product, including computer programs / instructions, which, when executed by a processor, implement the method as described above.
[0041] Based on the obtained historical sales volume dataset, historical environment dataset, and historical price adjustment fluctuation dataset of refined oil products, the present invention constructs a model for a multi-factor variable prediction long short-term memory network to obtain a refined oil demand degree prediction model. The multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer, and a second fully connected layer; obtaining the target sales volume data, target key information of refined oil products in a specified time period before the date to be predicted, and the current key information of the date to be predicted; through the refined oil demand degree prediction model, demand prediction is performed according to the historical sales volume data, historical key information, and current key information of refined oil products to generate the refined oil demand degree of the date to be predicted, which can more comprehensively capture the internal law of demand degree fluctuations, accurately and efficiently capture complex time series patterns, and realize accurate prediction of the refined oil demand degree through a prediction model based on deep learning that synthesizes multi-factor variables and massive data, improving data utilization rate, system computing power, and automation degree, thereby enhancing prediction efficiency and accuracy and saving system costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0043] Figure 1 It is a flowchart of a method for predicting the demand degree of refined oil products based on multi-factor variable deep learning provided by an embodiment of the present invention;
[0044] Figure 2 It is a flowchart of another method for predicting the demand degree of refined oil products based on multi-factor variable deep learning provided by an embodiment of the present invention;
[0045] Figure 3 It is a flowchart of an influencing factor analysis provided by an embodiment of the present invention;
[0046] Figure 4 It is a flowchart of a method for correcting the price of refined oil products provided by an embodiment of the present invention;
[0047] Figure 5 It is a flowchart of training a refined oil demand degree prediction model provided by an embodiment of the present invention;
[0048] Figure 6 Schematic diagram of the structure of an MFVP-LSTM model provided by an embodiment of the present invention;
[0049] Figure 7 Schematic diagram of the structure of a first long short-term memory network based on an adaptive attention mechanism provided by an embodiment of the present invention;
[0050] Figure 8 Schematic diagram of the structure of a second long short-term memory network based on an enhanced information gating mechanism provided by an embodiment of the present invention;
[0051] Figure 9 Schematic diagram for comparing prediction effects provided by an embodiment of the present invention;
[0052] Figure 10 Schematic diagram of the structure of a device for predicting refined oil demand based on multi-factor variable deep learning provided by an embodiment of the present invention;
[0053] Figure 11 Schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Detailed implementation manners
[0054] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0055] It should be noted that a method and a device for predicting refined oil demand based on multi-factor variable deep learning disclosed in this application can be used in the field of artificial intelligence technology, and can also be used in any field other than the field of artificial intelligence technology. The application field of a method and a device for predicting refined oil demand based on multi-factor variable deep learning disclosed in this application is not limited.
[0056] To facilitate the understanding of the technical solution provided by this application, the relevant content of the technical solution of this application will be described below. LSTM is a special type of Recurrent Neural Network (RNN), which is particularly good at dealing with long-term dependence problems. It can capture the historical patterns of sales data to improve prediction performance and is widely used in fields such as time series prediction and natural language processing. The Multi-Factor Variable Prediction LSTM (MFVP-LSTM) model further enhances the accuracy of refined oil demand prediction by considering multiple input variables (i.e., multiple factors) on this basis. First, the influencing factors are analyzed through Fourier transform, and multiple influencing factors (such as seasons, climate, refined oil prices, relevant standard documents, etc.) are introduced; secondly, the price sensitivity is calculated through regression analysis, and the quantity-price relationship is established; finally, the MFVP-LSTM model is designed by combining the quantity-price relationship, influencing factors, and the time series modeling ability of LSTM to more comprehensively capture the internal laws of refined oil demand fluctuations. With the development of big data and artificial intelligence technologies, the refined oil demand prediction method based on MFVP-LSTM provides new opportunities for the intelligent management and optimization of the refined oil industry and promotes the sustainable development of the industry.
[0057] Taking the refined oil demand prediction device based on multi-factor variable deep learning as the execution subject as an example, the implementation process of the refined oil demand prediction method based on multi-factor variable deep learning provided by the embodiments of the present invention will be described. It can be understood that the execution subject of the refined oil demand prediction method based on multi-factor variable deep learning provided by the embodiments of the present invention includes, but is not limited to, the refined oil demand prediction device based on multi-factor variable deep learning.
[0058] Figure 1 The flowchart of a refined oil demand prediction method based on multi-factor variable deep learning provided by the embodiments of the present invention is as Figure 1 shown, and the method includes:
[0059] Step 101, according to the obtained historical sales data set, historical environment data set, and historical price adjustment fluctuation data set of refined oil, construct a model for the preset multi-factor variable prediction long short-term memory network to obtain a refined oil demand prediction model.
[0060] In the embodiments of the present invention, the multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer, and a second fully connected layer.
[0061] Step 102: Obtain the target sales volume data, target key information of refined oil products for a specified time period before the date to be predicted, and the current key information of the date to be predicted.
[0062] In the embodiments of the present invention, the specified time period can be set according to actual needs, and the embodiments of the present invention do not limit this.
[0063] In the embodiments of the present invention, the target sales volume data includes the actual sales volume time series data of refined oil products within the specified time period, and the target key information includes, but is not limited to, the official price adjustment amount, the highest price limit of oil products, temperature, weather, month, week, holiday, season, and correction discount amount for each day within the specified time period. The current key information includes, but is not limited to, the official price adjustment amount, the highest price limit of oil products, temperature, weather, month, week, holiday, season, and correction discount amount on the day to be predicted.
[0064] Step 103: Through the refined oil demand degree prediction model, perform demand prediction according to the historical sales volume data, historical key information, and current key information of refined oil products, and generate the demand degree of refined oil products for the date to be predicted.
[0065] In the embodiments of the present invention, the historical sales volume data, historical key information, and current key information of refined oil products are input into the refined oil demand degree prediction model for demand prediction, and the demand degree of refined oil products for the date to be predicted is output.
[0066] In the technical solution provided by the embodiments of the present invention, according to the obtained historical sales volume data set, historical environment data set, and historical price adjustment fluctuation data set of refined oil products, a preset multi-factor variable prediction long short-term memory network is constructed to obtain a refined oil demand degree prediction model. The multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer, and a second fully connected layer; obtain the target sales volume data, target key information of refined oil products for a specified time period before the date to be predicted, and the current key information of the date to be predicted; through the refined oil demand degree prediction model, perform demand prediction according to the historical sales volume data, historical key information, and current key information of refined oil products, and generate the demand degree of refined oil products for the date to be predicted, which can more comprehensively capture the internal law of demand degree fluctuation, accurately and efficiently capture complex time series patterns, and realize the accurate prediction of refined oil demand degree through a prediction model based on deep learning that synthesizes multi-factor variables and massive data, improving data utilization rate, system computing power, and automation degree, thereby improving prediction efficiency and accuracy and saving system costs.
[0067] Figure 2 It is a flowchart of another refined oil demand degree prediction method based on multi-factor variable deep learning provided by the embodiments of the present invention. As Figure 2 shown, this method includes:
[0068] Step 201: Analyze the influencing factors of the historical sales dataset to generate short-term influencing factors.
[0069] In the embodiments of the present invention, each step is executed by a refined oil demand prediction device based on multi-factor variable deep learning.
[0070] Figure 3 It is a flowchart of an influencing factor analysis provided by the embodiments of the present invention. As Figure 3 shown, step 201 specifically includes:
[0071] Step 2011: Draw a historical sales time series graph based on the historical sales dataset.
[0072] In the embodiments of the present invention, the historical sales dataset can be exported from an enterprise resource planning (ERP) system. The historical sales dataset includes historical dates and the corresponding daily historical sales of refined oil. Considering the characteristics of ERP sales data accounting, the exported sales date corresponds to the actual sales of the previous day, and at the same time, some abnormal data caused by accounting problems is cleaned. Specifically, a historical sales time series graph is drawn according to the historical dates and the corresponding historical sales of refined oil. The historical sales time series graph can be a historical sales time series curve, and the operation and maintenance personnel can observe the trend of sales over time through the historical sales time series curve.
[0073] In the embodiments of the present invention, the historical sales time series curve is composed of a long-term periodic regular change curve, a short-term periodic regular change curve, and an irregular fluctuation curve superimposed.
[0074] Step 2012: Perform Fourier transform on the historical sales time series graph to generate short-term influencing factors.
[0075] Specifically, the historical sales time series graph is transformed through Fourier transform to obtain a sales frequency spectrum graph; the results of the frequency spectrum graph obtained through Fourier transform show that the long-term periodic regular changes mainly occur on an annual basis; the short-term periodic regular change curve mainly changes in cycles of 30 days, 15 days, and 7 days; according to the sales frequency spectrum graph, long-term influencing factors and short-term influencing factors are determined. The high-frequency part of the frequency spectrum graph is mainly the long-term fluctuations, while the middle and low-frequency parts are mainly the monthly and weekly fluctuation cycles, that is, the short-term fluctuations.
[0076] In the embodiments of the present invention, combined with the actual situation of the sales enterprise, statistical methods are used for analysis. The long-term influencing factors include but are not limited to macro factors such as the penetration rate of new energy vehicles. The long-term macro factors are contained in the historical sales; the short-term influencing factors include but are not limited to months, weeks, holidays, and seasons. The short-term periodic regular change curve is mainly affected by weekends and weekdays, seasons and months, and the irregular fluctuation curve is mainly affected by short-term factors such as weather, oil price adjustment, and price discounts.
[0077] Step 202: Perform price correction based on the historical price adjustment fluctuation dataset and the historical sales volume dataset to generate a corrected discount amount.
[0078] Figure 4 The figure shows a flowchart for price correction of refined oil provided by an embodiment of the present invention. As Figure 4 shown, step 202 specifically includes:
[0079] Step 2021: Perform linear regression analysis based on the historical price adjustment fluctuation dataset and the historical sales volume dataset to generate a price sensitivity and a quantity-price relationship equation.
[0080] In the embodiment of the present invention, the historical price adjustment fluctuation dataset can be exported from the zero-pipe system. The historical price adjustment fluctuation dataset is a set of price adjustment data in the time period corresponding to the historical sales volume dataset. The price adjustment data includes the price adjustment notice date and the daily maximum price limit of the oil product.
[0081] Specifically, through linear regression analysis, the influence degree of historical price adjustment on the price adjustment notice day and the price adjustment day is statistically obtained, and the sum of the regression equations is used to obtain the quantity-price relationship equation; the coefficient in the quantity-price relationship equation is determined as the price sensitivity.
[0082] Step 2022: Determine the corrected discount amount through the price sensitivity and the quantity-price relationship equation.
[0083] In the embodiment of the present invention, the actual sales discount price of refined oil is corrected according to the quantity-price relationship equation and the price sensitivity. As an alternative solution, through the quantity-price relationship equation, the expected sales volume is generated according to the current price of refined oil; through the marginal revenue equation, the marginal revenue corresponding to different price points is calculated according to the expected sales volume and the preset different price points; by comparing the marginal revenues corresponding to different price points, the price point corresponding to the highest marginal revenue is determined as the corrected discount amount.
[0084] Step 203: Determine the short-term influencing factors, the historical environment dataset, the corrected discount amount, and the historical price adjustment fluctuation dataset as the historical key information set.
[0085] In the embodiment of the present invention, the short-term influencing factors include but are not limited to months, weeks, holidays, and seasons; the historical environment dataset can be collected from relevant official websites. The historical environment dataset is a set of environmental data in the time period corresponding to the historical sales volume dataset, including but not limited to temperature and weather; the historical price adjustment fluctuation dataset includes the official price adjustment amount.
[0086] Specifically, the short-term influencing factors, historical environment data set, corrected discount amount, and historical price adjustment fluctuation data set are aggregated to generate a historical key information set, which includes the official price adjustment amount, the highest oil price limit, temperature, weather, month, week, holiday, season, and corrected discount amount.
[0087] Step 204: According to the historical key information set and the historical sales data set, train the multi-factor variable prediction long short-term memory network to generate a refined oil demand prediction model.
[0088] Figure 5 The flowchart of training a refined oil demand prediction model provided by an embodiment of the present invention is as Figure 5 shown. Specifically, step 204 includes:
[0089] Step 2041: Process and encode the historical key information set and the historical sales data set to generate a feature data set.
[0090] In the embodiment of the present invention, when processing and encoding the historical key information set and the historical sales data set, specifically, for the original features with the value type of numerical variables, such as temperature, price discount, month, etc., in order to eliminate the influence of different scale value ranges existing in different features, normalization is used for processing; since temperature and price discount have positive and negative values, they are normalized to -1 to 1; since month, week, the highest price limit, and historical sales are all positive, they are normalized to 0 to 1. For features without a numerical size relationship in the label, such as holidays and weather, one-hot encoding is used for encoding.
[0091] In the embodiment of the present invention, the feature data set includes the normalized features and the one-hot encoded features.
[0092] Step 2042: Divide the feature data set into a training data set and a test data set according to a preset division ratio.
[0093] In the embodiment of the present invention, the division ratio can be set according to actual needs, and the embodiment of the present invention does not limit this. As an optional solution, the division ratio between the training data set and the test data set is set to 8:2.
[0094] Step 2043: Through the training data set, train the MFVP-LSTM to construct an initial prediction model.
[0095] Specifically, input the training data set into the MFVP-LSTM for model training to construct an initial prediction model.
[0096] In the embodiments of the present invention, MFVP-LSTM includes two LSTM structures designed for the demand prediction problem, namely, LSTM combined with adaptive attention and enhanced information gating mechanism hk and LSTM sd And two fully connected layers encode the features extracted by LSTM and output the demand prediction result; By analysis, the factors affecting sales include short-term sudden factors (irregular fluctuations), short-term periodic factors, and long-term macro factors. The historical key information is mainly the short-term factors mentioned above, and their changes will affect sales within a short period of time. Therefore, they are first input into the first LSTM to extract features. Then, considering that the long-term macro factors are contained in the historical sales volume, the output features of the first LSTM hk are input into the second LSTM together with the historical sales volume sd to further extract features, and then through the fully connected layer combined with the key information on the prediction day to obtain the final predicted demand
[0097] Figure 6 FIG. is a schematic structural diagram of an MFVP-LSTM model provided by an embodiment of the present invention. As Figure 6 shown, the MFVP-LSTM model includes a first long short-term memory network LSTM based on an adaptive attention mechanism hk and a second long short-term memory network LSTM based on an enhanced information gating mechanism sd and two fully connected layers. As Figure 6 shown, the historical key information (dimension [batch_size, m, 21]) is input into LSTM hk , and LSTM hk encodes it and outputs the first training encoded feature The first training encoded feature is jointly input into LSTM with the historical sales volume set (dimension [batch_size, m, 1]) sd , and LSTM sd encodes it and outputs the second training encoded feature and flattens it into dimension [batch_size, m×hidden_size]; The second training encoded feature is input into the first fully connected layer to output a training vector; The training vector and the current key information k n (dimension [batch_size, 1×21]) are concatenated by channels and input into the second fully connected layer for calculation, and the predicted demand s n is output
[0098] It should be noted that during the training process, the hidden state is LSTMhk The output at each time step t, which contains the information of the current time step and the memory of the previous time steps; the cell state is the core component of the LSTM hk and is responsible for storing information on long-term dependencies.
[0099] It should be noted that during the training process is the LSTM sd The output at each time step t, which contains the information of the current time step and the memory of the previous time steps; the cell state is the core component of the LSTM sd and is responsible for storing information on long-term dependencies.
[0100] Formal expression of the overall structure of the MFVP-LSTM model:
[0101] s n = F(x n , x n-1 , …, x n-m-1 ; y n-1 , …, y n-m-1 )
[0102] where s n represents the demand degree prediction result, F represents the model, x n … x n-m-1 represents the microscopic explicit factors (the key information k is some of the main influencing factors), and y n-1 … y n-m-1 is the macroscopic implicit factor. Since the macroscopic implicit factor has been characterized in the historical sales volume, the above formula can be expanded as s n = F(x n , x n-1 , …, x n-m-1 ; s n-1 , …, s n-m-1 ) as:
[0103]
[0104] where Sigmoid is the activation function, FC represents the fully connected layer, concat represents the channel concatenation operation, Encoded_Feature represents the feature extracted by two layers of LSTM, s n represents the demand degree prediction result, x n … x n-m-1 represents the microscopic explicit factors, X represents the set of microscopic explicit factors, y n-1 … y n-m-1 represents the macroscopic implicit factors, Y represents the macroscopic implicit factors, s n-1 , …, s n-m-1Denote historical sales data as, and historical sales set as S.
[0105] Step 2044: Optimize the model parameters of the initial prediction model according to the test data set through a preset loss function to generate a refined oil demand prediction model.
[0106] Specifically, input the test data set into the initial prediction model to adjust the model parameters to achieve model optimization, and evaluate the model effect through the loss function. If it meets the expectations, a refined oil demand prediction model is generated.
[0107] In the embodiments of the present invention, the loss function uses two evaluation indicators to evaluate the prediction effect of the refined oil demand prediction model; one intuitive evaluation indicator is the root mean square error; due to different sales scales in different regions, the other evaluation indicator is the average relative error.
[0108] Root mean square error: Since the root mean square error is more sensitive to outliers compared to the mean absolute error; in the problem of refined oil demand prediction, there are sharp fluctuations in demand caused by holidays, price promotions, oil price adjustments, etc., so the root mean square error is needed to measure the prediction effect; the expression of the root mean square error is as follows:
[0109]
[0110] Among them, y i is the predicted value, is the true value, and m is the number of prediction results.
[0111] Average relative error: Since the demand scales in different regions are different, the root mean square error can reflect the magnitude of the prediction error value, while the average relative error can better reflect the prediction accuracy; the expression of the average relative error is as follows:
[0112]
[0113] Among them, y i is the predicted value, is the true value, and m is the number of prediction results.
[0114] Step 205: Obtain the target sales data, target key information of refined oil for a specified time period before the date to be predicted, and the current key information of the date to be predicted.
[0115] In the embodiments of the present invention, the specified time period can be selected according to actual needs, and the embodiments of the present invention do not make any limitations in this regard. The target sales data set can be exported from the enterprise resource planning (ERP) system, and at the same time, some abnormal data caused by accounting problems are cleaned. The target sales data set includes the daily target sales of refined oil for the specified time period.
[0116] In the embodiments of the present invention, the target key information can be obtained from relevant official websites. The target key information includes, but is not limited to, the official price adjustment amount, the highest oil price limit, temperature, weather, month, week, holiday, season, and correction discount amount for each day within a specified time period.
[0117] In the embodiments of the present invention, the current key information can be obtained from relevant official websites. The current key information includes, but is not limited to, the official price adjustment amount, the highest oil price limit, temperature, weather, month, week, holiday, season, and correction discount amount on the day of the date to be predicted.
[0118] Step 206: Through the first long short-term memory network based on the adaptive attention mechanism, perform attention weighting calculation according to the characteristics of historical key information, and output the first encoded feature.
[0119] Figure 7 is a schematic structural diagram of a first long short-term memory network based on the adaptive attention mechanism provided by the embodiments of the present invention. As Figure 7 shown, since the general LSTM does not consider the influence of the hidden state input by the previous unit on the input variables when calculating the state of the new LSTM unit, the first long short-term memory network LSTM based on the adaptive attention mechanism hk introduces an adaptive attention mechanism. By calculating the attention weights, the attention weights are calculated at each time step to highlight important input features, such as the obvious influence of certain promotional activities and seasonal changes; the input features are weighted and input, and the input sequence is dynamically adjusted using the attention weights, so that the model can more flexibly focus on specific time steps related to sales volume.
[0120] LSTM hk The structural formal expression is as follows: where W, U, and b are learnable parameters, k is the feature of the input historical key information, H and C are the hidden state and the cell state, and the initial values of H and C are both 0 at time step 0. Softmax, Sigmoid, and tanh are activation functions.
[0121] The expression of the adaptive attention mechanism is as follows:
[0122] Attention score
[0123]
[0124] Among them, is a learnable parameter, is the feature of the input historical key information, is the hidden state.
[0125] Weighted input
[0126]
[0127] Among them, is the attention score, is the feature of the input historical key information.
[0128] The expressions of the forget gate and the input gate are as follows:
[0129] Forget gate
[0130]
[0131] Among them, is the learnable parameter, is the feature of the input historical key information, is the hidden state.
[0132] Input gate
[0133]
[0134] Among them, is the learnable parameter, is the feature of the input historical key information, is the hidden state, is the weighted input, is the candidate cell state.
[0135] Update the cell state
[0136]
[0137] Among them, is the forget gate, is the cell state, is the input gate, is the candidate cell state.
[0138] The expression for updating the hidden state is as follows:
[0139] Output gate
[0140]
[0141] Among them, is the learnable parameter, is the weighted input, is the hidden state.
[0142] Final hidden state and the first encoded feature of the output
[0143]
[0144] Among them, is the output gate, is the final cell state.
[0145] Step 207: Through the second long short-term memory network based on the enhanced information gating mechanism, perform enhanced gate mapping according to the first encoded feature and the feature of historical sales data, and output the second encoded feature.
[0146] Figure 8 As shown in the structural schematic diagram of the second long short-term memory network based on the enhanced information gating mechanism provided by the embodiment of the present invention, as Figure 8 shown, an enhanced gating mechanism is introduced on the basis of LSTM hk to expand the multiple gating mechanism, and the historical sales volume is input into the model as additional context information to reflect the macro trend of sales volume changes.
[0147] LSTM sd The structural formal expression is as follows: Among them, W, U, V, and b are learnable parameters, d and s are input features, H and C are hidden states and cell states, and the initial values of H and C are all 0 at time step 0, and softmax, Sigmoid, and tanh are activation functions:
[0148] The expression of the adaptive attention mechanism is as follows:
[0149] Attention score
[0150]
[0151] Among them, is a learnable parameter, is the first encoded feature input, is the feature of historical sales data, is the hidden state.
[0152] Weighted input
[0153]
[0154] Among them, is the attention score, is the first encoded feature input.
[0155] The expressions of the forget gate, input gate, and enhanced gate are as follows:
[0156] Forget gate
[0157]
[0158] Among them, is a learnable parameter, is the first encoded feature of the input, is the hidden state, is the feature of historical sales data.
[0159] Input gate
[0160]
[0161] Among them, is a learnable parameter, is the first encoded feature of the input, is the hidden state, is the weighted input, is the candidate cell state, is the feature of historical sales data.
[0162] Enhancement gate
[0163]
[0164] Among them, is a learnable parameter, is the first encoded feature of the input, is the hidden state, is the feature of historical sales data.
[0165] Update cell state
[0166]
[0167] Among them, is the forget gate, is the cell state, is the input gate, is the candidate cell state, is the enhancement gate, is the weighted input.
[0168] The expression for updating the hidden state is as follows:
[0169] Output gate
[0170]
[0171] Among them, is a learnable parameter, is the weighted input, is in the hidden state, is a feature of historical sales data.
[0172] The final hidden state and the output of the second encoded feature
[0173]
[0174] Among them, is the output gate, is the final cell state.
[0175] By introducing an enhancement gate, the present invention enables the model to flexibly process input data, combines additional context information, and thus selects and weights important features. This design enhances the adaptability of the model, improves the understanding of time series changes, and improves the accuracy and robustness of sales prediction in complex scenarios.
[0176] Step 208: Calculate the second encoded feature through the first fully connected layer to generate a feature vector.
[0177] Specifically, input the second encoded feature into the first fully connected layer. The first fully connected layer contains multiple neurons, each of which is fully connected to the input feature. After being processed by the activation function, a feature vector is generated, and the generated feature vector has a higher level of abstraction and better expressive ability.
[0178] Step 209: Calculate the feature vector and the current key information through the second fully connected layer to generate the demand degree of refined oil for the date to be predicted.
[0179] Specifically, splice the feature vector and the current key information by channel to obtain a spliced vector; input the spliced vector into the second fully connected layer. The second fully connected layer contains multiple neurons, each of which is fully connected to the input spliced vector. After being processed by the activation function, the demand degree of refined oil for the date to be predicted is generated.
[0180] Figure 9 is a comparison schematic diagram of the prediction effect provided by the embodiment of the present invention. As Figure 9 shown, the horizontal axis is the time date (from May 3, 2024 to August 13, 2024), the vertical axis is the demand degree, the blue curve is the actual demand degree of refined oil, and the orange curve is the predicted demand degree of refined oil. It can be Figure 9 seen that the prediction result output by the refined oil demand degree prediction model proposed by the present invention is highly consistent with the actual situation and has a high accuracy. The practical application results show that the prediction accuracy of the sales unit demand degree reaches 95%.
[0181] In demand forecasting, it is crucial to capture long-term and short-term dependencies. The adoption of a multiple gate mechanism can effectively manage these dependencies in information flow, while the adaptive attention mechanism enables the model to dynamically adjust its attention to input features, especially factors that have a greater impact during specific time periods (such as promotional activities). By combining these two mechanisms, the model can not only improve its responsiveness to important features but also enhance its robustness, effectively handle noise and irrelevant information, and reduce the risk of overfitting.
[0182] It should be noted that in the technical solution of this application, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of laws and regulations. The user information in the embodiments of this application is obtained through legal and compliant channels, and the acquisition, storage, use, processing, etc. of user information have obtained the authorization and consent of the customers.
[0183] It should be noted that the information collected in this application is information and data authorized by the users or fully authorized by all parties. Moreover, the processing of relevant data, such as collection, storage, use, processing, transmission, provision, disclosure, and application, all complies with the relevant laws, regulations, and standards of relevant countries and regions, takes necessary confidentiality measures, does not violate public order and good customs, and provides corresponding operation entrances for users to choose to authorize or refuse.
[0184] It should be noted that the technical solution provided in this application provides corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making. If the user chooses to refuse, the expert decision-making process will be entered.
[0185] In the technical solution of the refined oil demand forecasting method based on multi-factor variable deep learning provided by the embodiments of the present invention, according to the obtained historical sales dataset, historical environment dataset, and historical price adjustment fluctuation dataset of refined oil, a multi-factor variable prediction long short-term memory network is constructed to obtain a refined oil demand forecasting model. The multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer, and a second fully connected layer. The target sales data, target key information of refined oil for a specified time period before the date to be predicted, and the current key information of the date to be predicted are obtained. Through the refined oil demand forecasting model, demand forecasting is performed according to the historical sales data, historical key information, and current key information of refined oil to generate the refined oil demand for the date to be predicted. It can more comprehensively capture the internal laws of demand fluctuations, accurately and efficiently capture complex time series patterns, and achieve accurate prediction of refined oil demand through a prediction model based on deep learning that integrates multi-factor variables and massive data, improving data utilization rate, system computing power, and automation level, thereby enhancing prediction efficiency and accuracy and saving system costs.
[0186] Figure 10 FIG. 0 is a schematic structural diagram of a device for predicting refined oil demand based on multi-factor variable deep learning according to an embodiment of the present invention. The device is used to execute the method for predicting refined oil demand based on multi-factor variable deep learning, as follows Figure 10 As shown in FIG. 1, the device includes: a prediction model construction unit 11, a data acquisition unit 12, and a demand prediction unit 13.
[0187] The prediction model construction unit 11 is used to construct a model of a preset multi-factor variable prediction long short-term memory network according to the obtained historical sales data set, historical environment data set, and historical price adjustment fluctuation data set of refined oil, so as to obtain a refined oil demand prediction model. The multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer, and a second fully connected layer.
[0188] The data acquisition unit 12 is used to acquire the target sales data, target key information of refined oil in a specified time period before the date to be predicted, and the current key information of the date to be predicted.
[0189] The demand prediction unit 13 is used to perform demand prediction through the refined oil demand prediction model according to the historical sales data, historical key information, and current key information of refined oil, and generate the refined oil demand degree of the date to be predicted.
[0190] In the embodiment of the present invention, the prediction model construction unit 11 is specifically used to analyze the influencing factors of the historical sales data set to generate short-cycle influencing factors; perform price correction according to the historical price adjustment fluctuation data set and the historical sales data set to generate a corrected discount amount; determine the short-cycle influencing factors, the historical environment data set, the corrected discount amount, and the historical price adjustment fluctuation data set as the historical key information set; and train the multi-factor variable prediction long short-term memory network according to the historical key information set and the historical sales data set to generate a refined oil demand prediction model.
[0191] In the embodiment of the present invention, the prediction model construction unit 11 is specifically used to draw a historical sales time series diagram according to the historical sales data set; perform Fourier transform on the historical sales time series diagram to generate short-cycle influencing factors.
[0192] In the embodiment of the present invention, the prediction model construction unit 11 is specifically used to perform linear regression analysis according to the historical price adjustment fluctuation data set and the historical sales data set to generate price sensitivity and a quantity-price relationship equation; and determine the corrected discount amount through the price sensitivity and the quantity-price relationship equation.
[0193] In an embodiment of the present invention, the prediction model construction unit 11 is specifically configured to process and encode the historical key information set and the historical sales volume data set to generate a feature data set; divide the feature data set into a training data set and a test data set according to a preset division ratio; train a multi-factor variable prediction long short-term memory network through the training data set to construct an initial prediction model; optimize the model parameters of the initial prediction model according to the test data set through a preset loss function to generate a refined oil demand degree prediction model.
[0194] In an embodiment of the present invention, the demand prediction unit 13 is configured to perform attention weighted calculation according to the characteristics of historical key information through a first long short-term memory network based on an adaptive attention mechanism to output a first encoded feature; perform enhanced gate mapping according to the characteristics of the first encoded feature and historical sales volume data through a second long short-term memory network based on an enhanced information gating mechanism to output a second encoded feature; calculate the second encoded feature through a first fully connected layer to generate a feature vector; calculate the feature vector and the current key information through a second fully connected layer to generate the refined oil demand degree of the date to be predicted.
[0195] In the solution of the embodiment of the present invention, according to the obtained historical sales volume data set, historical environment data set and historical price adjustment fluctuation data set of refined oil, a multi-factor variable prediction long short-term memory network is constructed to obtain a refined oil demand degree prediction model. The multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer and a second fully connected layer; obtain the target sales volume data, target key information of refined oil in a specified time period before the date to be predicted and the current key information of the date to be predicted; perform demand prediction according to the historical sales volume data, historical key information and current key information of refined oil through the refined oil demand degree prediction model to generate the refined oil demand degree of the date to be predicted, which can more comprehensively capture the internal law of demand degree fluctuation, accurately and efficiently capture complex time series patterns, and realize the accurate prediction of refined oil demand degree through a prediction model based on deep learning that synthesizes multi-factor variables and massive data, improve data utilization rate, system computing power and automation degree, thereby improving prediction efficiency and accuracy and saving system costs.
[0196] The systems, devices, modules or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer device. Specifically, the computer device can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0197] An embodiment of the present invention provides a computer device, including a memory and a processor. The memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, each step of the embodiment of the above-mentioned refined oil demand prediction method based on multi-factor variable deep learning is implemented. For specific descriptions, reference can be made to the embodiment of the refined oil demand prediction method based on multi-factor variable deep learning.
[0198] Reference is made below to Figure 11 , which shows a schematic structural diagram of a computer device 600 suitable for implementing the embodiments of the present application.
[0199] As Figure 11 shown, the computer device 600 includes a central processing unit (CPU) 601, which can perform various appropriate operations and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage section 608 into the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer device 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.
[0200] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as required. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as required, so that a computer program read from it can be installed in the storage section 608 as required.
[0201] Specifically, according to the embodiments of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 609, and / or installed from the removable medium 611.
[0202] A computer-readable medium includes both permanent and non-permanent, removable and non-removable media and can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information accessible by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media such as modulated data signals and carrier waves.
[0203] For convenience of description, the above-described apparatus is described by functionally dividing it into various units. Of course, when implementing the present application, the functions of the various units can be implemented in the same or multiple software and / or hardware.
[0204] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce means for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or combinations of blocks.
[0205] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or combinations of blocks.
[0206] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process or multiple processes and / or blocks Figure 1 one process or multiple processes and / or blocks Figure 1 steps of the functions specified in one block or multiple blocks.
[0207] It should also be noted that the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, commodity or device including the said element.
[0208] In the technical solution of this application, the acquisition, storage, use, processing, etc. of data all comply with the relevant provisions of national laws and regulations.
[0209] It should be noted that in the embodiments of this application, some industry-existing solutions such as certain software, components, models, etc. may be mentioned. They should be regarded as exemplary. The purpose is only to illustrate the feasibility in the implementation of the technical solution of this application, but it does not mean that the applicant has already or necessarily used this solution.
[0210] Those skilled in the art should understand that the embodiments of this application can be provided as a method, a system or a computer program product. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0211] This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0212] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the key point of each embodiment is to illustrate the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant parts, reference can be made to the partial description of the method embodiment.
[0213] The above description is only for the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for predicting the demand for refined oil based on multi-factor variable deep learning, characterized in that: The method comprises: According to the acquired historical sales data set, historical environmental data set and historical price fluctuation data set of refined oil, a preset multi-factor variable prediction long short-term memory network is modeled to obtain a refined oil demand prediction model, wherein the multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer and a second fully connected layer; Obtain the target sales data, target key information and current key information of the refined oil for the specified time period before the date to be predicted; The refined oil demand prediction model is used to perform demand prediction based on the historical sales data, historical key information and current key information of the refined oil, and the refined oil demand on the date to be predicted is generated.
2. The method for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 1 is characterized in that: The method constructs a model of a preset multi-factor variable prediction long short-term memory network based on the acquired historical sales data set, historical environmental data set and historical price fluctuation data set of refined oil to obtain a refined oil demand prediction model, including: Performing an influencing factor analysis on the historical sales data set to generate short-term influencing factors; Correct the price based on the historical price adjustment fluctuation data set and the historical sales volume data set to generate a corrected discount amount; Determine the short-term influencing factors, historical environmental data set, revised discount amount and historical price adjustment fluctuation data set as the historical key information set; According to the historical key information set and the historical sales data set, the multi-factor variable prediction long short-term memory network is trained to generate the refined oil demand prediction model.
3. The method for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 2 is characterized in that: The influencing factor analysis of the historical sales data set to generate short-term influencing factors includes: Draw a historical sales time series graph based on the historical sales data set; Perform Fourier transform on the historical sales time series diagram to generate the short-period influencing factors.
4. The method for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 2 is characterized in that: The step of performing price correction according to the historical price adjustment fluctuation data set and the historical sales volume data set to generate a corrected discount amount includes: Performing linear regression analysis based on the historical price adjustment fluctuation data set and the historical sales volume data set to generate price sensitivity and quantity-price relationship equations; The modified discount amount is determined through the price sensitivity and the quantity-price relationship equation.
5. The method for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 2, characterized in that: The method of training the multi-factor variable prediction long short-term memory network based on the historical key information set and the historical sales data set to generate the refined oil demand prediction model includes: Processing and encoding the historical key information set and the historical sales data set to generate a feature data set; Dividing the feature data set into a training data set and a test data set according to a preset division ratio; Using the training data set, model training is performed on the multi-factor variable prediction long short-term memory network to construct an initial prediction model; The model parameters of the initial prediction model are optimized according to the test data set through a preset loss function to generate the refined oil demand prediction model.
6. The method for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 1, characterized in that: The method of using the refined oil demand prediction model to perform demand prediction based on the historical sales data, historical key information and current key information of the refined oil to generate the refined oil demand on the date to be predicted includes: By using the first long short-term memory network based on the adaptive attention mechanism, performing attention weighted calculation according to the characteristics of the historical key information, and outputting a first encoding feature; Through the second long short-term memory network based on the enhanced information gating mechanism, enhanced gate mapping is performed according to the first coding feature and the features of the historical sales data, and a second coding feature is output; Calculating the second encoding feature through the first fully connected layer to generate a feature vector; The second fully connected layer calculates the feature vector and current key information to generate the demand for refined oil on the date to be predicted.
7. A device for predicting the demand for refined oil based on multi-factor variable deep learning, characterized in that: The device comprises: A prediction model building unit is used to build a model for a preset multi-factor variable prediction long short-term memory network based on the acquired historical sales data set, historical environmental data set and historical price adjustment fluctuation data set of refined oil, so as to obtain a refined oil demand prediction model, wherein the multi-factor variable prediction long short-term memory network includes a first long short-term memory network based on an adaptive attention mechanism, a second long short-term memory network based on an enhanced information gating mechanism, a first fully connected layer and a second fully connected layer; A data acquisition unit, used to acquire the target sales data of refined oil products in a specified time period before the date to be predicted, target key information and current key information of the date to be predicted; The demand forecasting unit is used to perform demand forecasting based on the refined oil demand forecasting model, the historical sales data, the historical key information and the current key information of the refined oil, and generate the refined oil demand on the date to be forecasted.
8. The device for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 7, characterized in that: The prediction model building unit is specifically used to analyze the influencing factors of the historical sales data set to generate short-term influencing factors; perform price correction according to the historical price adjustment fluctuation data set and the historical sales data set to generate a corrected discount amount; The short-term influencing factors, historical environmental data set, modified discount amount and historical price adjustment fluctuation data set are determined as the historical key information set; based on the historical key information set and the historical sales data set, the multi-factor variable prediction long short-term memory network is trained to generate the refined oil demand prediction model.
9. The device for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 8, characterized in that: The prediction model building unit is specifically used to draw a historical sales time series graph based on the historical sales data set; perform Fourier transform on the historical sales time series graph to generate the short-term influencing factors.
10. The device for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 8, characterized in that: The prediction model building unit is specifically used to perform linear regression analysis based on the historical price adjustment fluctuation data set and the historical sales volume data set to generate price sensitivity and quantity-price relationship equations; and determine the adjusted discount amount through the price sensitivity and quantity-price relationship equations.
11. The device for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 8, characterized in that: The prediction model construction unit is specifically used to process and encode the historical key information set and the historical sales data set to generate a feature data set; divide the feature data set into a training data set and a test data set according to a preset division ratio; use the training data set to perform model training on the multi-factor variable prediction long short-term memory network to construct an initial prediction model; use a preset loss function to optimize the model parameters of the initial prediction model according to the test data set to generate the refined oil demand prediction model.
12. The device for predicting the demand for refined oil products based on multi-factor variable deep learning according to claim 8, characterized in that: The demand forecasting unit is used to perform attention weighted calculation according to the characteristics of the historical key information through the first long short-term memory network based on the adaptive attention mechanism, and output a first coding feature; perform enhanced gate mapping according to the first coding feature and the characteristics of the historical sales data through the second long short-term memory network based on the enhanced information gating mechanism, and output a second coding feature; calculate the second coding feature through the first fully connected layer to generate a feature vector; calculate the feature vector and current key information through the second fully connected layer to generate the demand for refined oil on the date to be predicted.
13. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the method for predicting the demand for refined oil based on deep learning of multiple factor variables as described in any one of claims 1 to 6.
14. A computer device comprising a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, characterized in that: When the program instructions are loaded and executed by the processor, the method for predicting the demand for refined oil based on deep learning of multiple factor variables as described in any one of claims 1 to 6 is implemented.
15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by the processor, the method for predicting the demand for refined oil based on deep learning of multiple factor variables as described in any one of claims 1 to 6 is implemented.