A method and system for predicting oil demand
Through the combination of intelligent agent interaction scenarios and grayscale and Markov chain models, a prediction formula related to oil demand and emergency events is established, which solves the problems of low calculation accuracy and lack of intuitiveness in oil supply and demand forecasting in the existing technology, and realizes oil supply and demand Real-time, quantitative prediction of changes, suitable for decision support under emergency events.
Patent Information
- Application Number
- CN202311559385.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-11-21
AI Technical Summary
The existing oil supply and demand forecasting methods have low calculation accuracy when emergencies occur, lack intuitiveness and real-time performance, and there are few models applied to emergency scenarios.
An oil supply chain simulation model is built using an intelligent agent interaction scenario, and the grayscale model and Markov chain model are combined to establish a correlation prediction formula between oil demand and emergency events, dynamically predict oil demand, and display the results visually in the simulation environment.
It achieves real-time, quantitative and intuitive prediction of oil supply and demand changes under emergency events, improves prediction accuracy and stability, and is suitable for strategic response decision support.
Smart Images

Figure CN117710009B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil supply and demand forecasting, and in particular to an oil demand forecasting method and system. Background Art
[0002] Oil resources are very important to human society, and oil security is related to national security. In fact, when dealing with emergencies, decision makers will inevitably pay attention to oil security and even energy security, and need to establish a corresponding quantitative analysis model for oil supply and demand forecasting to assist decision-making.
[0003] In recent years, a series of studies on oil planning and forecasting of oil supply and demand have emerged, mainly including two types of methods. The first type of method belongs to the category of qualitative research. This type of method mainly establishes the mutual influence relationship between oil supply and demand indicators and other indicators in fields such as politics, economy, and environment to qualitatively predict the changes in oil supply and demand. The first type of method does not involve quantitative analysis technology. The second type of method is to use the system dynamics method to establish an oil supply flow model. This type of method can quantitatively analyze the problem of oil supply and demand forecasting, but it mostly uses flow charts and tables as carriers to analyze problems and display results, which is not intuitive and real-time. At the same time, there are few methods and models for oil supply and demand forecasting in emergency scenarios, and the calculation accuracy is low.
[0004] Therefore, it is necessary to provide a new oil demand forecasting method to solve the above problems. Summary of the invention
[0005] The present invention aims to provide a method and system for predicting oil demand, so as to solve the technical problems in the prior art of low calculation accuracy, lack of intuitiveness and real-time performance of the oil supply and demand prediction method in emergency scenarios caused by emergency events. The technical problem to be solved by the present invention is achieved through the following technical solutions.
[0006] The first aspect of the present invention proposes a method for predicting oil demand, comprising: configuring an intelligent agent interaction scenario based on the oil supply situation in a historical time period; constructing a simulation environment according to the configured intelligent agent interaction scenario to construct an oil supply chain simulation model, wherein the simulation environment includes multiple intelligent agents related to oil supply; controlling the operation of each intelligent agent to simulate the actual oil supply situation; using a grayscale model to establish a correlation between oil demand and time, and obtaining an association prediction formula between oil demand and emergency events; using a Markov chain model to correct the association prediction formula to obtain a final association prediction formula; obtaining relevant data of the current emergency event, and using the final association prediction formula to calculate the oil demand for the current emergency event; using the calculated oil demand as an input parameter of the oil supply chain simulation model to dynamically predict changes in oil supply and demand, and visually displaying the prediction results in the simulation environment.
[0007] In an optional implementation, a correlation relationship between oil demand and time is established to obtain a correlation prediction formula between oil demand and time, which specifically includes:
[0008] Use the following expression to calculate the oil demand corresponding to the emergency event at time t:
[0009] I(t)=A(t)
[0010] Wherein, t represents time, I(t) represents the oil demand at time t; A(t) is a function for predicting and calculating the oil demand using the gray model of oil demand, i.e., predicting and calculating the oil demand at time t.
[0011] In an optional implementation manner, establishing the correlation relationship between oil demand and time includes the following steps:
[0012] Step S201: obtaining an original data column, wherein the original data column includes a data column formed by oil demand in a specific historical period;
[0013] X (0) (i) = {x (0) (1),x (0) (2),…,x (0) (n)}
[0014] Among them, X (0) (i) represents a data column formed by oil demand in a specific historical period, that is, an original data column, i represents the i-th item of data in the original data column, i is a positive integer, specifically 1, 2, ..., n; n represents the number of all data in the original data column;
[0015] Step S202: Establishing a grayscale differential model of the AGO data series:
[0016]
[0017] Among them, x (1) represents the number series formed by accumulating the original data series, namely the AGO data series; a represents the development coefficient; b represents the gray action amount; dt' represents a specific historical time period;
[0018] Step S203: Determine calculation parameters B' and X' based on the least square method to establish a grayscale model of the AGO data column, wherein the calculation parameter B' represents the data matrix of the AGO data column; the calculation parameter X' represents the data vector formed by data transformation of the AGO data column;
[0019] Step S204: Based on the established grayscale model of the AGO data column, a grayscale model of oil demand is obtained.
[0020] In an optional implementation, a Markov chain correction model is established to determine the correction term B(t, k) for correcting the association prediction formula; the corrected association prediction formula is expressed by the following expression:
[0021] I(t,k)=A(t)+B(t,k)
[0022] Among them, I(t,k) represents the predicted oil demand when an emergency event with an urgency level of k occurs at time t (i.e., time t or moment t), and k represents the urgency of the emergency event; A(t) is a function that uses a grayscale model for prediction and calculation, that is, predicting the oil demand at time t; B(t,k) is the correction term of the Markov chain correction model.
[0023] In an optional implementation, the urgency k of the emergency event is used as a correction coefficient for the fluctuation range of the future random term B(t), and the correction term B(t, k) of the following Markov chain correction model is obtained:
[0024]
[0025] Among them, B(t,k) is the correction term of the Markov chain correction model; k represents the urgency of the emergency; k represents the urgency of the emergency; A(t) is the function of predicting and calculating the gray model of oil demand, that is, predicting and calculating the oil demand at time t; and It represents the upper bound of the interval of the i-th state of each item and the lower bound of the interval of the i-th state.
[0026] In an optional implementation, establishing the Markov chain correction model includes:
[0027] Establish a state transfer matrix of the original data sequence with a transfer step number m, wherein the original data sequence is composed of the current state E i After m transfer steps, transfer to the next state E j The probability of the state transition with the number of transition steps m is called the state transition probability It is also referred to as the m-step state transition probability, recorded as:
[0028]
[0029] in, Indicates that the original data column is composed of the current state E i After m transfer steps, transfer to the next state E j The probability of is the current state E i After m transfer steps, transfer to the next state E j The number of times, G i The current state E i The number of occurrences; through the state transition probability of the transfer step number m, establish the state transfer matrix of the transfer step number m of the original data column;
[0030] Based on the established state transfer matrix, a forecast table of the forecast target is compiled to assist in the calculation of oil demand.
[0031] In an optional implementation, the urgency level k of the current emergency event is obtained. 当 At the current time t, the associated prediction formula is used to calculate the oil demand for the current emergency event, specifically including determining the prediction state corresponding to the current emergency event according to the prediction table.
[0032] In an optional implementation, the calculated oil demand of the current emergency event is used as an input parameter of the oil supply chain simulation model, the oil supply chain simulation model is started, and the changes in the simulated oil demand and supply are visualized.
[0033] In an optional implementation, a simulation scenario is selected, the oil supply chain simulation model is started in a simulation environment, and the dynamic supply process in the simulation scenario is visualized:
[0034] The crude oil is transported to the warehouse, and the warehouse transports the crude oil to the refinery through pipelines. The refinery converts the crude oil into refined oil and then transports it to the corresponding suppliers.
[0035] The second aspect of the present invention proposes an oil demand prediction system, which adopts the oil demand prediction method described in the first aspect of the present invention, including: a configuration module, which configures an intelligent agent interaction scene based on the oil supply situation in a historical time period; a simulation model construction module, which constructs a simulation environment according to the configured intelligent agent interaction scene to construct an oil supply chain simulation model, wherein the simulation environment includes multiple intelligent agents related to oil supply; controls the operation of each intelligent agent to simulate the actual oil supply situation; a prediction model establishment module, which uses a grayscale model to establish a correlation between oil demand and time, and obtains an association prediction formula between oil demand and time; a correction processing module, which uses a Markov chain model to correct the association prediction formula to obtain a final association prediction formula; an acquisition processing module, which acquires relevant data of the current emergency event, and uses the final association prediction formula to calculate the oil demand related to the current emergency event; a display module, which uses the calculated oil demand as an input parameter of the oil supply chain simulation model to dynamically predict changes in oil supply and demand, and visualizes the prediction results in the simulation environment.
[0036] The third aspect of the present invention provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the oil demand forecasting method described in the first aspect of the present invention.
[0037] A fourth aspect of the present invention provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for predicting oil demand as described in the first aspect of the present invention.
[0038] The present invention includes the following advantages:
[0039] Compared with the prior art, the present invention can simulate and display the oil supply process in real time by establishing an oil supply chain simulation model, so as to predict the changes in oil supply and demand in real time, intuitively and quantitatively. By establishing a correlation prediction formula between oil demand and emergency events, the change in oil demand caused by the occurrence of emergency events can be accurately predicted. Specifically, by combining the grayscale model and the Markov chain correction model to establish the correlation relationship between oil demand and emergency events, the change in oil demand in the event of emergency events of different urgency can be dynamically predicted, and more stable and accurate prediction results can be obtained.
[0040] In addition, applying the oil supply chain model to the field of strategic response can provide auxiliary support to decision makers when emergencies occur.
[0041] Compared with traditional oil planning and oil supply and demand forecasting research, the present invention can quantitatively and visually predict and analyze changes in oil supply and demand by using an oil supply chain simulation model and an associated forecasting formula.
[0042] In addition, the predicted value calculated by the correlation prediction formula is used as the input parameter of the oil supply chain simulation model, so as to establish a quantitative correlation relationship between the emergency event and the entire oil supply chain simulation model.
[0043] In addition, the present invention has a wide range of applications, and is particularly suitable for the problem of oil supply and demand forecasting, and can dynamically, intuitively, and in real time observe the changing process of oil supply and demand when different emergency events occur. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a flow chart of an example of the oil demand forecasting method of the present invention;
[0045] Figure 2 It is a schematic diagram of the framework of the intelligent agent interaction scenario using the oil demand prediction method of the present invention;
[0046] Figure 3 It is a flow chart of an example of establishing a correlation relationship between oil demand and time in the oil demand forecasting method of the present invention;
[0047] Figure 4 It is a flow chart of an example of establishing a Markov chain correction model in the oil demand forecasting method of the present invention;
[0048] Figure 5 It is a schematic diagram of an example of the division of the oil demand state in the oil demand prediction method of the present invention;
[0049] Figure 6 is a schematic diagram of a prediction application example of the oil demand prediction method of the present invention;
[0050] Figure 7 It is a structural block diagram of the oil demand prediction system of the present invention;
[0051] Figure 8 is a schematic structural diagram of an electronic device embodiment according to the present invention;
[0052] Fig. 9 It is a schematic diagram of the structure of a computer-readable medium embodiment according to the present invention. DETAILED DESCRIPTION
[0053] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0054] In view of the above problems, the present invention proposes a method for predicting oil demand. Specifically, by establishing an oil supply chain simulation model, the oil supply process can be simulated and displayed in real time, so as to predict the changes in oil supply and demand in real time, intuitively and quantitatively. By establishing a correlation prediction formula between oil demand and emergency events, the change in oil demand caused by the occurrence of emergency events can be accurately predicted.
[0055] It should be noted that the petroleum supply chain simulation model established by the present invention belongs to the category of multi-agent simulation, where an agent is an individual with a certain state and behavior. The petroleum supply chain simulation model is based on various agents related to the use of supply, and establishes connections between different agents to dynamically predict changes in oil supply and demand in emergency scenarios when an emergency occurs.
[0056] Example 1
[0057] Figure 1 It is a flowchart of an example of the method for predicting oil demand of the present invention.
[0058] Refer to the following Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 , the contents of the present invention will be described in detail.
[0059] like Figure 1 As shown, in step S101, an intelligent agent interaction scenario is configured based on the oil supply situation in the historical time period.
[0060] Based on the actual oil supply situation, a specific agent interaction scenario is set. For example, the agent interaction scenario is a transportation scenario, which specifically includes crude oil being transported from a tanker to a warehouse (such as a port warehouse), transported to a refinery through a pipeline, and refined oil being obtained through the refinery. Trucks go to the refinery to obtain refined oil, and then transport it to the corresponding supplier through ground transportation (such as trucks). For details, please refer to Figure 2 .
[0061] In the agent interaction scenario, for example, the demand of each supplier is configured, and the demand of each supplier is, for example, within a specified range (specifically, randomly changing around the average level in the historical time period). More specifically, for example, the supplier adopts a simple inventory strategy, and determines whether to send information such as how much fuel to be transported to the truck based on whether the current inventory is lower than the specified amount. There is no crude oil stored in the warehouse, and the tanker only needs to transport the crude oil back and forth and transport it to the warehouse.
[0062] It should be noted that, in other embodiments, the agent interaction scenario may also include only some entities in the above-mentioned transportation scenario (e.g., four entities, namely, tanker (for maritime transportation), warehouse, refinery, and truck), or include more related entities than the above-mentioned transportation scenario, or include more entities related to oil supply and demand, and involve a longer transportation chain, etc. The above is only described as an optional example and cannot be understood as a limitation of the present invention.
[0063] Next, in step S102, a simulation environment is constructed according to the configured agent interaction scenario to construct an oil supply chain simulation model, wherein the simulation environment includes multiple agents related to oil supply; and each agent is controlled to run to simulate the actual oil supply situation.
[0064] Specifically, a corresponding plurality of intelligent agents are established based on the entities involved in the intelligent agent interaction scenario to construct a simulation environment.
[0065] In a specific implementation, a simulation environment (e.g., a main environment) is constructed. When constructing a petroleum supply chain simulation model, a simulation environment (i.e., a main environment) is first constructed. The simulation environment includes multiple agents related to petroleum supply. The simulation environment is used to control the start and stop of all agent behaviors, i.e., to control the operation of each agent to simulate the actual petroleum supply situation. Next, a map corresponding to each agent interaction scene is created in the main environment for subsequent setting of the position of each agent.
[0066] Constructing a petroleum supply chain simulation model also includes determining the behavioral logic algorithm of each intelligent agent and the multi-agent interaction rules.
[0067] Specifically, tanker intelligent agents, port warehouse intelligent agents, pipeline intelligent agents, refinery intelligent agents, supplier intelligent agents, and truck intelligent agents are configured.
[0068] In a specific implementation, for example, a behavior logic algorithm for an oil tanker agent is designed, and the specific process includes: the oil tanker extracts crude oil, inputs it into its own oil storage device, and controls the rate of output to the outside through a valve, for example. The parameter configuration of each entity (or component) is as follows: the rate of normal transportation of the oil tanker (i.e., in a loading state) is represented by loadingRate; the capacity of the oil tanker (for example, represented by tank) is represented by capacity; the rate when the valve (for example, represented by valve) is opened is represented by unloadingRate. For example, the value of capacity is set to 5000 cubic meters. For example, the value of unloadingRate is set to 0.1 cubic meters / second.
[0069] It should be noted that, since the tanker agent needs to interact with external entities (such as tankers), the interaction rules between the tanker agent and external entities and other agents are designed.
[0070] In a specific embodiment, when the tanker agent starts running, it first enters the first state (for example, using the Loading state), that is, the tanker agent produces oil at a fixed rate at a designated location. When the oil tank is full of oil, that is, when capacity = 5000 cubic meters, the oil tank will send a message to the tanker agent. Specifically, a special communication mechanism is adopted: message passing, that is, an agent can send a message to one or a group of agents. The message can be an object of any type and complexity, such as a text string, a certificate, an object reference, or a structure with multiple fields. For example, the oil tank will send a "full" message to the tanker agent (for example, using the "Full" message). When the tanker agent receives the message, its state changes from the Loading state to the second state (for example, using the ToUnload state). The built-in code for the tanker agent to receive the message is, for example, statechart.receiveMessage("Full"), and Loaded is used to represent the message transition. When the tanker agent is in the second state (represented by the ToUnload state), the tanker agent will go to the warehouse, and ArrivedAtStorage is used to represent the transition to the arrival of the tanker agent. When the tanker agent arrives at the warehouse, the tanker agent state changes to the third state (represented by the Unloading state). Then, the tanker starts to unload the oil, that is, the tanker agent simulates the tanker starting to unload the oil. Similar to the oil loading process, when the oil storage tank is unloaded, that is, when capacity = 0 cubic meters, the oil storage tank will send a message such as "empty" to the tanker agent (for example, using the "Empty" message). When the tanker agent receives the message, the state changes from the third state (represented by the Unloading state) to the fourth state (for example, using the Toload state), and the built-in code for the tanker agent to receive the information is, for example, statechart.receiveMessage("Empty"), and the message transition is represented by UnLoaded. When the tanker agent is in the fourth state, the tanker agent returns to the designated oil extraction point, for example, and ArrivedAtLoading is used to represent the transition as the arrival transition of the tanker agent. When arriving at the oil extraction point, the tanker agent changes to the first state (for example, Loading state representation), that is, the oil extraction operation continues to be repeated.
[0071] Before the tanker agent runs, the location information of the oil production point and the warehouse needs to be set. In this embodiment, for example, the location information of the key points is obtained from an external database table. The oil supply chain simulation model realizes the operation of batch reading data by interacting with each data table, providing data processing support for the modeling and simulation construction process.
[0072] For the warehouse agent, the warehouse agent is an agent that stores crude oil, which consists of an oil inlet, one or more oil storage tanks, and an oil outlet. Its behavioral logic algorithm includes setting the amount of oil entering the oil tank and the amount of oil output from the oil tank per unit time, for example, using in and out to represent the amount of oil entering and outputting.
[0073] For the pipeline intelligent agent, the role of the pipeline intelligent agent is to deliver crude oil to the refinery (in the simulation environment, it is delivered to the refinery intelligent agent), for example, including the pipeline inlet, pipeline channel and pipeline outlet. The behavioral logic algorithm of the pipeline intelligent agent includes setting the entry speed from the pipeline inlet and the output speed from the pipeline outlet. For example, the entry speed and output speed are represented by in and out, and the flow rate in the pipeline channel is represented by in-out.
[0074] For the refinery agent, the refinery agent includes two oil tanks, one is a crude oil tank and the other is a refinery oil tank. The behavior logic algorithm of the refinery agent includes: crude oil enters the refinery oil tank through the crude oil tank, for example, the rate is controlled by a valve, and the capacity of the two oil tanks is set, for example, the initial capacity is set to 0.5*capacity, and the rate when the valve is opened is set to refiningRate. For example, the value of the capacity (expressed by capacity) is 5000 cubic meters, and the value of the rate when the valve is opened (expressed by refiningRate) is 0.001 cubic meters / second.
[0075] For the supplier agent, the supplier agent is responsible for selling refined oil to the outside world. Its refined oil is not transported from pipelines but by trucks to refineries. The behavioral logic algorithm of the supplier agent includes: the capacity of the oil tank (represented by tank) is represented by capacity, and the initial capacity is set to 0.8*capacity. The reorder level parameter is represented by reorderlevel. When the capacity of the oil tank (represented by tank) is lower than a specific value (for example, the product of the initial capacity and the reorder level parameter, that is, capacity*reorderlevel), the supplier agent sends a message to the truck agent. The built-in code is send("getfuel", fueltruck). After receiving the message, the truck delivers refined oil to the supplier. The rate at which the valve is opened is set to the average demand (represented by meandemand). The average demand indicates that the market demand for refined oil is proportional to the speed at which the supplier consumes refined oil. The initial values of the configured parameters capacity, reorder level, and mean demand are set to 4000 cubic meters, 0.5, and 0.1 cubic meters per second, respectively.
[0076] For the truck agent (for land transportation), the role of the truck agent is to go to the nearest refinery to purchase refined oil and send it back to the supplier when receiving the message from the supplier. The behavioral logic algorithm of the truck agent includes: the truck obtains refined oil from the refinery and stores it in the oil storage tank, the rate is controlled by the oil inlet valve (represented by valvaIn), and transmits the refined oil to the supplier, and the transmission rate is controlled by the oil outlet valve (represented by valvaOut); the oil storage tank capacity inside the truck agent is represented by capacity, and the rate of the inlet and outlet valves is represented by loadingRate. The initial value of the capacity (capacity) inside the agent is set to 2000 cubic meters, and the initial value of the rate (loadingRate) of the inlet and outlet valves is set to 0.1 cubic meters / second. The interaction rules between the tanker agent and other agents are designed, including: when the oil supply chain simulation model is initially run, the truck agent enters the first state (indicated by Idle). When receiving the order message "Order" from the supplier, the state changes from the first state (indicated by Idle) to the second state (indicated by ToTerminal), and this transition is a message transition. After the truck agent enters the second state (indicated by ToTerminal), it goes to the refinery. ArrivedAtLoading is used to indicate the arrival transition of the agent. After arriving at the refinery, the state of the truck agent changes to the third state (indicated by Loading). In the third state, the truck starts to load oil. When the oil is full, that is, when capacity = 4000 cubic meters, the oil tank sends a "full" (expressed by "Full") message to the truck agent. The truck agent receives the "full" message, and the built-in code is statechart.receiveMessage("Full"). The state of the truck agent changes to the fourth state (expressed by ToRetalier (going to the supplier)). The truck agent goes to the supplier agent, and the agent arrival transition is expressed by ArrivedAtStorage (reaching the supplier's location). After arriving at the supplier agent, the truck agent starts to unload oil. After unloading the oil, that is, when capacity = 0 cubic meters, the oil tank sends a "empty" (expressed by "Empty") message to the truck agent. The truck agent receives the message, and the built-in code is statechart.receiveMessage("Empty"), and the state of the truck agent changes to the first state (expressed by Idle (idle)), waiting to receive the next reorder message from the supplier agent.
[0077] It should be noted that the above is only described as an optional example and should not be understood as a limitation to the present invention.
[0078] Next, in step S103, a grayscale model is used to establish a correlation between oil demand and time, and a correlation prediction formula between oil demand and emergency events is obtained.
[0079] Firstly, the grayscale model is used to make a normalized forecast of oil demand. Then, based on the classification of the urgency of emergencies in the oil field, a normalized forecast of the future trend of oil demand is made.
[0080] It should be noted that there is a certain correlation between the demand for oil and the occurrence and urgency of emergencies. Referring to relevant literature, in the field of oil supply and demand, the emergencies that affect the demand for oil mainly include the following categories: rising oil prices, oil pipeline explosions, national security-related controls, international security issues, destruction of oil facilities, and oil monopoly. Based on the above survey, the present invention classifies the urgency of emergencies, as shown in Table 1 below.
[0081] Table 1
[0082] Name of emergency Urgency state normal Level 1 1 Oil prices rise Level 2 2 Oil Monopoly Level 2 2 Oil production facility damage Level 3 3 Oil pipeline explosion Level 3 3 National security control Level 4 4 International security issues Level 5 5
[0083] It should be noted that level 5 represents the highest level of urgency, and level 1 represents the normal situation, that is, the situation where no emergency occurs. And the higher the level of urgency, the greater the impact on oil demand.
[0084] Then, if Figure 4 As shown, establishing the correlation between oil demand and time specifically includes the following steps.
[0085] Step S201: obtaining an original data column, wherein the original data column includes a data column formed by oil demand in a specific historical time period.
[0086] X (0) (i) = {x (0) (1),x (0) (2),…,x (0) (n)} (1)
[0087] Among them, X (0) (i) represents a data column formed by oil demand in a specific historical period, that is, an original data column, i represents the value corresponding to the i-th data item in the original data column, i is a positive integer, specifically 1, 2, ..., n; n represents the length of the original data column, that is, the number of all data in the original data column.
[0088] In a specific implementation, the oil demand data of a certain region in the past ten years (see Table 2 for details) is obtained to establish an original data sequence, that is, to obtain an original data column.
[0089] Table 2
[0090] years Oil demand (10,000 tons) 2005 2017 2006 2127 2007 2121 2008 2003 2009 2293 2010 2955 2011 1965 2012 1730 2013 1807 2014 2132 2015 2095 2016 2130
[0091] Using the above expression (1), taking the data shown in Table 2 as an example, the oil demand is arranged from the earliest to the latest year, and the following original data column is established:
[0092] X (0) (i)={2107,2127,2121,2003,2293,1955,1965,1730,1807,2132,2095,2130}
[0093] Among them, X (0) (i) represents the original data sequence established by the oil demand data of a certain region in the past ten years, i=1,…,n. In this example, n=12, and the number of all data in the original data column is 12; i represents the value corresponding to the i-th data item in the original data column.
[0094] Do a summation on the original data column to generate the AGO data column as follows:
[0095]
[0096] Among them, x (1) (i) represents the original data column x (0) (i) Perform a cumulative sequence, such as x (1) (1) is x (0) (1), x (1) (2) is x (0) (1)+x (0) (2) The value of x (1) (3) is x (0) (1)+x (0) (2)+x (0) (3), and so on, to find the original data sequence x (0) (i) A cumulative sequence x (1) (i) = {x (0) (1),x (0) (2),…,x (0) (n)}, that is, the AGO data column.
[0097] Step S202: Establishing a grayscale differential model of the AGO data sequence.
[0098]
[0099] Among them, x (1) (i.e. x (1)(i)) represents the number series formed by accumulating the original data series, i.e., the AGO data series; a represents the development coefficient; b represents the gray action; dt' represents a specific historical period, such as 2005-2015. The development coefficient a and the gray action b can be obtained by the above expression (3).
[0100] Step S203: Determine calculation parameters B' and X' based on the least squares method to establish a grayscale model of the AGO data column, wherein the calculation parameter B' represents the data matrix of the AGO data column; the calculation parameter X' represents the data vector formed by data transformation of the original data column.
[0101] The grayscale model is represented by the following expression:
[0102] X=B' *u (4)
[0103] Among them, X represents the data vector of the AGO data column; u represents the parameter vector of the development coefficient a and the grey action b; B' represents the data matrix of the AGO data column.
[0104]
[0105] Specifically, let X = (x (1) (i)) T ,
[0106] Specifically, the least squares method can be used to obtain
[0107] u=(a,b) T =[B' T B'] -1 B' T X (5)
[0108] Substitute the original data column and the AGO data column into expression (5) to obtain the parameter vector u representing the development coefficient a and the gray action b, that is, to obtain the values of the development coefficient a and the gray action b.
[0109] Next, substitute the obtained development coefficient a and gray action amount b into expression (3) to obtain the grayscale differential model of the AGO data column. Then, the grayscale model of the AGO data column is obtained by solving the differential equation and expressed using the following expression (6).
[0110]
[0111] Among them, x (1) (t+1) represents the gray model of the AGO data column; a represents the development coefficient; b represents the gray action amount; t represents time or moment.
[0112] Step S204: Based on the established grayscale model of the AGO data column, a grayscale model of oil demand is obtained.
[0113] The grayscale model of the AGO data column established in step S203 is cumulatively subtracted to obtain the grayscale model of oil demand, which is expressed by the following expression:
[0114]
[0115] Among them, x (0) (t) represents the oil demand at time t, which is represented by A(t). Since the AGO data column is obtained by accumulating the original data column, the corresponding value in the original data can be obtained by subtracting adjacent data in the AGO data column, that is, x (0) (t) = x (1) (t)-x (1) (t-1), and the grayscale model of the AGO data series obtained through the above process is shown in expression (6), which can be substituted into expression (7) to obtain a represents the development coefficient; b represents the gray action; t represents time or moment.
[0116] Through the above calculations, the correlation prediction relationship between oil demand and time can be achieved, that is, the correlation prediction formula:
[0117] I(t)=A(t) (8)
[0118] Wherein, t represents time, I(t) represents the oil demand at time t; A(t) is the function of predicting and calculating the oil demand using the gray model of oil demand, that is, the oil demand calculated with the prediction at time t.
[0119] It should be noted that the above is only described as an optional example and should not be understood as a limitation to the present invention.
[0120] Next, in step S104, the association prediction formula is corrected using a Markov chain model to obtain a final association prediction formula.
[0121] In order to more accurately determine the correlation between oil demand and emergency events, the correlation prediction formula is corrected using a Markov chain model.
[0122] It should be noted that, since actual oil demand often has large volatility and the Markov chain model is suitable for prediction problems with large random volatility, the Markov chain model is selected and combined with the actual application scenario of the present invention to correct the association prediction formula.
[0123] A Markov chain correction model is established to determine the correction term B(t,k) to correct the association prediction formula. The following expression is used to represent the corrected association prediction formula:
[0124] I(t,k)=A(t)+B(t,k) (9)
[0125] Among them, I(t,k) represents the predicted oil demand when an emergency event with an urgency level of k occurs at time t (i.e., time t or moment t), and k represents the urgency of the emergency event; A(t) is a function that uses the grayscale model of oil demand for prediction calculation, that is, the predicted oil demand at time t; B(t,k) is the correction term obtained by establishing the Markov chain correction model.
[0126] Specifically, the urgency k of the emergency event is used as the correction coefficient of the fluctuation range of the future random term B(t,k), and the correction term B(t,k) of the following Markov chain correction model is obtained:
[0127]
[0128] Among them, B(t,k) is the correction term of the Markov chain correction model; t represents time or moment; k represents the urgency of the emergency; A(t) is the function of predicting and calculating the gray model of oil demand (that is, the prediction function or prediction curve of the gray model established above), that is, the oil demand at time t that is predicted and calculated; and It represents the upper bound of the interval of the i-th state of each item and the lower bound of the interval of the i-th state.
[0129] The Markov chain model is modified as follows:
[0130] Step S301: Classification of oil demand status.
[0131] Specifically divide the distribution interval of the original data column. (0) (t) as the benchmark, combined with the specific values of each year, divide it into multiple parallel to the prediction curve X (0) (t), each interval represents a state of oil demand. The state division diagram is shown in the figure below, where the x-axis is time data and the y-axis is oil demand data. Figure 5 As shown, the actual value of oil demand and the predicted value of oil demand are shown.
[0132] Specifically divide the distribution interval of the original data column. (0) (t) as the benchmark, combined with the specific values of each year, divide it into multiple parallel to the prediction curve X (0)(t), each interval represents a state of oil demand. In the present invention, considering that the change trend of oil demand is a fluctuating process with an upward or downward trend, it is considered to divide this sequence into states based on the fluctuation amplitude. For details, see Figure 5 .
[0133] The following expression (11) is used to represent the state divided by the fluctuation amplitude, which is recorded as:
[0134]
[0135] Among them, E i represents the i-th state, i is 1, 2, ..., h, and h represents the number of divided states; and They represent the upper and lower bounds of the interval of the i-th state respectively.
[0136] For example, the difference between the actual value of the original data column and the predicted value predicted by the grayscale model is divided by the predicted value to represent the fluctuation range. In this example, based on the original data column in Table 2, the prediction error obtained using the above grayscale model is specifically shown in Table 3.
[0137] Table 3
[0138] years Forecast error of oil demand (10,000 tons) 2005 1.3% 2006 2.6% 2007 2.7% 2008 -2.4% 2009 10.8% 2010 -4.1% 2011 -3.1% 2012 -16.7% 2013 -11.2% 2014 6.1% 2015 4.8% 2016 6.8%
[0139] Based on the forecast error (i.e., fluctuation range) shown in Table 3, the state of oil demand is divided. As can be seen from Table 3, the range of forecast error is [-16.7%, 10.8%]. Therefore, the specific state of oil demand is divided into the following four types: State 1 is the state of declining imports, with a relative value of -17% to 5%, State 2 is the state of weak decline in imports, with a relative value of -5% to 0, State 3 is the state of weak increase in imports, with a relative value of 0 to 5%, and State 4 is the state of rising imports, with a relative value of 5% to 11%. That is:
[0140]
[0141] According to the above state classification, the state of each data item in the original data column is obtained, as shown in Table 4.
[0142] Table 4
[0143]
[0144]
[0145] Step S302: Establish a state transfer matrix with a transfer step number m of the original data sequence.
[0146] The raw data column consists of the current state Ei After m transfer steps, transfer to the next state E j The probability of the state transition with the number of transition steps m is called the state transition probability It is also referred to as the m-step state transition probability, recorded as:
[0147]
[0148] in, Indicates that the original data column is composed of the current state E i After m transfer steps, transfer to the next state E j The probability of is the current state E i After m transfer steps, transfer to the next state E j The number of times, G i The current state E i Number of occurrences.
[0149] The state transfer matrix of the transfer step number m of the original data column is established through the state transfer probability of the transfer step number m.
[0150] As shown in Table 4, for example, (Probability of state 1 transferring to state 1 after 1 transfer step). In the original data column, state 1 transferred to state 1 after 1 transfer step once, that is, the current state of sequence number 8 is state 1, and after 1 transfer step, the state of data with sequence number 9 is also 1. In the original data column, this situation only occurs once, so In Table 4, state 1 appears twice, so G1 = 2. Therefore,
[0151] In a specific implementation, the original data column is divided into four states based on the above process, for example, the value range of the number of transition steps m is set to {1, 2, 3, 4}. Usually, for a certain data column, it is divided into h states, and the value range of the state transition step number m is {1, 2, ..., h}. The state transition matrix of the original data column with the number of transition steps m (m = 1, 2, 3, 4) obtained by the above process is as follows:
[0152]
[0153] Step S303: Based on the established state transfer matrix, a prediction table of the prediction target is compiled to assist in the calculation of the oil demand.
[0154] Specifically, after constructing h state transfer matrices, the state transfer matrix is used to compile a prediction table of the prediction target. Based on the fact that the most recent year in the original data column used in the present invention is 2016, the present invention takes this as an example to predict the most likely state of the oil demand in 2017, and compiles a prediction table of the prediction target. Usually, when predicting the prediction target, the number of transfer steps is set to 1, 2, ..., h according to the distance from the prediction year, where h is the number of divided states. Since the state of the original data column used in the present invention is divided into 4 types, the present invention takes the oil demand of the 4 years closest to the prediction year (2017) to predict the prediction target (oil demand in 2017), and the number of transfer steps is set to 1, 2, 3, and 4 according to the distance from the prediction year (2017). That is, the number of state transfer steps in 2013, 2014, 2015, and 2016 is set to 1, 2, 3, and 4 respectively.
[0155] In the state transfer matrix corresponding to the number of transfer steps, the row vector of the starting state is taken to form a new probability matrix, and the prediction table is obtained. For example, for 2013, since the number of transfer steps m is set to 1, the state transfer matrix p with the number of transfer steps m being 1 is examined. (1) From Table 4, we can see that the initial state in 2013 is 4, so we take p (1) The fourth row in is taken as the row vector. The row vectors in the state transfer matrix corresponding to 2013, 2014, 2015, and 2016 are obtained in sequence to form a prediction table as shown in Table 5.
[0156] Table 5
[0157]
[0158] The transition probabilities of the columns corresponding to the four states are summed up respectively, and the state corresponding to the column with the largest sum is the state that the predicted target is most likely to reach. Taking Table 5 as an example, the sum of the transition probabilities of the column corresponding to the transition probability of state 3 is the largest, so the maximum oil import volume in 2017 will be in state 3. Combined with expression (9), it can be concluded that under normalization (that is, the urgency level k = 1), the predicted value of oil demand in 2017 is 20.26 million tons.
[0159] It should be noted that the above is only described as an optional example and should not be understood as a limitation to the present invention.
[0160] Next, in step S105, relevant data of the current emergency event is obtained, and the oil demand related to the current emergency event is calculated using the revised correlation prediction formula.
[0161] Specifically, obtain the urgency level k of the current emergency event 当At the current time t, the associated prediction formula is used to calculate the oil demand for the current emergency event, specifically including determining the prediction state corresponding to the current emergency event according to the prediction table.
[0162] For example, when an emergency occurs (i.e., the current emergency), the urgency of the current emergency is obtained. 当 , at current time t, use the modified association prediction formula to calculate the oil demand associated with the current emergency.
[0163] The oil demand in a region at time t and with urgency k.
[0164] It should be noted that the above is only described as an optional example and should not be understood as a limitation to the present invention.
[0165] Next, in step S106, the calculated oil demand is used as an input parameter of the oil supply chain simulation model to dynamically predict changes in oil supply and demand, and the prediction results are visualized in the simulation environment.
[0166] In a specific implementation, take 2017 as an example, for example, the current emergency event is the rise in global oil prices, and a certain region is also affected by the current emergency event. From Table 1, it can be seen that the urgency of the current emergency event is 2, that is, k=2, and t=2017. Substituting into the correlation prediction formula (9), it can be obtained that in 2017, when the urgency k is 2, when an emergency event (specifically the rise in global oil prices) occurs in a certain region, the annual oil demand in the region is 20.75 million tons.
[0167] By establishing the above grayscale model and the Markov chain correction model, the oil demand in a certain area at time t and urgency level k can be predicted.
[0168] Based on the constructed oil supply chain simulation model, the annual oil demand in a certain region is represented as the sum of the annual oil demand of all suppliers. For example, the total number of oil suppliers in a certain region is 600, and the weight of 1 cubic meter of oil is 2.36 kilograms. Therefore, the average demand forecast of each oil supplier in a certain region is 0.46 cubic meters per second.
[0169] Figure 6 The upper middle part of the figure shows the changes in crude oil and refined oil related variables after the oil supply chain simulation model is started. The changes in each variable are displayed in the form of a line graph. The displayed variables include: crude oil in warehouses, crude oil in refineries, refined oil in refineries, oil reserves in intermediate warehouses, oil reserves in terminal warehouses, and oil reserves of suppliers. The legend of each variable indicates the color of the line represented by the variable. Figure 6The lower middle part shows when the supplier is in a state of oil shortage after the oil supply chain simulation model is started. The oil shortage state is represented by a horizontal line. The longer the horizontal line is, the longer the supplier is in a state of oil shortage.
[0170] In a specific implementation, the average demand of oil suppliers is used as an input parameter of the oil supply chain simulation model. The calculated average oil demand forecast is input into the oil supply chain simulation model (specifically, the oil supplier agent). The oil supply chain simulation model is started, and the simulated oil demand and supply changes are visualized. The multi-agent simulation process and the oil supply and demand change process in the oil supply chain simulation model can be obtained. Figure 6 It can be seen that after the global oil price surge event with an emergency level of 2 in 2017, there was almost no oil shortage in the region, indicating that under this circumstance, the region's oil supply can meet market demand.
[0171] In another specific implementation, the calculated average demand and reorder level of the oil supplier are input into the oil supply chain simulation model, and the oil supply chain simulation model is started to obtain the multi-agent simulation process and the oil supply and demand change process in the oil supply chain simulation model.
[0172] In another specific implementation, the calculated oil demand of the current emergency event is used as an input parameter of the oil supply chain simulation model, and a simulation scenario is selected, and the oil supply chain simulation model is started in a simulation environment to visualize changes in simulated oil demand and supply.
[0173] In yet another embodiment, the oil supply chain simulation model is started in a simulation environment, and the dynamic supply process in the corresponding simulation scenario is also visualized: crude oil is transported to a warehouse, the warehouse transports the crude oil to a refinery via a pipeline, the refinery converts the crude oil into refined oil, and then transports it to corresponding suppliers via trucks.
[0174] In a specific implementation, take 2017 as an example, for example, the current emergency event is the rise in global oil prices, and a certain region is also affected by the current emergency event. From Table 1, it can be seen that the urgency of the current emergency event is 4, that is, k=4, and t=2017. Substituting into the correlation prediction formula (9), it can be obtained that in 2017, when the urgency k is 4, when an emergency event (specifically the rise in global oil prices) occurs in a certain region, the annual oil demand in the region is 21.73 million tons.
[0175] By establishing the above grayscale model and the Markov chain correction model, the oil demand in a certain area at time t and urgency level k can be predicted.
[0176] Based on the constructed oil supply chain simulation model, the annual oil demand in a certain region is represented as the sum of the annual oil demand of all suppliers. For example, the total number of oil suppliers in a certain region is 600, and the weight of 1 cubic meter of oil is 2.36 kilograms. Therefore, the average demand forecast of each oil supplier in a certain region is 0.49 cubic meters per second.
[0177] In a specific implementation, the average demand of oil suppliers is used as an input parameter of the oil supply chain simulation model. The calculated average oil demand forecast is input into the oil supply chain simulation model (specifically, the oil supplier agent). The oil supply chain simulation model is started, and the simulated oil demand and supply changes are visualized. The multi-agent simulation process and the oil supply and demand change process in the oil supply chain simulation model can be obtained. Figure 6 It can be seen that after the global oil price surge event with an emergency level of 4 in 2017, the region experienced a certain degree of oil shortage, indicating that under this circumstance, the region's oil supply could not meet market demand.
[0178] It should be noted that the above is only described as an optional example and should not be understood as a limitation to the present invention.
[0179] In addition, the drawings are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the drawings do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0180] Compared with the prior art, the present invention can simulate and display the oil supply process in real time by establishing an oil supply chain simulation model, so as to predict the changes in oil supply and demand in real time, intuitively and quantitatively. By establishing a correlation prediction formula between oil demand and emergency events, the change in oil demand caused by the occurrence of emergency events can be accurately predicted. Specifically, by combining the grayscale model and the Markov chain correction model to establish the correlation relationship between oil demand and emergency events, the change in oil demand in the event of emergency events of different urgency can be dynamically predicted, and more stable and accurate prediction results can be obtained.
[0181] In addition, applying the oil supply chain model to the field of strategic response can provide auxiliary support to decision makers when emergencies occur.
[0182] Compared with traditional oil planning and oil supply and demand forecasting research, the present invention can quantitatively and visually predict and analyze changes in oil supply and demand by using an oil supply chain simulation model and an associated forecasting formula.
[0183] In addition, the predicted value calculated by the correlation prediction formula is used as the input parameter of the oil supply chain simulation model, so as to establish a quantitative correlation relationship between the emergency event and the entire oil supply chain simulation model.
[0184] In addition, the present invention has a wide range of applications, and is particularly suitable for the problem of oil supply and demand forecasting, and can dynamically, intuitively, and in real time observe the changing process of oil supply and demand when different emergency events occur.
[0185] Example 2
[0186] The following is a system embodiment of the present invention, which can be used to implement the method embodiment of the present invention. For details not disclosed in the system embodiment of the present invention, please refer to the method embodiment of the present invention.
[0187] Figure 7 4 is a schematic structural diagram of an example of an oil demand forecasting system according to the present invention.
[0188] Reference Figure 7 The second aspect of the present disclosure provides an oil demand prediction system 700, which adopts the oil demand prediction method described in the first aspect of the present invention. The oil demand prediction system 700 includes a configuration module 710, a simulation model construction module 720, a prediction model establishment module 730, a correction processing module 740, an acquisition processing module 750 and a display module 760.
[0189] In a specific embodiment, the configuration module 710 configures an agent interaction scenario based on the oil supply situation in a historical time period. The simulation model construction module 720 constructs a simulation environment according to the configured agent interaction scenario to construct an oil supply chain simulation model, wherein the simulation environment includes multiple agents related to oil supply; and controls the operation of each agent to simulate the actual oil supply situation. The prediction model establishment module 730 uses a grayscale model to establish a correlation between oil demand and time, and obtains a correlation prediction formula between oil demand and time. The correction processing module 740 uses a Markov chain model to correct the correlation prediction formula to obtain a final correlation prediction formula. The acquisition processing module 750 acquires relevant data of the current emergency event, and uses the final correlation prediction formula to calculate the oil demand related to the current emergency event. The display module 760 uses the calculated oil demand as an input parameter of the oil supply chain simulation model to dynamically predict changes in oil supply and demand, and visualizes the prediction results in the simulation environment.
[0190] In an optional implementation, the grayscale model is used to establish the correlation between oil demand and time, and the correlation prediction formula between oil demand and time is obtained, which specifically includes:
[0191] Use the following expression to calculate the oil demand corresponding to time t:
[0192] I(t)=A(t)
[0193] Wherein, t represents time, I(t) represents the oil demand at time t; A(t) is a function for predicting and calculating the oil demand using the gray model of oil demand, i.e., predicting and calculating the oil demand at time t.
[0194] The establishment of the correlation relationship between oil demand and emergency events includes the following steps:
[0195] Step S201: obtaining an original data column, wherein the original data column includes a data column formed by oil demand in a specific historical time period.
[0196] X (0) (i) = {x (0) (1),x (0) (2),…,x (0) (n)}
[0197] Among them, X (0) (i) represents a data column formed by oil demand in a specific historical period, that is, an original data column, i represents the i-th item of data in the original data column, i is a positive integer, specifically 1, 2, ..., n; n represents the number of all data in the original data column;
[0198] Step S202: Establishing a grayscale differential model of the AGO data series:
[0199]
[0200] Among them, x (1) represents the number series formed by accumulating the original data series, namely the AGO data series; a represents the development coefficient; b represents the grey action; dt' represents a specific historical time period.
[0201] Step S203: Determine calculation parameters B' and X' based on the least squares method to establish a grayscale model of the AGO data column, wherein the calculation parameter B' represents the data matrix of the AGO data column; the calculation parameter X' represents the data vector formed by data transformation of the AGO data column.
[0202] Step S204: Based on the established grayscale model of the AGO data column, a grayscale model of oil demand is obtained.
[0203] Next, a Markov chain correction model is established to determine the correction term B(t,k) to correct the association prediction formula;
[0204] The modified association prediction formula is expressed as follows:
[0205] I(t,k)=A(t)+B(t,k)
[0206] Among them, I(t,k) represents the predicted oil demand when an emergency event with an urgency level of k occurs at time t (i.e., time t or moment t), and k represents the urgency of the emergency event; A(t) is a function that uses the grayscale model of oil demand for prediction calculation, that is, predicts the oil demand at time t; B(t,k) is the correction term of the Markov chain correction model.
[0207] Taking the urgency k of the emergency event as the correction coefficient of the fluctuation range of the future random term B(t), the correction term B(t,k) of the following Markov chain correction model is obtained:
[0208]
[0209] Among them, B(t,k) is the correction term of the Markov chain correction model; k represents the urgency of the emergency; k represents the urgency of the emergency; A(t) is the function of predicting and calculating the gray model of oil demand, that is, predicting and calculating the oil demand at time t; and It represents the upper bound of the interval of the i-th state of each item and the lower bound of the interval of the i-th state.
[0210] Specifically, the establishment of the Markov chain correction model includes: establishing a state transfer matrix of the transfer step number m of the original data column, wherein the original data column is composed of the current state E i After m transfer steps, transfer to the next state E j The probability of the state transition with the number of transition steps m is called the state transition probability It is also referred to as the m-step state transition probability, recorded as:
[0211]
[0212] in, Indicates that the original data column is composed of the current state E i After m transfer steps, transfer to the next state E j The probability of is the current state E i After m transfer steps, transfer to the next state E j The number of times, G i The current state E i The number of occurrences; through the state transition probability of the transfer step number m, establish the state transfer matrix of the transfer step number m of the original data column.
[0213] Based on the established state transfer matrix, a forecast table of the forecast target is compiled to assist in the calculation of oil demand.
[0214] In an optional implementation, the urgency level k of the current emergency event is obtained. 当 At the current time t, the associated prediction formula is used to calculate the oil demand for the current emergency event, specifically including determining the prediction state corresponding to the current emergency event according to the prediction table.
[0215] The calculated oil demand of the current emergency event is used as an input parameter of the oil supply chain simulation model, the oil supply chain simulation model is started, and the changes in the simulated oil demand and supply are visualized.
[0216] In another optional implementation, a simulation scenario is selected, and the oil supply chain simulation model is started in a simulation environment to visualize the dynamic supply process in the simulation scenario: crude oil is transported to a warehouse, the warehouse transports the crude oil to a refinery via a pipeline, the refinery converts the crude oil into refined oil, and then transports it to corresponding suppliers by truck.
[0217] It should be noted that, since the contents of the oil demand prediction method in the system embodiment are substantially the same as those of the oil demand prediction method in the method embodiment, the description of the same parts is omitted.
[0218] Compared with the prior art, the present invention can simulate and display the oil supply process in real time by establishing an oil supply chain simulation model, so as to predict the changes in oil supply and demand in real time, intuitively and quantitatively. By establishing a correlation prediction formula between oil demand and emergency events, the change in oil demand caused by the occurrence of emergency events can be accurately predicted. Specifically, by combining the grayscale model and the Markov chain correction model to establish the correlation relationship between oil demand and emergency events, the change in oil demand in the event of emergency events of different urgency can be dynamically predicted, and more stable and accurate prediction results can be obtained.
[0219] In addition, applying the oil supply chain model to the field of strategic response can provide auxiliary support to decision makers when emergencies occur.
[0220] Compared with traditional oil planning and oil supply and demand forecasting research, the present invention can quantitatively and visually predict and analyze changes in oil supply and demand by using an oil supply chain simulation model and an associated forecasting formula.
[0221] In addition, the predicted value calculated by the correlation prediction formula is used as the input parameter of the oil supply chain simulation model, so as to establish a quantitative correlation relationship between the emergency event and the entire oil supply chain simulation model.
[0222] In addition, the present invention has a wide range of applications, and is particularly suitable for the problem of oil supply and demand forecasting, and can dynamically, intuitively, and in real time observe the changing process of oil supply and demand when different emergency events occur.
[0223] Example 3
[0224] Figure 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
[0225] like Figure 8 As shown, the electronic device is presented in the form of a general computing device. The processor may be one or more and work in coordination. The present invention does not exclude distributed processing, that is, the processor may be dispersed in different physical devices. The electronic device of the present invention is not limited to a single entity, but may also be the sum of multiple physical devices.
[0226] The memory stores a computer executable program, which is usually a machine-readable code. The computer-readable program can be executed by the processor to enable the electronic device to perform the method of the present invention, or at least part of the steps in the method.
[0227] The memory includes a volatile memory, such as a random access memory unit (RAM) and / or a cache memory unit, and may also be a non-volatile memory, such as a read-only memory unit (ROM).
[0228] Optionally, in this embodiment, the electronic device further includes an I / O interface, which is used for the electronic device to exchange data with an external device. The I / O interface can represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus structures.
[0229] It should be understood that Figure 8 The electronic device shown is only an example of the present invention, and the electronic device of the present invention may also include elements or components not shown in the above examples. For example, some electronic devices also include display units such as display screens, and some electronic devices also include human-computer interaction elements such as buttons, keyboards, etc. As long as the electronic device can execute the computer-readable program in the memory to implement the method of the present invention or at least part of the steps of the method, it can be considered as an electronic device covered by the present invention.
[0230] Through the above description of the implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by combining software with necessary hardware. Fig. 9As shown, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of commands to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present invention.
[0231] The software product may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0232] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, device, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0233] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0234] The computer-readable medium carries one or more programs (eg, computer-executable programs). When the one or more programs are executed by a device, the computer-readable medium implements the method of the present disclosure.
[0235] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
[0236] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several commands to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
[0237] The exemplary embodiments of the present invention are specifically shown and described above. It should be understood that the present invention is not limited to the detailed structure, configuration or implementation method described herein; on the contrary, the present invention is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.
Claims
1. A method for predicting oil demand, characterized in that: include: Based on the oil supply situation in historical time periods, intelligent agent interaction scenarios are provided; According to the configured intelligent agent interaction scenario, a simulation environment is constructed to construct an oil supply chain simulation model, wherein the simulation environment includes a plurality of intelligent agents related to oil supply; and each intelligent agent is controlled to run to simulate an actual oil supply situation; The grayscale model is used to establish the correlation between oil demand and time, and the correlation prediction formula between oil demand and time is obtained, which specifically includes: using the following expression to calculate the oil demand corresponding to time t: I(t)=A(t) Where t represents time, I(t) represents the oil demand at time t; A(t) is a function that uses the grayscale model of oil demand to predict and calculate, that is, predicts and calculates the oil demand at time t; Establishing a Markov chain correction model and determining a correction term B(t,k) to correct the association prediction formula to obtain a final association prediction formula; The modified association prediction formula is expressed as follows: I(t,k)=A(t)+B(t,k) Among them, I(t,k) represents the predicted oil demand when an emergency event with an urgency level of k occurs at time t, and k represents the urgency of the emergency event; A(t) is a function that uses the grayscale model of oil demand for prediction calculation, that is, predicts and calculates the oil demand at time t; B(t,k) is the correction term of the Markov chain correction model; the urgency level of the emergency event k is used as the correction coefficient of the fluctuation range of the future random term B(t), and the following correction term B(t,k) of the Markov chain correction model is obtained: Among them, B(t,k) is the correction term of the Markov chain correction model; k represents the urgency of the emergency; A(t) is the function of predicting and calculating the oil demand using the gray model of oil demand, that is, predicting and calculating the oil demand at time t; and Respectively represent the upper bound of the interval of the i-th state of each item and the lower bound of the interval of the i-th state; Obtain relevant data of the current emergency and use the revised correlation prediction formula to calculate the oil demand of the current emergency; The calculated oil demand is used as an input parameter of the oil supply chain simulation model to dynamically predict changes in oil supply and demand, and the prediction results are visualized in the simulation environment.
2. The method for predicting oil demand according to claim 1, characterized in that: The establishment of the correlation relationship between oil demand and time includes the following steps: Step S201: obtaining an original data column, wherein the original data column includes a data column formed by oil demand in a specific historical period; X (0) (i)={x (0) (1),x (0) (2),…,x (0) {noun} Among them, X (0) (i) represents a data column formed by oil demand in a specific historical period, that is, an original data column, i represents the i-th item of data in the original data column, i is a positive integer, specifically 1, 2, ..., n; n represents the number of all data in the original data column; Step S202: Establishing a grayscale differential model of the AGO data series: Among them, x (1) represents the number series formed by accumulating the original data series, namely the AGO data series; a represents the development coefficient; b represents the gray action amount; dt' represents a specific historical time period; Step S203: Determine calculation parameters B' and X' based on the least square method to establish a grayscale model of the AGO data column, wherein the calculation parameter B' represents the data matrix of the AGO data column; the calculation parameter X' represents the data vector formed by data transformation of the AGO data column; Step S204: Based on the established grayscale model of the AGO data column, a grayscale model of oil demand is obtained.
3. The method for predicting oil demand according to claim 2, characterized in that: The establishment of the Markov chain correction model comprises: Establish a state transfer matrix of the transfer step number m of the original data column, wherein the original data column is composed of the current state E i After m transfer steps, transfer to the next state E j The probability of the state transition with the number of transition steps m is called the state transition probability It is also referred to as the m-step state transition probability, recorded as: in, Indicates that the original data column is composed of the current state E i After m transfer steps, transfer to the next state E j probability; is the current state E i After m transfer steps, transfer to the next state E j The number of times, G i The current state E i The number of occurrences; through the state transition probability of the transfer step number m, establish the state transfer matrix of the transfer step number m of the original data column; Based on the established state transfer matrix, a forecast table of the forecast target is compiled to assist in the calculation of oil demand.
4. The method for predicting oil demand according to claim 1, characterized in that: Get the urgency level of the current emergency 当 At the current time t, the associated prediction formula is used to calculate the oil demand for the current emergency event, specifically including determining the prediction state corresponding to the current emergency event according to the prediction table.
5. The method for predicting oil demand according to claim 4, characterized in that: The calculated oil demand of the current emergency event is used as an input parameter of the oil supply chain simulation model, the oil supply chain simulation model is started, and the changes in the simulated oil demand and supply are visualized.
6. The method for predicting oil demand according to claim 4, characterized in that: Select a simulation scenario, start the oil supply chain simulation model in the simulation environment, and visualize the dynamic supply process under the simulation scenario: The crude oil is transported to the warehouse, and the warehouse transports the crude oil to the refinery through pipelines. The refinery converts the crude oil into refined oil and then transports it to the corresponding suppliers.
7. A system for predicting oil demand, using the oil demand prediction method according to any one of claims 1 to 6, characterized in that: include: Configuration module, based on the oil supply situation in historical time periods, configures intelligent agent interaction scenarios; The simulation model building module builds a simulation environment according to the configured intelligent agent interaction scenario to build an oil supply chain simulation model, wherein the simulation environment includes multiple intelligent agents related to oil supply; and controls the operation of each intelligent agent to simulate the actual oil supply situation; The prediction model building module uses a grayscale model to establish the correlation between oil demand and emergency events, and obtains the correlation prediction formula between oil demand and time, which specifically includes: using the following expression to calculate the oil demand corresponding to time t: I(t)=A(t) Where t represents time, I(t) represents the oil demand at time t; A(t) is a function that uses the grayscale model of oil demand to predict and calculate, that is, predicts and calculates the oil demand at time t; A correction processing module, which uses a Markov chain model to correct the association prediction formula to obtain a final association prediction formula; The modified association prediction formula is expressed as follows: I(t,k)=A(t)+B(t,k) Among them, I(t,k) represents the predicted oil demand when an emergency event with an urgency level of k occurs at time t, and k represents the urgency of the emergency event; A(t) is a function that uses the grayscale model of oil demand for prediction calculation, that is, predicts and calculates the oil demand at time t; B(t,k) is the correction term of the Markov chain correction model; the urgency level of the emergency event k is used as the correction coefficient of the fluctuation range of the future random term B(t), and the following correction term B(t,k) of the Markov chain correction model is obtained: Among them, B(t,k) is the correction term of the Markov chain correction model; k represents the urgency of the emergency; A(t) is the function of predicting and calculating the oil demand using the gray model of oil demand, that is, predicting and calculating the oil demand at time t; and Respectively represent the upper bound of the interval of the i-th state of each item and the lower bound of the interval of the i-th state; The acquisition processing module acquires the relevant data of the current emergency event and uses the revised correlation prediction formula to calculate the oil demand of the current emergency event; The display module uses the calculated oil demand as an input parameter of the oil supply chain simulation model to dynamically predict the changes in oil supply and demand, and visualizes the prediction results in the simulation environment.
