Oil depot product oil inventory prediction method and device based on two-stage linkage

By constructing a two-level linkage model for oil depot refined oil inventory prediction, combined with time series analysis and machine learning technology, the problem of missing oil depot refined oil inventory prediction is solved, and the stability and accuracy of the supply chain of oil depots and gas stations is achieved.

CN119721306APending Publication Date: 2025-03-28CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311247901.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The lack of forecasts on the oil depot's refined oil inventory in the prior art has led to instability in the supply chain between the oil depot and gas stations.

Method used

Using a two-stage linkage method, a time series prediction model of refined oil purchase volume, third-party wholesale volume and gas station demand volume is constructed, combined with Kalman filtering and long-term short-term memory network (LSTM) technology, an accurate prediction of the oil depot refined oil inventories at the next moment is achieved.

Benefits of technology

It has achieved effective prediction of the oil depot refined oil inventories, ensured the smooth operation between the oil depot and the gas station, and improved the accuracy and reliability of logistics optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721306A_ABST
    Figure CN119721306A_ABST
Patent Text Reader

Abstract

The invention provides an oil depot product oil inventory prediction method and device based on two-stage linkage, and the method comprises the steps: determining the product oil purchase amount at the next moment based on the historical product oil purchase amount; based on the historical third-party wholesale amount, the third-party wholesale amount at the next moment is determined; based on the historical product oil sales volume and the historical oil tank liquid level meter inventory, the gas station demand at the next moment is determined; and determining the stock of the oil depot product oil at the next moment based on the incoming quantity of the product oil at the next moment, the third-party wholesale quantity at the next moment and the gas station demand quantity at the next moment. According to the method, the oil depot product oil inventory at the next moment can be accurately determined, effective prediction of the oil depot product oil inventory is realized, and stable operation between the oil depot and the gas station is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of petroleum and natural gas, and in particular to a method and device for predicting the inventory of finished oil products in an oil depot based on two-level linkage. Background Art

[0002] The economy and environment increase the uncertainty of the refined oil supply and demand market. As the "capacity" exchange link between the primary and secondary logistics of refined oil, the shipment volume of the oil depot is a priori condition for maintaining the stability of the secondary logistics supply chain of refined oil. At present, the research on refined oil logistics optimization mainly focuses on distribution and transportation optimization and inventory management, and lacks the prediction of refined oil inventory in the oil depot. Summary of the invention

[0003] The present invention provides a method and device for predicting the inventory of finished oil in an oil depot based on two-level linkage, which are used to solve the defect of the prior art that there is a lack of prediction of the inventory of finished oil in an oil depot.

[0004] The present invention provides a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage, comprising:

[0005] Based on the historical refined oil purchase volume, determine the refined oil purchase volume at the next moment;

[0006] Based on the historical third-party wholesale volume, determine the third-party wholesale volume at the next moment;

[0007] Determine the demand for gas stations at the next moment based on historical refined oil sales and historical tank level meter inventory;

[0008] The finished oil inventory at the oil depot at the next moment is determined based on the finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment, and the gas station demand at the next moment.

[0009] According to a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention, the method determines the next moment's finished oil purchase quantity based on the historical finished oil purchase quantity, including:

[0010] Based on the time series data corresponding to the historical refined oil purchase volume, a refined oil purchase volume time series prediction model is constructed;

[0011] Based on the refined oil purchase quantity sequence prediction model, the refined oil purchase quantity at the next moment is determined.

[0012] According to a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention, a time series prediction model for the purchase of finished oil products is constructed based on the time series data corresponding to the historical purchase of finished oil products, including:

[0013] Based on the time series data corresponding to the historical refined oil purchase volume, a refined oil purchase volume model is constructed;

[0014] Kalman filtering is performed on the refined oil purchase volume model to construct a refined oil purchase volume time series prediction model.

[0015] According to a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention, the method of determining the third-party wholesale volume at the next moment based on the historical third-party wholesale volume includes:

[0016] Based on the time series data corresponding to the historical third-party wholesale volume, a third-party wholesale volume time series prediction model is constructed;

[0017] Based on the third-party wholesale volume sequence prediction model, the third-party wholesale volume at the next moment is determined.

[0018] According to a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention, a third-party wholesale volume time series prediction model is constructed based on the time series data corresponding to the historical third-party wholesale volume, including:

[0019] Building a third-party wholesale volume model based on the time series data corresponding to the historical third-party wholesale volume;

[0020] Kalman filtering is performed on the third-party wholesale volume model to construct the third-party wholesale volume time series prediction model.

[0021] According to a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention, the method determines the demand of a gas station at the next moment based on the historical sales volume of finished oil products and the historical inventory volume of oil tank level meters, including:

[0022] Input the historical refined oil sales volume and the historical oil tank level meter inventory into the gas station demand prediction model to obtain the gas station demand at the next moment output by the gas station demand prediction model;

[0023] The gas station demand prediction model is trained based on sample refined oil sales, sample oil tank level meter inventory, and corresponding sample gas station demand.

[0024] According to a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention, the gas station demand prediction model is trained based on the following steps:

[0025] Based on the long short-term memory network LSTM, build the initial prediction model;

[0026] Based on the sample refined oil sales volume, the sample oil tank level meter inventory and the corresponding sample gas station demand, the initial prediction model is trained to obtain the gas station demand prediction model.

[0027] According to a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention, the inventory of finished oil products in the oil depot at the next moment is determined based on the purchase volume of finished oil products at the next moment, the third-party wholesale volume at the next moment, and the demand volume of gas stations at the next moment, including:

[0028] Inputting the next moment's finished oil purchase volume, the next moment's third-party wholesale volume, and the next moment's gas station demand volume into a finished oil inventory prediction model to obtain the next moment's finished oil inventory volume output by the finished oil inventory prediction model;

[0029] The refined oil inventory prediction model is trained based on sample refined oil purchase volume, sample third-party wholesale volume, sample gas station demand volume and corresponding sample oil depot refined oil inventory volume.

[0030] According to a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention, the finished oil inventory prediction model is trained based on the following steps:

[0031] Based on the long short-term memory network LSTM, build the initial prediction model;

[0032] Based on the sample finished oil purchase volume, the sample third-party wholesale volume, the sample gas station demand volume and the corresponding sample oil depot finished oil inventory volume, the initial prediction model is trained to obtain the finished oil inventory volume prediction model.

[0033] The present invention also provides a device for predicting the inventory of finished oil in an oil depot based on two-level linkage, comprising:

[0034] A purchase quantity determination unit, used to determine the purchase quantity of refined oil at the next moment based on the historical purchase quantity of refined oil;

[0035] A wholesale volume determination unit, used to determine the third-party wholesale volume at the next moment based on the historical third-party wholesale volume;

[0036] A demand determination unit, used to determine the demand of the gas station at the next moment based on the historical sales volume of refined oil and the historical inventory of oil tank level meters;

[0037] The inventory determination unit is used to determine the inventory of finished oil at the oil depot at the next moment based on the finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment, and the demand of the gas station at the next moment.

[0038] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for predicting the inventory of finished oil in an oil depot based on two-level linkage as described above is implemented.

[0039] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for predicting the inventory of finished oil in an oil depot based on two-level linkage as described in any one of the above is implemented.

[0040] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for predicting the inventory of finished oil in an oil depot based on two-level linkage as described above is implemented.

[0041] The method and device for predicting the finished oil inventory of an oil depot based on two-level linkage provided by the present invention determine the finished oil purchase volume at the next moment based on the historical finished oil purchase volume, determine the third-party wholesale volume at the next moment based on the historical third-party wholesale volume, and determine the gas station demand at the next moment based on the historical finished oil sales volume and the historical oil tank level meter inventory volume. Therefore, the finished oil inventory of the oil depot at the next moment can be accurately determined based on the finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment and the gas station demand at the next moment, thereby achieving effective prediction of the finished oil inventory of the oil depot and ensuring the smooth operation between the oil depot and the gas station. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 It is a flow chart of a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention;

[0044] Figure 2 It is a structural schematic diagram of a device for predicting the inventory of finished oil products in an oil depot based on two-level linkage provided by the present invention;

[0045] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] At present, the research on refined oil logistics optimization is mainly focused on distribution and transportation optimization and inventory management, and there is a lack of prediction of refined oil inventory in oil depots. The prediction of refined oil inventory in oil depots is a random problem, which is affected by many uncertain factors such as fluctuations in refined oil production levels, price fluctuations, transportation capacity limitations and unforeseen demand, and the difficulty of prediction and the accuracy of prediction results also increase accordingly. The present invention is guided by the demand for refined oil, considers the connection between oil depots and gas stations in secondary logistics, establishes a refined oil inventory prediction method for oil depots and gas stations at two levels, combines time series analysis with machine learning methods, realizes effective prediction of refined oil inventory in oil depots, and ensures smooth operation between oil depots and gas stations.

[0048] Specifically, the present invention provides a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage. Figure 1 Schematic diagram of the process of the method for predicting the inventory of finished oil in an oil depot based on two-level linkage provided by the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0049] Step 110: Based on the historical refined oil purchase volume, determine the refined oil purchase volume at the next moment.

[0050] Here, the historical turnover operation data of the oil depot includes data such as historical finished oil purchase volume, historical finished oil shipment volume, and historical oil depot finished oil inventory volume, that is, the historical finished oil purchase volume can be obtained from the historical turnover operation data of the oil depot.

[0051] Optionally, after obtaining the historical refined oil purchase volume, the historical refined oil purchase volume can be cleaned and processed into time series data. For example, if the historical refined oil purchase volume obtained is the historical refined oil purchase volume at a fine-grained moment (such as the historical refined oil purchase volume per minute), the historical refined oil purchase volume at a coarse-grained moment (such as the historical refined oil purchase volume per hour) can be determined based on the historical refined oil purchase volume at the fine-grained moment, and the historical refined oil purchase volume at the coarse-grained moment is used as the corresponding time series data.

[0052] After determining the historical refined oil purchase volume, the refined oil purchase volume at the next moment can be predicted based on the law of the historical refined oil purchase volume. For example, an autoregressive integrated moving average model (ARIMA) can be constructed based on the historical refined oil purchase volume, that is, the functional relationship between the refined oil purchase volume at the next moment and the historical refined oil purchase volume can be obtained, and then the refined oil purchase volume at the next moment can be obtained when the historical refined oil purchase volume is known.

[0053] Step 120: Determine the third-party wholesale volume at the next moment based on the historical third-party wholesale volume.

[0054] Specifically, the historical turnover operation data of the oil depot includes historical refined oil shipments, historical third-party wholesale volumes and other data, that is, the historical third-party wholesale volumes can be obtained from the historical turnover operation data of the oil depot.

[0055] Optionally, after obtaining the historical third-party wholesale volume, the historical third-party wholesale volume can be cleaned and processed into time series data. For example, if the historical third-party wholesale volume obtained is the third-party wholesale volume at a fine-grained moment (such as the third-party wholesale volume per minute), the third-party wholesale volume at a coarse-grained moment (such as the third-party wholesale volume per hour) can be determined based on the third-party wholesale volume at the fine-grained moment, and the third-party wholesale volume at the coarse-grained moment is used as the corresponding time series data.

[0056] After determining the historical third-party wholesale volume, the third-party wholesale volume at the next moment can be predicted based on the rules of the historical third-party wholesale volume. For example, an autoregressive differential moving average model ARIMA can be constructed based on the historical third-party wholesale volume, that is, the functional relationship between the third-party wholesale volume at the next moment and the historical third-party wholesale volume can be obtained, and then the third-party wholesale volume at the next moment can be obtained when the historical third-party wholesale volume is known.

[0057] Step 130: Determine the demand for gas stations at the next moment based on the historical sales volume of refined oil and the historical inventory of oil tank level meters.

[0058] Specifically, the historical turnover operation data of a gas station includes historical finished oil sales, historical oil tank level meter inventory, historical gas station demand and other data, that is, the historical finished oil sales and historical oil tank level meter inventory can be obtained from the historical turnover operation data of the gas station.

[0059] Optionally, after obtaining the historical refined oil sales and the historical oil tank level gauge inventory, the historical refined oil sales and the historical oil tank level gauge inventory can be cleaned, and the historical refined oil sales and the historical oil tank level gauge inventory can be processed into time series data. For example, if the historical refined oil sales obtained are the historical refined oil sales at fine-grained moments (such as the historical refined oil sales per minute), the historical refined oil sales at coarse-grained moments (such as the historical refined oil sales per hour) can be determined based on the historical refined oil sales at fine-grained moments, and the historical refined oil sales at coarse-grained moments are used as the corresponding time series data.

[0060] After determining the historical finished oil sales volume and the historical oil tank level meter inventory, a gas station demand prediction model can be trained based on the sample finished oil sales volume, the sample oil tank level meter inventory and the corresponding sample gas station demand. The historical finished oil sales volume and the historical oil tank level meter inventory can be input into the gas station demand prediction model to obtain the gas station demand at the next moment output by the gas station demand prediction model.

[0061] Step 140: Determine the inventory of finished oil at the oil depot at the next moment based on the purchase volume of finished oil at the next moment, the third-party wholesale volume at the next moment, and the demand of gas stations at the next moment.

[0062] Specifically, after determining the finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment, and the gas station demand at the next moment, a finished oil inventory prediction model can be trained based on the sample finished oil purchase volume, the sample third-party wholesale volume, the sample gas station demand, and the corresponding sample oil depot finished oil inventory. The finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment, and the gas station demand at the next moment are input into the finished oil inventory prediction model to obtain the finished oil inventory of the oil depot at the next moment output by the finished oil inventory prediction model.

[0063] The method for predicting the finished oil inventory of an oil depot based on two-level linkage provided by an embodiment of the present invention determines the finished oil purchase volume at the next moment based on the historical finished oil purchase volume, determines the third-party wholesale volume at the next moment based on the historical third-party wholesale volume, and determines the gas station demand at the next moment based on the historical finished oil sales volume and the historical oil tank level meter inventory volume. Therefore, the finished oil inventory of the oil depot at the next moment can be accurately determined based on the finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment and the gas station demand at the next moment, thereby achieving effective prediction of the finished oil inventory of the oil depot and ensuring the smooth operation between the oil depot and the gas station.

[0064] Based on the above embodiment, the refined oil purchase quantity at the next moment is determined based on the historical refined oil purchase quantity, including:

[0065] Based on the time series data corresponding to the historical refined oil purchase volume, a refined oil purchase volume time series prediction model is constructed;

[0066] Based on the refined oil purchase volume sequence prediction model, the refined oil purchase volume at the next moment is determined.

[0067] Among them, based on the time series data corresponding to the historical refined oil purchase volume, a refined oil purchase volume time series prediction model is constructed, including:

[0068] Based on the time series data corresponding to the historical refined oil purchase volume, a refined oil purchase volume model is constructed;

[0069] Kalman filtering is performed on the refined oil purchase volume model to build a refined oil purchase volume time series prediction model.

[0070] As an optional embodiment, determining the purchase amount of refined oil at the next moment includes the following process:

[0071] Step 11, logarithmically transform the time series data corresponding to the historical refined oil purchase volume;

[0072] Step 12: Use the ADF test (Augmented Dickey-Fuller Tested) to stabilize the logarithmically transformed time series data, and obtain the first initial difference term d1 of the first initial autoregressive difference moving average model ARIMA;

[0073] Step 13, analyzing the ACF autocorrelation function (Autocorrelation Function) and the PACF partial autocorrelation function (Partial Autocorrelation Function) of the time series data corresponding to the historical refined oil purchase volume, obtaining the first initial autoregressive term number p1 and the first initial moving average term number q1 of the first initial autoregressive difference moving average model ARIMA, and optimizing the first initial difference term number, the first initial autoregressive term number p1 and the first initial moving average term number q1 according to the AIC criterion (Akaike Information Criterion), to obtain the refined oil purchase volume ARIMA model;

[0074] Step 14: Introduce the ARIMA model of finished oil purchase volume into the Kalman filter to construct an ARIMA-Kalman prediction model for the time series of finished oil purchase volume;

[0075] Step 15, reversely restore the time series data corresponding to the historical refined oil purchase volume in the refined oil purchase volume time series ARIMA-Kalman prediction model;

[0076] Step 16: Use the ARIMA-Kalman forecasting model of the refined oil purchase volume time series after reverse restoration of the data to make a rolling forecast of the refined oil purchase volume at future moments;

[0077] Among them, the ARIMA-Kalman prediction model of the time series of finished oil purchase volume at time t+1 is:

[0078]

[0079] Among them, Q(t), Q(t-1), ..., Q(t-p1+1) is the time series of finished oil purchase volume, e(t+1), e(t), e(t-1), ..., e(t-q1+1) is the residual time series of the time series of finished oil purchase volume, are the autoregressive parameters, θ1(t), θ2(t), …, θ q (t) is the moving average parameter;

[0080] The state equation of the Kalman filter is introduced into the ARIMA model of refined oil purchase volume, and the state equation of the ARIMA-Kalman prediction model of refined oil purchase volume time series is obtained as follows:

[0081]

[0082] The observation equation of the Kalman filter is introduced into the ARIMA model of refined oil purchase volume, and the observation equation of the ARIMA-Kalman prediction model of refined oil purchase volume time series is obtained as follows:

[0083] Y(t+1)=[1,0,…,0][Q1(t+1),Q2(t+1),…,Q p1 (t+1)] T

[0084] The ARIMA model of refined oil purchase volume introduces the state equation and observation equation of the Kalman filter to complete the noise filtering process, so as to obtain the optimal refined oil purchase volume time series prediction model. Among them, the refined oil purchase volume time series prediction model is used to characterize the time relationship between the refined oil purchase volume at the next moment and the historical refined oil purchase volume. Therefore, the refined oil purchase volume at the next moment can be predicted based on the established refined oil purchase volume time series prediction model.

[0085] Based on any of the above embodiments, determining the third-party wholesale volume at the next moment based on the historical third-party wholesale volume includes:

[0086] Based on the time series data corresponding to the historical third-party wholesale volume, a third-party wholesale volume time series prediction model is constructed;

[0087] Based on the third-party wholesale volume sequence prediction model, determine the third-party wholesale volume at the next moment.

[0088] Among them, based on the time series data corresponding to the historical third-party wholesale volume, a third-party wholesale volume time series prediction model is constructed, including:

[0089] Build a third-party wholesale volume model based on the time series data corresponding to the historical third-party wholesale volume;

[0090] Perform Kalman filtering on the third-party wholesale volume model and build a third-party wholesale volume time series prediction model.

[0091] As an optional embodiment, determining the third-party wholesale volume at the next moment includes the following process:

[0092] Step 21, logarithmically transform the time series data corresponding to the historical third-party wholesale volume;

[0093] Step 22: Use ADF test to stabilize the logarithmically transformed time series data, and obtain the second initial difference item d2 of the second initial autoregressive difference moving average model ARIMA;

[0094] Step 23, analyzing the ACF autocorrelation function and the PACF partial autocorrelation function of the time series data corresponding to the historical third-party wholesale volume, obtaining the second initial autoregressive term number p2 and the second initial moving average term number q2 of the second initial autoregressive difference moving average model ARIMA, and optimizing the second initial difference term number, the second initial autoregressive term number p2 and the second initial moving average term number q2 according to the AIC criterion, to obtain the third-party wholesale volume ARIMA model;

[0095] Step 24: Introduce the third-party wholesale volume ARIMA model into the Kalman filter to construct the third-party wholesale volume time series ARIMA-Kalman forecasting model;

[0096] Step 25: Reversely restore the time series data corresponding to the historical third-party wholesale volume in the third-party wholesale volume time series ARIMA-Kalman forecasting model;

[0097] Step 26: Use the ARIMA-Kalman forecasting model of the third-party wholesale volume time series after reverse restoration of the data to make a rolling forecast of the third-party wholesale volume at future moments;

[0098] Among them, the ARIMA-Kalman forecasting model of the third-party wholesale volume time series at time t+1 is:

[0099]

[0100] Among them, Q′(t), Q′(t-1), …, Q′(t-p2+1) is the third-party wholesale volume time series, e′(t+1), e′(t), e′(t-1), …, e′(t-q2+1) is the residual time series of the third-party wholesale volume time series, are the autoregressive parameters, θ′1(t), θ′2(t), …, θ′ q2 (t) is the moving average parameter;

[0101] The state equation of the Kalman filter is introduced into the ARIMA model of the third-party wholesale volume, and the state equation of the ARIMA-Kalman forecasting model of the third-party wholesale volume time series is obtained as follows:

[0102]

[0103] The observation equation of the Kalman filter is introduced into the ARIMA model of the third-party wholesale volume, and the observation equation of the ARIMA-Kalman forecasting model of the third-party wholesale volume time series is obtained as follows:

[0104] Y′(t+1)=[1,0,…,0][Q′1(t+1),Q′2(t+1),…,Q′ p2 (t+1)] T

[0105] The third-party wholesale volume ARIMA model introduces the state equation and observation equation of the Kalman filter to complete the noise filtering process to obtain the optimal third-party wholesale volume time series prediction model. The third-party wholesale volume time series prediction model is used to characterize the time relationship between the third-party wholesale volume at the next moment and the historical third-party wholesale volume. Therefore, the third-party wholesale volume at the next moment can be predicted based on the established third-party wholesale volume time series prediction model.

[0106] Based on any of the above embodiments, based on the historical sales volume of refined oil and the historical inventory volume of oil tank level meters, determining the demand volume of the gas station at the next moment includes:

[0107] Input the historical refined oil sales volume and the historical oil tank level meter inventory into the gas station demand forecasting model to obtain the gas station demand at the next moment output by the gas station demand forecasting model;

[0108] The gas station demand prediction model is trained based on sample finished oil sales, sample tank level meter inventory, and the corresponding sample gas station demand.

[0109] Among them, the gas station demand prediction model is trained based on the following steps:

[0110] Based on the long short-term memory network LSTM, build the initial prediction model;

[0111] Based on the sample finished oil sales volume, the sample oil tank level meter inventory and the corresponding sample gas station demand, the initial prediction model is trained to obtain the gas station demand prediction model.

[0112] Specifically, the initial prediction model is constructed based on the long short-term memory network LSTM (Long short-term memory), that is, the gating mechanism of LSTM, namely the input gate, output gate, and forget gate, is used to update and transmit information;

[0113] Input Gate:

[0114] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0115]

[0116]

[0117] Output Gate:

[0118] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0119] h t =o t *tanh(C t )

[0120] Forget the door:

[0121] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0122] where f t 、i t , o t Respectively represent the forget gate, input gate and output gate; σ and tanh are activation functions, with values ​​of [0,1]; x t 、h t They represent the input and output at time t respectively; C t represents the cell state at time t; W and b are parameter matrices.

[0123] As an optional embodiment, the process of building a gas station demand prediction model is as follows:

[0124] The sample refined oil sales volume, sample oil tank level meter inventory and the corresponding sample gas station demand are divided into training set and validation set according to month.

[0125] Next, the sample refined oil sales volume S and the sample oil tank level meter inventory volume I in the training set are used. s As the input feature parameters of the initial prediction model, the corresponding sample gas station demand is used as a label to train the initial prediction model to obtain the gas station demand prediction model.

[0126] Finally, the validation set was used to evaluate the gas station demand prediction model, and the evaluation index was R-Squared (R 2 ), the calculation method is as follows:

[0127]

[0128] Among them, m represents the number of validation set data, y i , represent the true value, predicted value and average value respectively.

[0129] Based on any of the above embodiments, the inventory of finished oil at the oil depot at the next moment is determined based on the purchase volume of finished oil at the next moment, the third-party wholesale volume at the next moment, and the demand of the gas station at the next moment, including:

[0130] Input the next moment's finished oil purchase volume, the next moment's third-party wholesale volume, and the next moment's gas station demand volume into the finished oil inventory prediction model to obtain the next moment's finished oil inventory volume output by the finished oil inventory prediction model;

[0131] The refined oil inventory prediction model is trained based on sample refined oil purchase volume, sample third-party wholesale volume, sample gas station demand, and the corresponding sample oil depot refined oil inventory.

[0132] Among them, the refined oil inventory prediction model is trained based on the following steps:

[0133] Based on the long short-term memory network LSTM, build the initial prediction model;

[0134] Based on the sample finished oil purchase volume, sample third-party wholesale volume, sample gas station demand and the corresponding sample oil depot finished oil inventory, the initial prediction model is trained to obtain the finished oil inventory prediction model.

[0135] Specifically, the initial prediction model is constructed based on the long short-term memory network LSTM (Long short-term memory), that is, the gating mechanism of LSTM, namely the input gate, output gate, and forget gate, is used to update and transmit information;

[0136] Input Gate:

[0137] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0138]

[0139]

[0140] Output Gate:

[0141] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0142] h t =o t *tanh(C t )

[0143] Forget the door:

[0144] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0145] where f t 、i t , o t Respectively represent the forget gate, input gate and output gate; σ and tanh are activation functions, with values ​​of [0,1]; x t 、h t They represent the input and output at time t respectively; C t represents the cell state at time t; W and b are parameter matrices.

[0146] As an optional embodiment, the process of building a refined oil inventory prediction model is as follows:

[0147] The sample finished oil purchase volume, sample third-party wholesale volume, sample gas station demand volume and the corresponding sample oil depot finished oil inventory volume are divided into training set and validation set according to month.

[0148] Next, the sample refined oil purchase volume Q in the training set i , Sample third-party wholesale volume Q tThe demand of sample gas stations is used as the input feature parameters of the initial prediction model, and the finished oil inventory of the corresponding sample oil depot is used as the label to train the initial prediction model to obtain the finished oil inventory prediction model.

[0149] Finally, the validation set was used to evaluate the refined oil inventory prediction model, and the evaluation index was R-Squared (R 2 ), the calculation method is as follows:

[0150]

[0151] Among them, m represents the number of validation set data, y i , represent the true value, predicted value and average value respectively.

[0152] The method for predicting the inventory of finished oil products in oil depots based on two-level linkage provided by the present invention realizes the prediction of the inventory of finished oil products at the next moment based on the ARIMA-Kalman prediction model of the time series of the finished oil purchase volume, and realizes the prediction of the third-party wholesale volume at the next moment based on the ARIMA-Kalman prediction model of the time series of the third-party wholesale volume, wherein the state equation and observation equation of the Kalman filter are introduced into the ARIMA prediction model of the finished oil purchase volume and the ARIMA prediction model of the third-party wholesale volume, so as to complete the filtering process of the noise and improve the accuracy of the prediction result. The method relies on a pure data-driven model, is guided by the demand for finished oil products, considers the connection relationship between the oil depot and the gas station in the secondary logistics, establishes a two-level linkage model of the finished oil inventory of the oil depot and the gas station, combines time series analysis with machine learning methods, and realizes the effective prediction of the inventory of finished oil products at the next moment according to the purchase volume of finished oil products at the next moment, the third-party wholesale volume at the next moment, and the demand of the gas station at the next moment, so as to ensure the smooth operation between the oil depot and the gas station.

[0153] The following is a description of the finished oil inventory prediction device for an oil depot based on two-stage linkage provided by the present invention. The finished oil inventory prediction device for an oil depot based on two-stage linkage described below and the finished oil inventory prediction method for an oil depot based on two-stage linkage described above can be referenced to each other.

[0154] Based on any of the above embodiments, the present invention also provides a device for predicting the inventory of finished oil in an oil depot based on two-level linkage, such as Figure 2 As shown, the device comprises:

[0155] The purchase quantity determination unit 210 is used to determine the purchase quantity of refined oil at the next moment based on the historical purchase quantity of refined oil;

[0156] A wholesale volume determination unit 220, configured to determine a third-party wholesale volume at a next moment based on historical third-party wholesale volumes;

[0157] The demand determination unit 230 is used to determine the demand of the gas station at the next moment based on the historical sales volume of refined oil and the historical inventory of oil tank level meters;

[0158] The inventory determination unit 240 is used to determine the inventory of finished oil at the oil depot at the next moment based on the purchase volume of finished oil at the next moment, the third-party wholesale volume at the next moment, and the demand of the gas station at the next moment.

[0159] Figure 3 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 3 As shown, the electronic device may include: a processor 310, a memory 320, a communications interface 330 and a communications bus 340, wherein the processor 310, the memory 320 and the communications interface 330 communicate with each other through the communications bus 340. The processor 310 may call the logic instructions in the memory 320 to execute a method for predicting the inventory of finished oil products in an oil depot based on two-level linkage, the method comprising: determining the next moment's finished oil purchase quantity based on the historical finished oil purchase quantity; determining the next moment's third-party wholesale quantity based on the historical third-party wholesale quantity; determining the next moment's gas station demand quantity based on the historical finished oil sales quantity and the historical oil tank level meter inventory quantity; determining the next moment's oil depot finished oil inventory quantity based on the next moment's finished oil purchase quantity, the next moment's third-party wholesale quantity and the next moment's gas station demand quantity.

[0160] In addition, the logic instructions in the above-mentioned memory 320 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0161] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the oil depot finished oil inventory prediction method based on two-level linkage provided by the above-mentioned methods, the method including: determining the finished oil purchase volume at the next moment based on the historical finished oil purchase volume; determining the third-party wholesale volume at the next moment based on the historical third-party wholesale volume; determining the gas station demand at the next moment based on the historical finished oil sales volume and the historical oil tank level meter inventory; determining the finished oil inventory of the oil depot at the next moment based on the finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment and the gas station demand at the next moment.

[0162] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned methods for predicting the finished oil inventory of an oil depot based on two-level linkage, the method comprising: determining the finished oil purchase volume at the next moment based on the historical finished oil purchase volume; determining the third-party wholesale volume at the next moment based on the historical third-party wholesale volume; determining the gas station demand at the next moment based on the historical finished oil sales volume and the historical oil tank level meter inventory volume; determining the finished oil inventory of the oil depot at the next moment based on the finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment and the gas station demand at the next moment.

[0163] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting the inventory of finished oil products in an oil depot based on two-level linkage, characterized in that: include: Based on the historical refined oil purchase volume, determine the refined oil purchase volume at the next moment; Based on the historical third-party wholesale volume, determine the third-party wholesale volume at the next moment; Determine the demand for gas stations at the next moment based on historical refined oil sales and historical tank level meter inventory; The finished oil inventory at the oil depot at the next moment is determined based on the finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment, and the gas station demand at the next moment.

2. The method for predicting the inventory of finished oil products in an oil depot based on two-level linkage according to claim 1 is characterized in that: Determining the next moment's refined oil purchase volume based on the historical refined oil purchase volume includes: Based on the time series data corresponding to the historical refined oil purchase volume, a refined oil purchase volume time series prediction model is constructed; Based on the refined oil purchase quantity sequence prediction model, the refined oil purchase quantity at the next moment is determined.

3. The method for predicting the inventory of finished oil products in an oil depot based on two-level linkage according to claim 2 is characterized in that: The method of constructing a time series prediction model for the purchase volume of refined oil products based on the time series data corresponding to the historical purchase volume of refined oil products includes: Based on the time series data corresponding to the historical refined oil purchase volume, a refined oil purchase volume model is constructed; Kalman filtering is performed on the refined oil purchase volume model to construct a refined oil purchase volume time series prediction model.

4. The method for predicting the inventory of finished oil products in an oil depot based on two-level linkage according to any one of claims 1 to 3, characterized in that: The determining of the third-party wholesale volume at the next moment based on the historical third-party wholesale volume includes: Based on the time series data corresponding to the historical third-party wholesale volume, a third-party wholesale volume time series prediction model is constructed; Based on the third-party wholesale volume sequence prediction model, the third-party wholesale volume at the next moment is determined.

5. The method for predicting the inventory of finished oil products in an oil depot based on two-level linkage according to claim 4 is characterized in that: The constructing a third-party wholesale volume time series prediction model based on the time series data corresponding to the historical third-party wholesale volume includes: Building a third-party wholesale volume model based on the time series data corresponding to the historical third-party wholesale volume; Kalman filtering is performed on the third-party wholesale volume model to construct the third-party wholesale volume time series prediction model.

6. The method for predicting the inventory of finished oil products in an oil depot based on two-level linkage according to any one of claims 1 to 3, characterized in that: The method of determining the demand for gas stations at the next moment based on the historical sales volume of refined oil and the historical inventory of oil tank level meters includes: Input the historical refined oil sales volume and the historical oil tank level meter inventory into the gas station demand prediction model to obtain the gas station demand at the next moment output by the gas station demand prediction model; The gas station demand prediction model is trained based on sample refined oil sales, sample oil tank level meter inventory, and corresponding sample gas station demand.

7. The method for predicting the inventory of finished oil products in an oil depot based on two-level linkage according to claim 6 is characterized in that: The gas station demand prediction model is trained based on the following steps: Based on the long short-term memory network LSTM, build the initial prediction model; Based on the sample refined oil sales volume, the sample oil tank level meter inventory and the corresponding sample gas station demand, the initial prediction model is trained to obtain the gas station demand prediction model.

8. The method for predicting the inventory of finished oil products in an oil depot based on two-level linkage according to any one of claims 1 to 3, characterized in that: Determining the inventory of finished oil products at the oil depot at the next moment based on the purchase volume of finished oil products at the next moment, the third-party wholesale volume at the next moment, and the demand volume of the gas station at the next moment includes: Inputting the next moment's finished oil purchase volume, the next moment's third-party wholesale volume, and the next moment's gas station demand volume into a finished oil inventory prediction model to obtain the next moment's finished oil inventory volume output by the finished oil inventory prediction model; The refined oil inventory prediction model is trained based on sample refined oil purchase volume, sample third-party wholesale volume, sample gas station demand volume and corresponding sample oil depot refined oil inventory volume.

9. The method for predicting the inventory of finished oil products in an oil depot based on two-level linkage according to claim 8 is characterized in that: The refined oil inventory prediction model is trained based on the following steps: Based on the long short-term memory network LSTM, build the initial prediction model; Based on the sample finished oil purchase volume, the sample third-party wholesale volume, the sample gas station demand volume and the corresponding sample oil depot finished oil inventory volume, the initial prediction model is trained to obtain the finished oil inventory volume prediction model.

10. A device for predicting the inventory of finished oil products in an oil depot based on two-level linkage, characterized in that: include: A purchase quantity determination unit, used to determine the purchase quantity of refined oil at the next moment based on the historical purchase quantity of refined oil; A wholesale volume determination unit, used to determine the third-party wholesale volume at the next moment based on the historical third-party wholesale volume; A demand determination unit, used to determine the demand of the gas station at the next moment based on the historical sales volume of refined oil and the historical inventory of oil tank level meters; The inventory determination unit is used to determine the inventory of finished oil at the oil depot at the next moment based on the finished oil purchase volume at the next moment, the third-party wholesale volume at the next moment, and the demand of the gas station at the next moment.