Rescheduling method suitable for crude oil supply fluctuation

The BP neural network model predicts the yield of the refining sideline and uses the gradient descent algorithm to adjust the crude oil ratio and processing volume, which solves the problem that traditional refining scheduling methods are difficult to cope with crude oil supply fluctuations, and improves production efficiency and market demand satisfaction.

CN119312980APending Publication Date: 2025-01-14EAST CHINA UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411447545.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

Traditional refining production scheduling methods are difficult to quickly respond to fluctuations in crude oil supply and demand, resulting in inefficiency and waste of resources, and fail to make full use of advanced data analysis and machine learning technologies to optimize the production process.

Method used

The BP neural network model is used to combine historical data to predict the output of each device side line, and the crude oil ratio and device processing volume are adjusted through a gradient descent algorithm to optimize the refining process to adapt to market changes.

Benefits of technology

It has achieved rapid response to market and supply changes, reduced the negative impact of crude oil arrival time fluctuations on production, and improved the continuity of production and market demand satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312980A_ABST
    Figure CN119312980A_ABST
Patent Text Reader

Abstract

The invention discloses a rescheduling method suitable for crude oil supply fluctuation, which comprises the following steps of: firstly, acquiring planned mixed crude oil properties and planned device handling capacity according to a production scheduling plan, and then predicting the lateral line prediction yield of each device by adopting a trained yield prediction model. Then collecting various crude oil historical arrival data, calculating the fluctuation day number expectation of each crude oil in the future according to the obtained crude oil historical arrival data, and then calculating the side line yield of each device under the future crude oil arrival fluctuation condition in combination with the fluctuation day number expectation of each crude oil and the side line predicted yield of each device. Then judging whether the output of each side line meets the requirements of sales products or not under the condition of crude oil arrival fluctuation; if yes, continuing production according to the current crude oil proportion; and if not, adjusting the crude oil proportion through a gradient descent algorithm. And finally, judging whether the adjusted crude oil proportion meets the requirements of sales products or not. If yes, continuing production according to the current crude oil proportion; and if not, adjusting the processing capacity of the device to meet the product selling requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of crude oil scheduling, and in particular to a rescheduling method suitable for crude oil supply fluctuations. Background Art

[0002] In modern petroleum processing and chemical industry, crude oil processing and product production is a complex and dynamic process, facing challenges such as the diversity of raw material composition, changing market demand, increasingly stringent environmental standards and production cost control. Traditional refining production scheduling relies on fixed crude oil ratios and preset production processes. This method is often difficult to quickly adapt to market changes when crude oil supply and demand fluctuate greatly, resulting in low production efficiency and serious waste of resources.

[0003] In the past, companies usually used experience or simple calculation models to manage production scheduling and fluctuations in crude oil arrival times. These traditional methods often rely on static production plans and fixed ratio rules, and lack the ability to respond quickly to real-time market and crude oil supply changes. When faced with fluctuations in crude oil arrival times, traditional practices usually involve using spare inventory or adjusting production speeds, which not only increases costs but also fails to optimize resource utilization.

[0004] In addition, the properties of crude oil during the refining process have a great impact on the final product. Different crude oil properties (such as API, density, sulfur content, residual carbon, etc.) will directly affect the processing capacity of the unit and the output of each side line. How to accurately adjust the production ratio according to the specific properties of crude oil and market demand is the key to improving refining efficiency and product quality.

[0005] With the development of information technology, especially the application of data analysis technology and machine learning, new ways to optimize the refining production process have been provided. By establishing an accurate prediction model, the crude oil processing volume and the output of each side line can be predicted in real time, and the production strategy can be adjusted in time to meet market demand while minimizing energy consumption and costs. However, existing technologies often fail to make full use of these advanced technologies, or have certain limitations in practical applications, such as low prediction accuracy of the model, or slow response speed of adjustment strategy, which cannot effectively cope with the rapid changes in the market. Summary of the invention

[0006] A brief summary of one or more aspects is given below to provide a basic understanding of these aspects. This summary is not an exhaustive overview of all conceived aspects, and is neither intended to identify the key or critical elements of all aspects nor to define the scope of any or all aspects. Its only purpose is to give some concepts of one or more aspects in a simplified form as a prelude to a more detailed description that will be given later.

[0007] The purpose of the present invention is to solve the above-mentioned problem and provide a rescheduling method suitable for crude oil supply fluctuations. By combining the mixed crude oil ratio, the established device processing capacity and the properties of each crude oil, the BP neural network model is used to predict the production of each side line, and the entire refining process is optimized based on this.

[0008] The technical solution of the present invention is:

[0009] The present invention provides a rescheduling method applicable to crude oil supply fluctuations, comprising the following steps:

[0010] Step S1: obtaining the planned mixed crude oil properties and the planned device processing capacity according to the production scheduling plan;

[0011] Step S2: using a trained production prediction model to predict the sideline production of each device based on the acquired planned mixed crude oil properties and the planned device processing capacity; wherein the input of the production prediction model is the planned mixed crude oil properties and the planned device processing capacity, and the output is the sideline production prediction of each device;

[0012] Step S3: Collect historical data of arrival of various crude oils, and calculate the expected number of days of fluctuation of each crude oil in the future based on the acquired historical data of arrival of each crude oil;

[0013] Step S4: combining the expected number of days of fluctuation of each crude oil and the predicted production of each device sideline, calculating the production of each device sideline under the condition of future fluctuation of crude oil arrival at the plant;

[0014] Step S5: determine whether the output of each side line under the condition of fluctuation of crude oil arrival at the plant meets the demand for sales products; if so, continue production according to the current crude oil ratio; if not, adjust the crude oil ratio using the gradient descent algorithm;

[0015] Step S6: Determine whether the adjusted crude oil ratio meets the sales product demand; if so, continue production according to the current crude oil ratio; if not, adjust the device processing capacity to meet the sales product demand, and use the corresponding crude oil ratio and device processing capacity as the final prediction value under the condition of crude oil arrival fluctuations.

[0016] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, the rescheduling method applicable to crude oil supply fluctuations constructs a production prediction model based on a BP neural network; wherein, the rescheduling method applicable to crude oil supply fluctuations uses historical mixed crude oil properties and historical device processing volumes as model inputs, and uses the historical production of each device side line as model output to perform model training, thereby obtaining a production prediction model for predicting the predicted production of the device side line.

[0017] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, the model training target of the production prediction model includes a crude oil property target and a device processing capacity target. When the rescheduling method applicable to crude oil supply fluctuations performs model training, the minimum difference between the predicted value of crude oil property and the expected value of crude oil property is taken as the crude oil property target, and the minimum difference between the predicted value of device processing capacity and the expected value of device processing capacity is taken as the device processing capacity target. The model training is performed in combination with the historical mixed crude oil properties, the historical device processing capacity and the historical production of each device side line, so as to obtain a trained production prediction model; wherein the objective function of the model training target of the production prediction model is as follows:

[0018] min(L total )=min(αL property +(1-α)L capacity )

[0019] Among them, min(L total ) represents minimizing the total loss,

[0020] L property Indicates the loss of crude oil properties,

[0021] L capacity Indicates the loss of device processing capacity,

[0022] α∈[0.3, 0.7] represents an adjustment parameter, wherein the smaller α is, the greater the weight of the mixed crude oil properties on the total index is, and the larger α is, the greater the weight of the device processing capacity on the total index is.

[0023] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, the rescheduling method applicable to crude oil supply fluctuations establishes a crude oil property objective function by the following formula:

[0024]

[0025] Among them, L property Indicates the loss of crude oil properties,

[0026] n represents the number of samples,

[0027] p represents the quantity of crude oil properties,

[0028] w k represents the weight of the k-th crude oil property,

[0029] x true,ik represents the actual value of the kth crude oil property in sample i,

[0030] x pred,ik represents the predicted value of the kth crude oil property in sample i,

[0031] sk represents the standard deviation of the kth crude oil property.

[0032] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, the rescheduling method applicable to crude oil supply fluctuations establishes a device throughput objective function by the following formula:

[0033]

[0034] L capacity Indicates the loss of device processing capacity,

[0035] n represents the number of samples,

[0036] m represents the amount of device processing capacity,

[0037] y true,ij represents the actual value of the jth device processing capacity in sample i,

[0038] y pred,ij represents the predicted value of the processing capacity of the jth device in sample i,

[0039] s j Represents the standard deviation of the throughput of the jth device.

[0040] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, the rescheduling method applicable to crude oil supply fluctuations constructs a production prediction model through the following steps:

[0041] Step C1: Based on an increasing time series, collect historical mixed crude oil properties, historical device processing volume and historical production of each device side line in the increasing time series, and pre-process the collected historical mixed crude oil properties, historical device processing volume and predicted production of each device side line;

[0042] Step C2: according to the properties of the mixed crude oil, the processing capacity of the device and the sideline production of each device, the BP neural network structure is set, including the number of hidden layers, the number of nodes in each hidden layer, the activation function of the hidden layer and the number of nodes in the output layer;

[0043] Step C3: According to the set BP neural network structure, the historical mixed crude oil properties and the historical unit processing volume are used as model inputs, and the historical production of the unit side line is used as model output to perform model training to obtain a production prediction model;

[0044] Step C4: Verify the trained yield prediction model, and optimize the BP neural network structure and parameters based on the verification results.

[0045] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, in step C1, the rescheduling method applicable to crude oil supply fluctuations uses missing value processing and outlier processing to pre-process the collected historical mixed crude oil properties, historical device processing volume, and predicted production of each device sideline; wherein,

[0046] When dealing with missing values, linear interpolation is used to fill in the missing values;

[0047] When performing outlier processing, the outliers are directly removed.

[0048] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, the rescheduling method applicable to crude oil supply fluctuations performs missing value processing by the following linear interpolation formula:

[0049]

[0050] Where y1 and y2 represent the known values ​​of crude oil properties, unit throughput or unit sideline production at time x1 and x2.

[0051] x1 and x2 represent the time points corresponding to these values, y is the value of the interpolation point, and x is the time corresponding to the interpolation point value.

[0052] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, in step C3, when performing model training, the rescheduling method applicable to crude oil supply fluctuations adopts weighted mean square error (MSE) as the error indicator function, and selects the optimizer Adam that can process data of different gradient scales as the training algorithm of the model to perform model training; wherein, when performing model training, the rescheduling method applicable to crude oil supply fluctuations also adopts the Dropout method to prevent overfitting during model training.

[0053] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, in step C4, the rescheduling method applicable to crude oil supply fluctuations uses an independent validation data set to test the production prediction model when performing model validation, and calculates the mean square error MSE and R of the production prediction model on the validation data set. 2 , in order to evaluate the accuracy of the yield prediction model; among them, R 2 The formula is as follows:

[0054]

[0055] Among them, SS res represents the sum of squares of the differences between the actual observed values ​​and the values ​​predicted by the model,

[0056] SS totRepresents the sum of squares of the differences between the actual observations and the mean of the observations.

[0057] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, the historical arrival data of each crude oil includes the historical normal arrival times, the historical arrival fluctuation times and the historical arrival fluctuation days of each crude oil. The rescheduling method applicable to crude oil supply fluctuations calculates the average fluctuation days of each crude oil based on the collected historical arrival data of each crude oil, and uses the average fluctuation days of each crude oil as the expected fluctuation days of each crude oil in the future; wherein, the average fluctuation days d of each crude oil is i The calculation formula is as follows:

[0058]

[0059] Among them, m i It indicates the total number of times crude oil i has arrived at the factory in history.

[0060] n i is the historical arrival fluctuation times of crude oil i,

[0061] d ij is the number of days of the jth fluctuation of crude oil i.

[0062] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, when the rescheduling method applicable to crude oil supply fluctuations uses a gradient descent algorithm to adjust the crude oil ratio, the constraint conditions of the corresponding device sideline products are established based on the predicted production of each device sideline, and the formula is as follows:

[0063] b = Ax

[0064] in, represents the constraint vector of the device sideline product,

[0065] represents a constraint matrix, where s represents the sideline output of the corresponding device, r represents the number of products involved in the sales demand,

[0066] is the production vector of each side line.

[0067] According to an embodiment of the rescheduling method applicable to crude oil supply fluctuations of the present invention, the rescheduling method applicable to crude oil supply fluctuations adjusts the crude oil ratio by the following steps:

[0068] Step D1: Based on the constructed production prediction model, define the objective function for adjusting the crude oil ratio. The formula is as follows:

[0069]

[0070] Wherein, P(x) represents the predicted production of each device sideline predicted by the production prediction model, which depends on the crude oil ratio x, A represents a constraint matrix, and b represents the constraint vector of the device sideline product;

[0071] Step D2: Calculate the gradient of the objective function J(x) with respect to the crude oil ratio x. The formula is as follows:

[0072]

[0073] in, represents the partial derivative of P(x) with respect to x;

[0074] Step D3: Use the gradient descent method to update the crude oil ratio. The formula is as follows:

[0075]

[0076] Among them, β∈[0.001,0.01] represents a learning rate. The higher β is, the higher the learning efficiency of the model for the training set is, and the lower β is, the lower the learning efficiency of the model for the training set is.

[0077] The present invention also provides a computer readable medium storing a computer program code, wherein the computer program code implements the method as described above when executed by a processor.

[0078] The present invention also provides a method and device for rescheduling crude oil supply fluctuations, comprising:

[0079] a memory for storing instructions executable by a processor; and

[0080] A processor is used to execute the instructions to implement the method as described above.

[0081] Compared with the prior art, the present invention has the following beneficial effects: in the face of fluctuations in crude oil supply, the present invention adopts a BP neural network model and combines historical data to train the model to obtain a production prediction model. Then, through the production prediction model, the planned mixed crude oil properties and the planned device processing capacity are obtained based on the production scheduling plan to predict the predicted production of each device side line, and combined with the expected number of days of fluctuation of each crude oil and the predicted production of each device side line, the production of each device side line under the future fluctuation of crude oil arrival at the factory is calculated. Finally, when the production of each side line under the fluctuation of crude oil arrival at the factory does not meet the demand for sales products, the gradient descent algorithm is used to adjust the crude oil ratio to meet the demand for sales products. Through the present invention, the crude oil ratio can be adjusted and the device processing capacity can be recalculated to quickly respond to market and supply changes. The advanced production prediction model is used to adjust the production plan in real time to ensure the continuity of production and meet market demand, thereby reducing the negative impact of fluctuations in arrival time on production. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] The above features and advantages of the present invention can be better understood after reading the detailed description of the embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily drawn to scale, and components with similar related properties or features may have the same or similar reference numerals.

[0083] Figure 1 It is a flowchart showing the steps of an embodiment of a method for rescheduling applicable to crude oil supply fluctuations of the present invention.

[0084] Figure 2 It is a flowchart showing the steps of an embodiment of a method for constructing a yield prediction model of the present invention.

[0085] Figure 3 The present invention is a flowchart showing the steps of adjusting the crude oil ratio using a gradient descent algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0086] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0087] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0088] Unless otherwise specifically stated, the relative arrangement, numerical expressions and numerical values ​​of the parts and steps set forth in these embodiments do not limit the scope of the present application. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the accompanying drawings are not drawn according to the actual proportional relationship. The technology, method and equipment known to those of ordinary skill in the relevant field may not be discussed in detail, but in appropriate cases, the technology, method and equipment should be considered as a part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so that once a certain item is defined in an accompanying drawing, it does not need to be further discussed in subsequent drawings.

[0089] When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional views showing the device structure will not be partially enlarged according to the general scale, and the schematic views are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0090] In the description of the present application, it should be understood that the directions or positional relationships indicated by directional words such as "front, back, up, down, left, right", "lateral, vertical, perpendicular, horizontal" and "top, bottom" are usually based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description. Unless otherwise specified, these directional words do not indicate or imply that the device or element referred to must have a specific direction or be constructed and operated in a specific direction, and therefore cannot be understood as limiting the scope of protection of the present application; the directional words "inside and outside" refer to the inside and outside relative to the contours of each component itself.

[0091] Disclosed herein is an embodiment of a rescheduling method applicable to crude oil supply fluctuations. Figure 1 is a flowchart showing the steps of an embodiment of the method for rescheduling crude oil supply fluctuations of the present invention. Figure 1 ,The following is a detailed description of the steps of the rescheduling method applicable to crude oil supply fluctuations.

[0092] Step S1: Obtain the planned mixed crude oil properties and the planned device processing capacity according to the production scheduling plan.

[0093] Step S2: using a trained production prediction model to predict the predicted production of each device sideline based on the acquired planned mixed crude oil properties and planned device processing capacity; wherein the input of the production prediction model is the planned mixed crude oil properties and the planned device processing capacity, and the output is the predicted production of each device sideline.

[0094] In this embodiment, a BP neural network is used to construct a production prediction model. Before making a production prediction, it is necessary to first obtain the planned mixed crude oil properties (different varieties of crude oil refer to Shengli and Shazhong crude oil, and the crude oil properties refer to API, density, sulfur content, residual carbon API, density, sulfur content, residual carbon, etc.) and the planned device processing capacity according to the production scheduling plan, and then use the trained production prediction model to predict the side line predicted production of each device based on the acquired planned mixed crude oil properties and planned device processing capacity. Among them, the devices involved in the device processing capacity and the device side line production include: I atmospheric pressure reduction device, II atmospheric pressure reduction device, I catalytic device, II catalytic device, I hydrogenation device, II hydrogenation device, IV hydrogenation device, aviation kerosene hydrogenation device, delayed coking device, hydrocracking unit, residual oil hydrogenation unit, and continuous reforming unit.

[0095] Specifically, in this embodiment, the input of the production prediction model is the planned mixed crude oil properties and the planned device processing capacity, and the output is the predicted production of each device side line. The historical mixed crude oil properties and historical device processing capacity are used as model inputs, and the historical production of each device side line is used as model output for model training, thereby obtaining a production prediction model for predicting the predicted production of the device side line.

[0096] Among them, the model training objectives of the production prediction model include crude oil property objectives and device processing volume objectives. When conducting model training, the minimum difference between the predicted value of crude oil properties and the expected value of crude oil properties can be used as the crude oil property objective, and the minimum difference between the predicted value of device processing volume and the expected value of device processing volume can be used as the device processing volume objective. Then, the model training is carried out in combination with the historical mixed crude oil properties, the historical device processing volume, and the historical production of each device side line, so as to obtain a trained production prediction model. Among them, the objective function of the model training objective of the production prediction model is as follows:

[0097] min(L total )=min(αL property +(1-α)L capacity )

[0098] Among them, min(L total ) represents minimizing the total loss, L property Indicates the loss of crude oil properties, L capacity represents the loss of device processing capacity, α∈[0.3, 0.7] represents an adjustment parameter, where the smaller α is, the greater the weight of the mixed crude oil properties on the total index, and the larger α is, the greater the weight of the device processing capacity on the total index

[0099] For the crude oil property objective function, the expression is as follows:

[0100]

[0101] Among them, Lproperty represents the crude oil property loss, n represents the number of samples, p represents the number of crude oil properties, w k represents the weight of the kth crude oil property, x true,ik represents the actual value of the kth crude oil property in sample i, x pred,ik represents the predicted value of the kth crude oil property in sample i, s k Represents the standard deviation of the k-th crude oil property, which is used for standardization (i.e., by setting appropriate weights for data in different units, ensuring that the weight of each data is the same, thereby avoiding a certain data from having too great an impact on the model).

[0102] For the throughput objective function, the expression is as follows:

[0103]

[0104] L capacity represents the device throughput loss, n represents the number of samples, m represents the number of device throughput, y true,ij represents the actual value of the jth device processing capacity in sample i, y pred,ij represents the predicted value of the processing capacity of the jth device in sample i, s j Represents the standard deviation of the j-th device throughput, used for normalization.

[0105] In this embodiment, after the objective function of the production prediction model is defined, the model training is started by using the historical mixed crude oil properties, the historical unit processing volume and the historical production of the side lines of each unit. Figure 2 is a flowchart showing a method for constructing a yield prediction model according to an embodiment of the present invention. Figure 2 , detailing the various steps of the yield prediction model construction method.

[0106] Step C1: Based on an increasing time series, collect historical mixed crude oil properties, historical unit processing volume and historical production of each unit sideline in the increasing time series, and pre-process the collected historical mixed crude oil properties, historical unit processing volume and predicted production of each unit sideline.

[0107] In this embodiment, after collecting the historical mixed crude oil properties ((API, density, sulfur content, residual carbon, etc.), historical device processing volume and historical production of each device side line (for example, more than 1000 historical data) in the increasing time series according to a set increasing time series, missing value processing and outlier processing are used to pre-process the collected historical mixed crude oil properties, historical device processing volume and predicted production of each device side line. Among them, when performing missing value processing, linear interpolation is used to fill the missing values. When performing outlier processing (negative values, values ​​outside three standard deviations), the outliers are directly removed.

[0108] Among them, when linear interpolation is used to process missing values, the expression is as follows:

[0109]

[0110] Where y1 and y2 represent the known values ​​of crude oil properties, unit throughput or unit sideline production at times x1 and x2, x1 and x2 represent the time points corresponding to these values, y is the value of the interpolation point, and x is the time corresponding to the interpolation point value.

[0111] Step C2: According to the properties of the mixed crude oil, the processing capacity of the device and the sideline production of each device, the BP neural network structure is set, including the number of hidden layers, the number of nodes in each hidden layer, the hidden layer activation function and the number of output layer nodes.

[0112] In this embodiment, when setting the BP neural network structure, two to three hidden layers can be selected according to the complexity and diversity of the input data, that is, the characteristics of the mixed crude oil properties, the device processing capacity and the device sideline production, each layer contains dozens to hundreds of nodes. The hidden layer uses the ReLU activation function, and the ReLU function form f(x) = max(0,x) can alleviate the problem of gradient disappearance. The number of nodes in the output layer corresponds to the number of device sideline production, ensuring that the network can output all necessary prediction results.

[0113] Step C3: According to the set BP neural network structure, the historical mixed crude oil properties and historical device processing volume are used as model inputs, and the historical production of the device side line is used as model output to perform model training to obtain a production prediction model.

[0114] In this embodiment, when training the model, in order to reflect the impact of crude oil properties and device processing capacity on production prediction, and the contribution weights of the two to the final sideline production are different, the weighted mean square error (MSE) is used as the error indicator function. At the same time, considering that the processed data set contains a variety of crude oil properties and device parameters, these data may have large differences in scale and distribution, so the optimizer Adam that can process data of different gradient scales is selected as the training algorithm of the model for model training. Finally, in view of the large amount of data that the model needs to process and the complex model structure, the Dropout method is also used to prevent overfitting during model training.

[0115] Step C4: Verify the trained yield prediction model, and optimize the BP neural network structure and parameters based on the verification results.

[0116] In this embodiment, when performing model validation, an independent validation data set is used to test the yield prediction model, and the mean square error (MSE) and R of the yield prediction model on the validation data set are calculated. 2, in order to evaluate the accuracy of the yield prediction model. 2 The formula is as follows:

[0117]

[0118] Among them, SS res The sum of squares of the differences between the actual observed values ​​and the model predicted values, SS tot Represents the sum of squares of the differences between the actual observations and the mean of the observations. Then, based on the validation results, the network's hyperparameters, such as learning rate, batch size, number of layers, and number of nodes, are adjusted to further optimize the model performance.

[0119] Step S3: Collect the historical arrival data of various crude oils, and calculate the expected number of days of fluctuation of each crude oil in the future based on the acquired historical arrival data of each crude oil.

[0120] In this embodiment, the historical arrival data of each crude oil includes the historical normal arrival times, historical fluctuation arrival times and historical fluctuation days of each crude oil. The average fluctuation days of each crude oil is calculated based on the collected historical arrival data of each crude oil, and the average fluctuation days of each crude oil is used as the expected fluctuation days of each crude oil in the future. Among them, the average fluctuation days d of each crude oil is i The calculation formula is as follows:

[0121]

[0122] Among them, m i represents the total number of times crude oil i has arrived at the factory in history, n i is the historical arrival fluctuation times of crude oil i, d ij is the number of days of the jth fluctuation of crude oil i.

[0123] Step S4: combining the expected number of days of fluctuation of each crude oil and the predicted production of each device's sideline, calculate the production of each device's sideline under the condition of future fluctuations in crude oil arrival at the plant.

[0124] Step S5: Determine whether the output of each side line under the condition of fluctuation of crude oil arrival meets the demand for sales products. If yes, continue production according to the current crude oil ratio; if no, adjust the crude oil ratio using the gradient descent algorithm.

[0125] In this embodiment, after calculating the predicted production of the device sideline in the future, the constraint conditions of the corresponding device sideline products are established based on the predicted production of each device sideline, and then the optimization of the crude oil ratio is constrained according to the established constraint conditions. The formula is as follows:

[0126] b = Ax

[0127] in, represents the constraint vector of the device sideline product, represents a constraint matrix, where s represents the sideline output of the corresponding device, r represents the number of products involved in the sales demand, is the production vector of each side line. Figure 3 is a flowchart showing an embodiment of the present invention of adjusting the crude oil ratio by using a gradient descent algorithm. Figure 3 , and detailed description of each step of adjusting crude oil ratio using gradient descent algorithm.

[0128] Step D1: Based on the constructed production prediction model, define the objective function for adjusting the crude oil ratio. The formula is as follows:

[0129]

[0130] Wherein, P(x) represents the predicted production of each device sideline predicted by the production prediction model, which depends on the crude oil ratio x, A represents a constraint matrix, and b represents the constraint vector of the device sideline product.

[0131] Step D2: Calculate the gradient of the objective function J(x) with respect to the crude oil ratio x. The formula is as follows:

[0132]

[0133] in, It represents the partial derivative of P(x) with respect to x, which needs to be obtained through the error back propagation of the BP neural network.

[0134] Step D3: Use the gradient descent method to update the crude oil ratio. The formula is as follows:

[0135]

[0136] Among them, β∈[0.001,0.01] represents a learning rate. The higher β is, the higher the learning efficiency of the model for the training set is, and the lower β is, the lower the learning efficiency of the model for the training set is.

[0137] Step S6: Determine whether the adjusted crude oil ratio meets the sales product demand; if so, continue production according to the current crude oil ratio; if not, adjust the device processing capacity to meet the sales product demand, and use the corresponding crude oil ratio and device processing capacity as the final prediction value under the condition of crude oil arrival fluctuations.

[0138] In this embodiment, if the demand for sales products cannot be met only by adjusting the ratio, the sales product demand can also be met by adjusting the device processing capacity, ensuring that the increased processing capacity does not exceed the maximum limit (process design load * 110%), and the reduced processing capacity is not less than the minimum limit (process design load * 70%), and the corresponding crude oil ratio and device processing capacity obtained are used as the final predicted value under the condition of fluctuations in crude oil arrival at the factory. Therefore, through the present invention, not only attention is paid to the optimization of each side line output, but also the crude oil properties are ensured to be within the specified range of API (crude oil API degree), and the crude oil ratio and device processing capacity are modified in turn from product demand to crude oil, and the original scheduling plan is re-scheduled to meet actual demand. The following takes crude oil in a tanker as an example to illustrate the specific implementation process of the present invention.

[0139] In this embodiment, the process flow of production scheduling includes a crude oil tank unit using crude oil in a tanker as raw material, a constant pressure reduction device unit using mixed crude oil in a crude oil tank as raw material, a secondary device unit using tank supply and device direct supply as raw material, and a product tank unit using the secondary device sideline output as raw material. The specific process is as follows: the crude oil tank unit uses crude oil in different crude oil tankers as raw material, mixes it into residual mixed oil in the tank, and mixes it into new mixed oil in the tank; the constant pressure reduction device unit uses mixed crude oil in different crude oil tanks as raw material, dispatches one crude oil tank as main refining and one crude oil tank as blending, converts it into light dirty oil, residual oil, wax oil and other outputs, and sends them to various secondary devices and intermediate material tanks or product tanks; the secondary device unit uses the oil in each intermediate material tank and the direct supply material of the device as raw materials, converts it into new output and sends it to other secondary devices and intermediate material tanks or product tanks; the product tank unit uses the output of the constant pressure reduction unit or secondary device unit as raw material, and delivers it after the tank is full.

[0140] Among them, the planned mixed crude oil ratio is Shengli: Klauwei: Shazhong, the ratio of the three oils is 21.5:58.9:19.6, the density of the mixed crude oil is 0.85g / ml, the API of the mixed crude oil is 30.5, the sulfur content of the mixed crude oil is 0.84wt%, the residual carbon of the mixed crude oil is 0.52wt%, and the processing capacity of the device before and after the rescheduling is implemented is shown in the following table:

[0141] Comparison of device processing capacity before and after rescheduling:

[0142]

[0143] Production prediction model: The objective function parameter α is set to 0.3, the gradient descent learning rate is set to 0.01, and the planned mixed oil unit sideline production is calculated based on the properties of the mixed crude oil and the unit processing capacity. The comparison results between the calibrated values ​​and the simulated calculation values ​​of the key parameters are shown in the following table:

[0144] Comparison of simulation results of side-line production of mixed crude oil unit

[0145]

[0146] Next, based on the relationship between the product and the sideline output of the device, the product constraints are calculated as shown in the following table:

[0147] Comparison of product demand and output before and after rescheduling

[0148]

[0149] Then, according to the number of days and times of crude oil arrival time fluctuations in the past, the expected delay of Klaue was calculated to be 0.87 days, rounded up to 1 day. Shengli crude oil and Shazhong were mixed according to the original proportions to obtain the original scheduling plan ratio of Shengli: Shazhong of 28.1:71.9, which was brought into the production forecast model to obtain the corresponding production, of which three products failed to meet the constraint requirements: 92 gasoline was 3480.21 tons, diesel was 6029.34 tons, and aviation kerosene was 1258.57 tons.

[0150] Finally, the crude oil ratio was optimized by gradient descent, and the optimized ratio was 17.8:82.2 for Shengli:Shanzhong. When it was put into the production prediction model, the corresponding production was obtained, among which the gasoline product failed to meet the constraint requirements, and the No. 92 gasoline was 3654.06t.

[0151] Afterwards, the processing capacity of the device producing No. 92 gasoline was increased: the processing capacity of the catalytic device I was 146.2t / h. The specific processing capacity of the optimized device is shown in Table 1, which can meet the product constraint requirements.

[0152] This specification also provides a computer-readable medium storing a computer program code, which, when executed by a processor, implements the above-mentioned rescheduling method applicable to crude oil supply fluctuations.

[0153] This specification also provides a deployment package deployment device that supports containerization, including an instruction memory that stores instructions that can be executed by a processor, and a processor for executing instructions in the instruction memory to implement the above-mentioned rescheduling method applicable to crude oil supply fluctuations.

[0154] The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.

[0155] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technician may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.

[0156] The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in cooperation with a DSP core, or any other such configuration.

[0157] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read and write information from / to the storage medium. In an alternative, a storage medium may be integrated into a processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components.

[0158] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented as a computer program product in software, each function may be stored on or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include both computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one place to another. Storage media may be any available medium that can be accessed by a computer. As an example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer. Any connection is also properly referred to as a computer-readable medium. For example, if the software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wherein disk often reproduces data magnetically, while disc reproduces data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

Claims

1. A rescheduling method suitable for crude oil supply fluctuations, characterized in that: The following steps are involved: Step S1: obtaining the planned mixed crude oil properties and the planned device processing capacity according to the production scheduling plan; Step S2: using a trained production prediction model to predict the sideline production of each device based on the acquired planned mixed crude oil properties and the planned device processing capacity; wherein the input of the production prediction model is the planned mixed crude oil properties and the planned device processing capacity, and the output is the sideline production prediction of each device; Step S3: Collect the historical arrival data of various crude oils, and calculate the expected number of days of fluctuation of each crude oil in the future based on the acquired historical arrival data of each crude oil; Step S4: combining the expected number of days of fluctuation of each crude oil and the predicted production of each device sideline, calculating the production of each device sideline under the condition of future fluctuation of crude oil arrival at the plant; Step S5: determine whether the output of each side line under the condition of fluctuation of crude oil arrival at the plant meets the demand for sales products; if so, continue production according to the current crude oil ratio; if not, adjust the crude oil ratio using the gradient descent algorithm; Step S6: Determine whether the adjusted crude oil ratio meets the sales product demand; if so, continue production according to the current crude oil ratio; if not, adjust the device processing capacity to meet the sales product demand, and use the corresponding crude oil ratio and device processing capacity as the final prediction value under the condition of crude oil arrival fluctuations.

2. The rescheduling method applicable to crude oil supply fluctuation according to claim 1, characterized in that: The rescheduling method applicable to crude oil supply fluctuations constructs a production prediction model based on a BP neural network; wherein, the rescheduling method applicable to crude oil supply fluctuations uses historical mixed crude oil properties and historical device processing volumes as model inputs, and uses the historical production of each device side line as model output to perform model training, thereby obtaining a production prediction model for predicting the predicted production of the device side line.

3. The rescheduling method applicable to crude oil supply fluctuation according to claim 2, characterized in that: The model training objectives of the production prediction model include crude oil property objectives and device processing volume objectives. When the rescheduling method suitable for crude oil supply fluctuation is used for model training, the minimum difference between the predicted value of crude oil property and the expected value of crude oil property is used as the crude oil property objective, and the minimum difference between the predicted value of device processing volume and the expected value of device processing volume is used as the device processing volume objective. The model training is carried out in combination with the historical mixed crude oil properties, the historical device processing volume and the historical production of the side lines of each device, so as to obtain a trained production prediction model; wherein, the objective function of the model training objective of the production prediction model is as follows: min(L total )=min(αL property +(1-α)L capacity ) Among them, min(L total ) represents minimizing the total loss, L property Indicates the loss of crude oil properties, L capacity Indicates the loss of device processing capacity, α∈[0.3, 0.7] represents an adjustment parameter, wherein the smaller α is, the greater the weight of the mixed crude oil properties on the total index is, and the larger α is, the greater the weight of the device processing capacity on the total index is.

4. The rescheduling method applicable to crude oil supply fluctuation according to claim 3, characterized in that: The rescheduling method applicable to crude oil supply fluctuations establishes the crude oil property objective function through the following formula: Among them, L property Indicates the loss of crude oil properties, n represents the number of samples, p represents the quantity of crude oil properties, w k represents the weight of the k-th crude oil property, x true,ik represents the actual value of the kth crude oil property in sample i, x pred,ik represents the predicted value of the kth crude oil property in sample i, s k represents the standard deviation of the kth crude oil property.

5. The rescheduling method applicable to crude oil supply fluctuation according to claim 3, characterized in that: The rescheduling method applicable to crude oil supply fluctuations establishes the device throughput objective function through the following formula: L capacity Indicates the loss of device processing capacity, n represents the number of samples, m represents the amount of device processing capacity, y true,ij represents the actual value of the jth device processing capacity in sample i, y pred,ij represents the predicted value of the processing capacity of the jth device in sample i, s j Represents the standard deviation of the throughput of the jth device.

6. The rescheduling method applicable to crude oil supply fluctuation according to claim 2, characterized in that: The rescheduling method applicable to crude oil supply fluctuations constructs a production prediction model through the following steps: Step C1: Based on an increasing time series, collect historical mixed crude oil properties, historical device processing volume and historical production of each device side line in the increasing time series, and pre-process the collected historical mixed crude oil properties, historical device processing volume and predicted production of each device side line; Step C2: according to the properties of the mixed crude oil, the processing capacity of the device and the sideline production of each device, the BP neural network structure is set, including the number of hidden layers, the number of nodes in each hidden layer, the activation function of the hidden layer and the number of nodes in the output layer; Step C3: According to the set BP neural network structure, the historical mixed crude oil properties and the historical unit processing volume are used as model inputs, and the historical production of the unit side line is used as model output to perform model training to obtain a production prediction model; Step C4: Verify the trained yield prediction model, and optimize the BP neural network structure and parameters based on the verification results.

7. The rescheduling method applicable to crude oil supply fluctuation according to claim 6, characterized in that: In step C1, the rescheduling method applicable to crude oil supply fluctuations uses missing value processing and outlier processing to pre-process the collected historical mixed crude oil properties, historical device processing volume, and predicted sideline production of each device; wherein, When dealing with missing values, linear interpolation is used to fill in the missing values; When performing outlier processing, the outliers are directly removed.

8. The rescheduling method applicable to crude oil supply fluctuation according to claim 7, characterized in that: The rescheduling method for crude oil supply fluctuations uses the following linear interpolation formula to handle missing values: Where y1 and y2 represent the known values ​​of crude oil properties, unit throughput or unit sideline production at time x1 and x2. x1 and x2 represent the time points corresponding to these values, y is the value of the interpolation point, and x is the time corresponding to the interpolation point value.

9. The rescheduling method applicable to crude oil supply fluctuation according to claim 6, characterized in that: In step C3, when performing model training, the rescheduling method suitable for crude oil supply fluctuations adopts the weighted mean square error (MSE) as the error indicator function, and selects the optimizer Adam that can process data of different gradient scales as the training algorithm of the model to perform model training; wherein, when performing model training, the rescheduling method suitable for crude oil supply fluctuations also adopts the Dropout method to prevent overfitting during model training.

10. The rescheduling method applicable to crude oil supply fluctuation according to claim 6, characterized in that: In step C4, when performing model verification for the rescheduling method applicable to crude oil supply fluctuations, the production prediction model is tested using an independent verification data set, and the mean square error (MSE) and R of the production prediction model on the verification data set are calculated. 2 , in order to evaluate the accuracy of the yield prediction model; among them, R 2 The formula is as follows: Among them, SS res represents the sum of squares of the differences between the actual observed values ​​and the values ​​predicted by the model, SS tot Represents the sum of squares of the differences between the actual observations and the mean of the observations.

11. The method for rescheduling crude oil supply fluctuations according to claim 1, characterized in that: The historical arrival data of each crude oil includes the historical normal arrival times, historical fluctuation arrival times and historical fluctuation days of each crude oil. The rescheduling method applicable to crude oil supply fluctuation calculates the average fluctuation days of each crude oil based on the collected historical arrival data of each crude oil, and uses the average fluctuation days of each crude oil as the expected fluctuation days of each crude oil in the future; wherein, the average fluctuation days d of each crude oil is i The calculation formula is as follows: Among them, m i It indicates the total number of times crude oil i has arrived at the factory in history. n i is the historical arrival fluctuation times of crude oil i, d ij is the number of days of the jth fluctuation of crude oil i.

12. The rescheduling method applicable to crude oil supply fluctuation according to claim 2, characterized in that: When the rescheduling method applicable to crude oil supply fluctuations uses a gradient descent algorithm to adjust the crude oil ratio, the constraint conditions of the corresponding device sideline products are established based on the predicted production of each device sideline. The formula is as follows: b=Ax in, represents the constraint vector of the device sideline product, represents a constraint matrix, where s represents the sideline output of the corresponding device, r represents the number of products involved in the sales demand, is the production vector of each side line.

13. The rescheduling method applicable to crude oil supply fluctuation according to claim 12, characterized in that: The rescheduling method applicable to crude oil supply fluctuations adjusts the crude oil ratio by the following steps: Step D1: Based on the constructed production prediction model, define the objective function for adjusting the crude oil ratio. The formula is as follows: Wherein, P(x) represents the predicted production of each device sideline predicted by the production prediction model, which depends on the crude oil ratio x, A represents a constraint matrix, and b represents the constraint vector of the device sideline product; Step D2: Calculate the gradient of the objective function J(x) with respect to the crude oil ratio x. The formula is as follows: in, represents the partial derivative of P(x) with respect to x; Step D3: Use the gradient descent method to update the crude oil ratio. The formula is as follows: Among them, β∈[0.001,0.01] represents a learning rate. The higher β is, the higher the learning efficiency of the model for the training set is, and the lower β is, the lower the learning efficiency of the model for the training set is.

14. A computer readable medium storing computer program code, characterized in that: The computer program code implements the method according to any one of claims 1 to 3 when executed by a processor.

15. A rescheduling device suitable for crude oil supply fluctuations, characterized in that: include: a memory for storing instructions executable by a processor; as well as A processor, configured to execute the instructions to implement the method according to any one of claims 1 to 3.