Oil depot product oil inventory prediction method, device, equipment and medium
By constructing a forecast model for purchasing and shipment of refined oil based on time series analysis and machine learning, the defects of forecasting of refined oil inventory in the oil depot are solved, and the stable operation of the oil depot and the accuracy of inventory management are achieved.
Patent Information
- Application Number
- CN202311247877.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
The lack of predictions on the oil depot's refined oil in the prior art has led to unstable operation of the oil depot.
Through time series analysis based on historical refined oil purchases and shipments, a prediction model of refined oil purchases and shipments is constructed, and combined with Kalman filtering and long-term short-term memory network (LSTM) technology, an accurate prediction of the oil inventory in the oil warehouse at the next moment is achieved.
An effective prediction of the oil inventory of refined oil in the oil depot was achieved, ensuring the smooth operation of the oil depot and reducing uncertainty in inventory management.
Smart Images

Figure CN119721907A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of petroleum and natural gas technology, and in particular to a method, device, equipment and medium for predicting the inventory of finished oil products in an oil depot. Background Art
[0002] Economic, environmental and speculative activities 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 oil depots. Summary of the invention
[0003] The present invention provides a method, device, equipment and medium for predicting the inventory of finished oil in an oil depot, so as 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 in an oil depot, 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 refined oil shipments, determine the next moment's refined oil shipments;
[0007] 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 and the finished oil shipment volume at the next moment.
[0008] According to a method for predicting the inventory of finished oil products in an oil depot provided by the present invention,
[0009] Determining the next moment's refined oil purchase volume based on the historical refined oil purchase volume includes:
[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 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 refined oil products in an oil depot provided by the present invention, the method of determining the shipment volume of refined oil products at the next moment based on the historical shipment volume of refined oil products comprises:
[0016] Based on the time series data corresponding to the historical refined oil shipments, a refined oil shipment time series prediction model is constructed;
[0017] Based on the refined oil shipment volume sequence prediction model, the refined oil shipment volume at the next moment is determined.
[0018] According to a method for predicting the inventory of finished oil products in an oil depot provided by the present invention, a time series prediction model for the shipment of finished oil products is constructed based on the time series data corresponding to the historical shipment of finished oil products, comprising:
[0019] Based on the time series data corresponding to the historical refined oil shipments, construct a refined oil shipment model;
[0020] Kalman filtering is performed on the refined oil shipment volume model to construct the refined oil shipment volume time series prediction model.
[0021] According to a method for predicting the inventory of finished oil in an oil depot provided by the present invention, the method of determining the inventory of finished oil in the oil depot at the next moment based on the purchase amount of finished oil at the next moment and the shipment amount of finished oil at the next moment comprises:
[0022] Inputting the finished oil purchase volume at the next moment and the finished oil shipment volume at the next moment into the finished oil inventory prediction model to obtain the finished oil inventory volume of the oil depot at the next moment output by the finished oil inventory prediction model;
[0023] The refined oil inventory prediction model is trained based on sample refined oil purchase volume, sample refined oil shipment volume and the refined oil inventory volume of the corresponding sample oil depot.
[0024] According to a method for predicting the inventory of finished oil products in an oil depot provided by the present invention, the finished oil inventory 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 finished oil purchase volume, the sample finished oil shipment volume and the corresponding sample oil depot finished oil inventory, the initial prediction model is trained to obtain the finished oil inventory prediction model.
[0027] The present invention also provides a device for predicting the inventory of finished oil in an oil depot, comprising:
[0028] The first determination unit is used to determine the refined oil purchase quantity at the next moment based on the historical refined oil purchase quantity;
[0029] The second determining unit is used to determine the next moment's refined oil shipment volume based on the historical refined oil shipment volume;
[0030] The inventory prediction unit is used to determine the inventory of finished oil in the oil depot at the next moment based on the finished oil purchase volume at the next moment and the finished oil shipment volume at the next moment.
[0031] 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 as described above is implemented.
[0032] 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 as described in any one of the above is implemented.
[0033] 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 as described in any one of the above is implemented.
[0034] The method, device, equipment and medium for predicting the finished oil inventory of an oil depot provided by the present invention determine the finished oil purchase quantity at the next moment based on the historical finished oil purchase quantity, and determine the finished oil shipment quantity at the next moment based on the historical finished oil shipment quantity. Thus, the finished oil inventory of the oil depot at the next moment can be accurately determined based on the finished oil purchase quantity at the next moment and the finished oil shipment quantity at the next moment, thereby achieving effective prediction of the finished oil inventory of the oil depot and ensuring the smooth operation of the oil depot. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] 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.
[0036] Figure 1 It is a schematic flow chart of a method for predicting the inventory of finished oil products in an oil depot provided by the present invention;
[0037] Figure 2 It is a structural schematic diagram of the device for predicting the inventory amount of finished oil in an oil depot provided by the present invention;
[0038] Figure 3It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0039] 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.
[0040] At present, the research on refined oil logistics optimization mainly focuses on distribution and transportation optimization and inventory management, but lacks the prediction of refined oil inventory in oil depots. The prediction of refined oil inventory in oil depots is a random problem. Affected by many uncertain factors such as fluctuations in refined oil production levels, price fluctuations, transportation capacity limitations and unforeseen demand, the difficulty of prediction and the accuracy of prediction results also increase accordingly. The present invention uses quantitative methods as an alternative method for dealing with uncertainty in random problems, combines time series analysis with machine learning methods, realizes the effective prediction of refined oil inventory in oil depots, and ensures the smooth operation of oil depots.
[0041] Specifically, the present invention provides a method for predicting the inventory of finished oil products in an oil depot. Figure 1 FIG. 1 is a flow chart of a method for predicting the inventory of finished oil products in an oil depot provided by the present invention. Figure 1 As shown, the method comprises the following steps:
[0042] Step 110: Based on the historical refined oil purchase volume, determine the refined oil purchase volume at the next moment.
[0043] 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.
[0044] 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.
[0045] 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.
[0046] Step 120: Determine the next moment's refined oil shipment volume based on the historical refined oil shipment volume.
[0047] Specifically, 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 shipment volume can be obtained from the historical turnover operation data of the oil depot.
[0048] Optionally, after obtaining the historical refined oil shipments, the historical refined oil shipments may be cleaned and processed into time series data. For example, if the historical refined oil shipments obtained are the historical refined oil shipments at fine-grained moments (such as the historical refined oil shipments per minute), the historical refined oil shipments at coarse-grained moments (such as the historical refined oil shipments per hour) may be determined based on the historical refined oil shipments at fine-grained moments, and the historical refined oil shipments at coarse-grained moments are used as the corresponding time series data.
[0049] After determining the historical refined oil shipments, the next moment's refined oil shipments can be predicted based on the pattern of the historical refined oil shipments. For example, an autoregressive integrated moving average model (ARIMA) can be constructed based on the historical refined oil shipments, that is, the functional relationship between the next moment's refined oil shipments and the historical refined oil shipments can be obtained, and then the next moment's refined oil shipments can be obtained when the historical refined oil shipments are known.
[0050] Step 130: 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 and the shipment volume of finished oil at the next moment.
[0051] Specifically, after determining the finished oil purchase volume at the next moment and the finished oil shipment volume at the next moment, a finished oil inventory prediction model can be trained based on the sample finished oil purchase volume, the sample finished oil shipment volume and the corresponding sample oil depot finished oil inventory. The finished oil purchase volume at the next moment and the finished oil shipment volume 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.
[0052] The method for predicting the finished oil inventory of an oil depot provided in an embodiment of the present invention determines the finished oil purchase quantity at the next moment based on the historical finished oil purchase quantity, and determines the finished oil shipment quantity at the next moment based on the historical finished oil shipment quantity. Thus, the finished oil inventory of the oil depot at the next moment can be accurately determined based on the finished oil purchase quantity at the next moment and the finished oil shipment quantity at the next moment, thereby achieving effective prediction of the finished oil inventory of the oil depot and ensuring the smooth operation of the oil depot.
[0053] 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:
[0054] 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;
[0055] Based on the refined oil purchase volume sequence prediction model, the refined oil purchase volume at the next moment is determined.
[0056] 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:
[0057] Based on the time series data corresponding to the historical refined oil purchase volume, a refined oil purchase volume model is constructed;
[0058] Kalman filtering is performed on the refined oil purchase volume model to build a refined oil purchase volume time series prediction model.
[0059] As an optional embodiment, determining the purchase amount of refined oil at the next moment includes the following process:
[0060] Step 11, logarithmically transform the time series data corresponding to the historical refined oil purchase volume;
[0061] 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;
[0062] 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;
[0063] 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;
[0064] 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 forecasting model;
[0065] 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;
[0066] Among them, the ARIMA-Kalman prediction model of the time series of finished oil purchase volume at time t+1 is:
[0067]
[0068] 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;
[0069] 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:
[0070]
[0071] 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:
[0072] Y(t+1)=[1,0,…,0][Q1(t+1),Q2(t+1),…,Q p1 (t+1)] T
[0073] 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.
[0074] Based on any of the above embodiments, based on the historical refined oil shipments, determining the refined oil shipments at the next moment includes:
[0075] Based on the time series data corresponding to the historical refined oil shipments, a refined oil shipment time series prediction model is constructed;
[0076] Based on the refined oil shipment volume sequence prediction model, the refined oil shipment volume at the next moment is determined.
[0077] Among them, based on the time series data corresponding to the historical refined oil shipments, a refined oil shipment time series prediction model is constructed, including:
[0078] Based on the time series data corresponding to the historical refined oil shipments, a refined oil shipment model is constructed;
[0079] Kalman filtering is performed on the refined oil shipment model to build a refined oil shipment time series prediction model.
[0080] As an optional embodiment, determining the shipment volume of refined oil at the next moment includes the following process:
[0081] Step 21, logarithmically transform the time series data corresponding to the historical refined oil shipments;
[0082] 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;
[0083] Step 23, analyzing the ACF autocorrelation function and the PACF partial autocorrelation function of the time series data corresponding to the historical refined oil shipments, 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 refined oil shipment ARIMA model;
[0084] Step 24, introduce the ARIMA model of refined oil shipments into the Kalman filter to construct an ARIMA-Kalman prediction model for the refined oil shipment time series;
[0085] Step 25, reversely restore the time series data corresponding to the historical refined oil shipments in the refined oil shipments time series ARIMA-Kalman forecasting model;
[0086] Step 26, rolling forecasting of the refined oil shipments at future moments based on the refined oil shipments time series ARIMA-Kalman forecasting model after reverse restoration of the data;
[0087] Among them, the ARIMA-Kalman forecasting model of the time series of refined oil shipments at time t+1 is:
[0088]
[0089] Among them, Q′(t), Q′(t-1), …, Q′(t-p2+1) is the time series of refined oil shipments, e′(t+1), e′(t), e′(t-1), …, e′(t-q2+1) is the residual time series of the time series of refined oil shipments, are the autoregressive parameters, θ′1(t), θ′2(t), …, θ′ q2 (t) is the moving average parameter;
[0090] The state equation of the Kalman filter is introduced into the ARIMA model of refined oil shipments, and the state equation of the ARIMA-Kalman forecasting model of refined oil shipments time series is obtained as follows:
[0091]
[0092] The observation equation of the Kalman filter is introduced into the ARIMA model of refined oil shipments, and the observation equation of the ARIMA-Kalman forecasting model of refined oil shipments time series is obtained as follows:
[0093] Y′(t+1)=[1,0,…,0][Q′1(t+1),Q′2(t+1),…,Q′ p2 (t+1)] T
[0094] The ARIMA model of refined oil shipments introduces the state equation and observation equation of the Kalman filter to complete the noise filtering process to obtain the optimal refined oil shipment time series prediction model. Among them, the refined oil shipment time series prediction model is used to characterize the time relationship between the refined oil shipments at the next moment and the historical refined oil shipments. Therefore, the refined oil shipments at the next moment can be predicted based on the established refined oil shipment time series prediction model.
[0095] Based on any of the above embodiments, based on the finished oil purchase volume at the next moment and the finished oil shipment volume at the next moment, determining the finished oil inventory volume of the oil depot at the next moment includes:
[0096] Inputting the finished oil purchase volume at the next moment and the finished oil shipment volume at the next moment into the finished oil inventory prediction model to obtain the finished oil inventory volume of the oil depot at the next moment output by the finished oil inventory prediction model;
[0097] The refined oil inventory prediction model is trained based on the sample refined oil purchase volume, sample refined oil shipment volume and the corresponding sample oil depot refined oil inventory volume.
[0098] Among them, the refined oil inventory prediction model is trained based on the following steps:
[0099] Based on the long short-term memory network LSTM, build the initial prediction model;
[0100] Based on the sample finished oil purchase volume, sample finished oil shipment volume and the corresponding sample oil depot finished oil inventory, the initial prediction model is trained to obtain a finished oil inventory prediction model.
[0101] 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;
[0102] Input Gate:
[0103] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0104]
[0105]
[0106] Output Gate:
[0107] o t =σ(W o ·[ht-1 ,x t ]+b o )
[0108] h t =o t *tanh(C t )
[0109] Forget the door:
[0110] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0111] 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.
[0112] As an optional embodiment, the process of building a refined oil inventory prediction model is as follows:
[0113] The sample finished oil purchase volume, sample finished oil shipment volume and the corresponding sample oil depot finished oil inventory are divided into training set and validation set according to month.
[0114] Next, the sample refined oil purchase volume Q in the training set i 、Sample refined oil shipment volume Q e As the input feature parameters of the initial prediction model, the finished oil inventory of the corresponding sample oil depot is used as a label to train the initial prediction model to obtain the finished oil inventory prediction model.
[0115] 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:
[0116]
[0117] Among them, m represents the number of validation set data, y i , represent the true value, predicted value and average value respectively.
[0118] The method for predicting the inventory of finished oil products in an oil depot provided by the present invention realizes the prediction of the purchase of finished oil products at the next moment based on the ARIMA-Kalman prediction model of the time series of the purchase of finished oil products, and realizes the prediction of the shipment of finished oil products at the next moment based on the ARIMA-Kalman prediction model of the time series of the shipment of finished oil products. The state equation and observation equation of the Kalman filter are introduced into the ARIMA model of the purchase of finished oil products and the ARIMA model of the shipment of finished oil products to complete the filtering process of the noise and improve the accuracy of the prediction results. The method provided by the present invention relies on a pure data-driven model to deal with the interference of uncertainty factors on the inventory, uses quantitative methods as an alternative method for dealing with uncertainty in random problems, combines time series analysis with machine learning methods, and realizes the prediction of the inventory of finished oil products at the next moment according to the prediction results of the purchase of finished oil products at the next moment and the shipment of finished oil products at the next moment, thereby ensuring the smooth operation of the oil depot.
[0119] The oil depot finished oil inventory prediction device provided by the present invention is described below. The oil depot finished oil inventory prediction device described below and the oil depot finished oil inventory prediction method described above can be referenced to each other.
[0120] 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, such as Figure 2 As shown, the device comprises:
[0121] The first determining unit 210 is used to determine the refined oil purchase quantity at the next moment based on the historical refined oil purchase quantity;
[0122] The second determining unit 220 is used to determine the next moment's refined oil shipment volume based on the historical refined oil shipment volume;
[0123] The inventory prediction unit 230 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 and the shipment volume of finished oil at the next moment.
[0124] Figure 3 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 3As 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 the method for predicting the inventory of finished oil in the oil depot, 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 finished oil shipment quantity based on the historical finished oil shipment quantity; determining the next moment's finished oil inventory quantity of the oil depot based on the next moment's finished oil purchase quantity and the next moment's finished oil shipment quantity.
[0125] 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.
[0126] 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 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 finished oil shipment volume at the next moment based on the historical finished oil shipment 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 and the finished oil shipment volume at the next moment.
[0127] 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, the methods comprising: determining the finished oil purchase quantity at the next moment based on the historical finished oil purchase quantity; determining the finished oil shipment quantity at the next moment based on the historical finished oil shipment quantity; determining the finished oil inventory of the oil depot at the next moment based on the finished oil purchase quantity at the next moment and the finished oil shipment quantity at the next moment.
[0128] 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.
[0129] 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.
[0130] 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, 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 refined oil shipments, determine the next moment's refined oil shipments; 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 and the finished oil shipment volume at the next moment.
2. The method for predicting the inventory of finished oil products in an oil depot according to claim 1, 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 according to claim 2, 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 according to any one of claims 1 to 3, characterized in that: Determining the next moment's refined oil shipment volume based on the historical refined oil shipment volume includes: Based on the time series data corresponding to the historical refined oil shipments, a refined oil shipment time series prediction model is constructed; Based on the refined oil shipment volume sequence prediction model, the refined oil shipment volume at the next moment is determined.
5. The method for predicting the inventory of finished oil products in an oil depot according to claim 4, characterized in that: The method of constructing a time series prediction model for refined oil shipments based on the time series data corresponding to the historical refined oil shipments includes: Based on the time series data corresponding to the historical refined oil shipments, construct a refined oil shipment model; Kalman filtering is performed on the refined oil shipment volume model to construct the refined oil shipment volume time series prediction model.
6. The method for predicting the inventory of finished oil products in an oil depot according to any one of claims 1 to 3, characterized in that: Determining 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 and the shipment volume of finished oil at the next moment includes: Inputting the finished oil purchase volume at the next moment and the finished oil shipment volume at the next moment into the finished oil inventory prediction model to obtain the finished oil inventory volume of the oil depot at the next moment output by the finished oil inventory prediction model; The refined oil inventory prediction model is trained based on sample refined oil purchase volume, sample refined oil shipment volume and the refined oil inventory volume of the corresponding sample oil depot.
7. The method for predicting the inventory of finished oil products in an oil depot according to claim 6, 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 finished oil shipment volume and the corresponding sample oil depot finished oil inventory, the initial prediction model is trained to obtain the finished oil inventory prediction model.
8. A device for predicting the inventory of finished oil in an oil depot, characterized in that: include: The first determination unit is used to determine the refined oil purchase quantity at the next moment based on the historical refined oil purchase quantity; The second determining unit is used to determine the next moment's refined oil shipment volume based on the historical refined oil shipment volume; The inventory prediction unit is used to determine the inventory of finished oil in the oil depot at the next moment based on the finished oil purchase volume at the next moment and the finished oil shipment volume at the next moment.
9. 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 as described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting the inventory of finished oil products in an oil depot as claimed in any one of claims 1 to 7 is implemented.