Method and system for constructing port crude oil import volume prediction model

By standardizing and feature engineering the sample data of multiple historical time periods, key features are extracted and the initial port crude oil import prediction model is trained, and the model fusion strategy is adopted to solve the prediction deviation problem caused by relying on historical data in the existing technology, and the prediction accuracy and robustness are improved.

CN119784276AInactive Publication Date: 2025-04-08TRANSPORT PLANNING & RES INST MINIST OF TRANSPORT

Patent Information

Application Number
CN202510286876.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the forecast of port crude oil imports mainly relies on historical data, ignoring factors such as policy changes, market fluctuations and emergencies, resulting in deviations in the forecast results.

Method used

A port crude oil import prediction model construction method is adopted, and the target characteristics such as the growth rate of refined oil output, the growth rate of other oil products, the volatility of crude oil price and the utilization rate of refining capacity are extracted based on these characteristics, and the initial port crude oil import prediction model is trained to improve the prediction accuracy through the model fusion strategy.

Benefits of technology

Effectively combine multiple factors to improve the robustness and accuracy of the port crude oil import prediction model and reduce the error of the overall prediction result.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784276A_ABST
    Figure CN119784276A_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for constructing a port crude oil import volume prediction model, which relates to the technical field of port crude oil import volume prediction. The method uses a variety of factors in training the port crude oil import volume prediction model, so the prediction accuracy of the model can be effectively guaranteed. In addition, the initial port crude oil import volume prediction model is composed of a first initial model and a second initial model. The output result of the initial port crude oil import volume prediction model is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model. The model fusion strategy can combine the advantages of the first initial model and the second initial model, reduce the possible deviation or deficiency of a single model, and improve the robustness of the port crude oil import volume prediction model, thereby reducing the error of the overall prediction result and improving the accuracy of the port crude oil import volume prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of port crude oil import volume prediction, and in particular to a port crude oil import volume prediction model construction method and system. Background Art

[0002] As one of the most important energy sources in the world, accurate prediction of crude oil port import volume is of great significance to energy security, refinery production planning and port operation management. This not only helps to improve the security and resilience of the port crude oil logistics supply chain, but also ensures the stable development of the petrochemical industry.

[0003] In the existing technology, there are many studies on port throughput prediction methods, but there is almost no technology specifically for port crude oil import prediction. Port throughput prediction mainly relies on historical data, such as time series analysis, regression analysis and gray prediction, but the above methods overly rely on the characteristics of historical data changes, ignoring factors such as policy changes, market fluctuations, and emergencies, resulting in deviations in prediction results. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for constructing a port crude oil import volume prediction model to improve the accuracy of the port crude oil import volume prediction results.

[0005] In a first aspect, the present invention provides a method for constructing a port crude oil import volume prediction model, comprising: obtaining sample data of multiple historical time periods; wherein the sample data include: refined oil output, other oil product output, imported crude oil price, refining capacity utilization rate, crude oil processing volume and port crude oil import volume; refined oil includes: gasoline, diesel and kerosene; other oil products include: naphtha, fuel oil, liquefied petroleum gas and petroleum asphalt; standardizing the sample data of multiple historical time periods to obtain multiple groups of standard sample data; performing feature engineering on the multiple groups of standard sample data to obtain multiple groups of target features; wherein the target features include: refined oil output growth rate, other oil product output growth rate, crude oil price volatility, etc. The prediction model of crude oil import volume at the target port is trained based on multiple groups of standard sample data and multiple groups of target features to obtain the prediction model of crude oil import volume at the target port. The prediction model of crude oil import volume at the target port is composed of the first initial model and the second initial model. The training data of the first initial model are multiple groups of target features and the corresponding crude oil import volume at the port. The training data of the second initial model are the standardized refined oil production, other oil product production, crude oil processing volume and crude oil import volume at the port in multiple historical time periods. The output result of the prediction model of crude oil import volume at the target port is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model.

[0006] In an optional implementation, sample data from multiple historical time periods are standardized to obtain multiple groups of standard sample data, including: calculating the mean and standard deviation of target sample data from multiple historical time periods; wherein the target sample data represents any type of data in the sample data; screening and deleting outliers from the target sample data from multiple historical time periods based on the mean and standard deviation; performing linear interpolation on the remaining target sample data after deleting the outliers to fill in the data at positions corresponding to the outliers to obtain cleaned target sample data; and normalizing the cleaned target sample data to obtain standardized target sample data.

[0007] In an optional embodiment, an initial port crude oil import volume prediction model is trained based on multiple groups of standard sample data and multiple groups of target features, including: performing dimensionality reduction processing on the multiple groups of target features to obtain multiple groups of target features after dimensionality reduction; using the multiple groups of target features after dimensionality reduction as input data and the port crude oil import volume as labels of the corresponding group target features, to train a first initial model to obtain a first target model; using the standardized finished oil production and other oil product production in multiple historical time periods as input data and the crude oil processing volume and the port crude oil import volume as labels of the corresponding standard sample data, to train a second initial model to obtain a second target model; and determining a target port crude oil import volume prediction model based on the first target model and the second target model.

[0008] In an optional embodiment, the training process of the second initial model includes: based on the standardized finished oil production and other oil product production in the target historical time period, predicting the crude oil processing volume in the target historical time period, and obtaining a predicted value of the crude oil processing volume; wherein the target historical time period represents any historical time period among multiple historical time periods; calculating a first loss function value based on the crude oil processing volume label and the predicted value of the crude oil processing volume in the target historical time period; predicting the crude oil import volume in the target historical time period based on the predicted value of the crude oil processing volume, and obtaining a predicted value of the crude oil import volume; calculating a second loss function value based on the crude oil import volume label and the predicted value of the crude oil import volume in the target historical time period; and training the second initial model based on the first loss function value and the second loss function value.

[0009] In an optional embodiment, based on the first target model and the second target model, a target port crude oil import volume prediction model is determined, including: weighted summing the crude oil import volume prediction results of the first target model and the crude oil import volume prediction results of the second target model to obtain a weighted crude oil import volume prediction value; calculating a third loss function value based on the weighted crude oil import volume prediction value and the corresponding crude oil import volume label; and using the third loss function value to train the first target model and the second target model to obtain the target port crude oil import volume prediction model.

[0010] In an optional embodiment, the target port crude oil import volume prediction model is expressed as: ;in, It represents the forecast result of crude oil import volume at the port. represents the prediction result of the first target model for the port crude oil import volume, represents the prediction result of the second objective model for the port crude oil import volume, represents the weight, , , , represents the growth rate of refined oil production, represents the growth rate of other oil products output, represents the volatility of crude oil prices, represents the change rate of refinery capacity utilization, represents the standardized output of refined oil products, represents the standardized output of other oil products, represents the predicted value of crude oil processing volume, represents the crude oil processing volume based on the normalized refined oil production forecast, Represents the crude oil processing volume predicted based on the normalized production of other oil products.

[0011] In an optional implementation, dimension reduction is performed on the multiple groups of target features, including: performing principal component analysis on the multiple groups of target features to obtain the multiple groups of target features after dimension reduction.

[0012] In a second aspect, the present invention provides a port crude oil import volume prediction model construction system, including: an acquisition module, used to acquire sample data of multiple historical time periods; wherein the sample data include: refined oil output, other oil product output, imported crude oil price, refining capacity utilization rate, crude oil processing volume and port crude oil import volume; refined oil includes: gasoline, diesel and kerosene; other oil products include: naphtha, fuel oil, liquefied petroleum gas and petroleum asphalt; a standardization module, used to perform standardization processing on sample data of multiple historical time periods to obtain multiple groups of standard sample data; a feature engineering module, used to perform feature engineering processing on multiple groups of standard sample data to obtain multiple groups of target features; wherein the target features include: refined oil output growth rate, other oil product output growth rate, growth rate, crude oil price volatility and refining capacity utilization rate change rate; a training module is used to train the initial port crude oil import volume prediction model based on multiple groups of standard sample data and multiple groups of target features to obtain the target port crude oil import volume prediction model; wherein the initial port crude oil import volume prediction model consists of a first initial model and a second initial model; the training data of the first initial model are multiple groups of target features and the corresponding port crude oil import volume; the training data of the second initial model are the standardized finished oil production, other oil product production, crude oil processing volume and port crude oil import volume in multiple historical time periods; the output result of the initial port crude oil import volume prediction model is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model.

[0013] In a third aspect, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the method for constructing a port crude oil import volume prediction model according to any one of the aforementioned embodiments is implemented.

[0014] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implements the method for constructing a port crude oil import volume prediction model according to any one of the aforementioned embodiments.

[0015] The present invention provides a method for constructing a port crude oil import volume prediction model. The method uses a variety of factors in training the port crude oil import volume prediction model: finished oil output, other oil product output, crude oil processing volume, finished oil output growth rate, other oil product output growth rate, crude oil price volatility and refining capacity utilization rate change rate, so the prediction accuracy of the model can be effectively guaranteed. In addition, the initial port crude oil import volume prediction model is composed of a first initial model and a second initial model. The output result of the initial port crude oil import volume prediction model is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model. The model fusion strategy can combine the advantages of the first initial model and the second initial model, reduce the possible deviation or deficiency of a single model, and improve the robustness of the port crude oil import volume prediction model, thereby reducing the error of the overall prediction result and improving the accuracy of the port crude oil import volume prediction result. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 A flowchart of a method for constructing a port crude oil import volume prediction model provided by an embodiment of the present invention; Figure 2 It is the fitting result diagram of crude oil processing volume and finished oil output determined based on sample data; Figure 3 It is the fitting result diagram of crude oil processing volume and other oil product output determined based on sample data; Figure 4 It is the fitting result diagram of crude oil processing volume and port crude oil import volume determined based on sample data; Figure 5 It is a comparison chart between the prediction results of the target port crude oil import volume prediction model and the actual port crude oil import volume; Figure 6 A functional module diagram of a port crude oil import volume prediction model construction system provided by an embodiment of the present invention; Figure 7 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0019] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0021] Embodiment 1 Figure 1 A flowchart of a method for constructing a port crude oil import volume prediction model provided by an embodiment of the present invention is as follows: Figure 1 As shown, the method specifically comprises the following steps: Step S102, obtaining sample data of multiple historical time periods.

[0022] Specifically, in order to obtain a model that can predict the port crude oil import volume (hereinafter referred to as the prediction model), the embodiment of the present invention first obtains the source data used for prediction model training, specifically sample data of multiple historical time periods, wherein the sample data includes: refined oil production, other oil product production, imported crude oil price, refining capacity utilization, crude oil processing volume and port crude oil import volume; refined oil includes: gasoline, diesel and kerosene; other oil products include: naphtha, fuel oil, liquefied petroleum gas and petroleum asphalt. The above sample data can be obtained through statistical reports issued by relevant departments, research reports issued by industry associations, corporate annual reports, financial data platforms, data released by international organizations and other channels. The above sample data are all parameters whose correlation with the port crude oil import volume exceeds the specified threshold, and the diversification of sample data can ensure that the output of the prediction model is the result of comprehensive consideration, thereby obtaining a higher prediction accuracy.

[0023] The embodiment of the present invention does not specifically limit the duration of the historical time period, such as one month, one quarter, one year, or even many years, and the user can set it according to the actual forecasting needs. In the embodiment of the present invention, refined oil products include gasoline, diesel and kerosene. Therefore, the output of refined oil products in a historical time period is the sum of the gasoline output, diesel output and kerosene output in the historical time period. Similarly, the output of other oil products in a historical time period is the sum of the naphtha output, fuel oil output, liquefied petroleum gas output and petroleum asphalt output in the historical time period.

[0024] Step S104, standardize the sample data of multiple historical time periods to obtain multiple groups of standard sample data.

[0025] In order to ensure the accuracy of model prediction, the quality of the sample data used for model training must be guaranteed. Therefore, after acquiring sample data of multiple historical time periods, the embodiment of the present invention performs standardization processing on the sample data. Standardization processing can not only improve the data quality of the sample data, but also reduce the amount of calculation for model training and improve the convergence speed of model training. The embodiment of the present invention does not specifically limit the method of standardization processing, and users can choose according to actual needs.

[0026] Step S106, performing feature engineering processing on the multiple groups of standard sample data to obtain multiple groups of target features.

[0027] In order to improve the performance of the prediction model, after obtaining multiple groups of standard sample data, the embodiment of the present invention further performs feature engineering processing on the multiple groups of standard sample data to extract multiple groups of key target features, wherein the target features include: the growth rate of refined oil production, the growth rate of other oil product production, the volatility of crude oil prices and the change rate of refining capacity utilization. The target features enable the prediction model to more effectively capture the key information of the standard sample data. According to the parameter meanings of the above-mentioned target features, if there are M groups of standard sample data in total, then this step can obtain M-1 groups of target features. Specifically, the i-th group of target features corresponds to the i+1-th group of standard sample data, and the i-th group of target features is calculated based on the i-th group of standard sample data and the i+1-th group of standard sample data, and the i-th group of standard sample data and the i+1-th group of standard sample data are two adjacent historical time periods.

[0028] Step S108, based on multiple groups of standard sample data and multiple groups of target features, the initial port crude oil import volume prediction model is trained to obtain the target port crude oil import volume prediction model.

[0029] After a series of processing is completed on the sample data, the model training process is entered. In the embodiment of the present invention, the initial port crude oil import volume prediction model is composed of a first initial model and a second initial model; the training data of the first initial model are multiple groups of target features and corresponding port crude oil import volumes; the training data of the second initial model are the standardized finished oil production, other oil product production, crude oil processing volume and port crude oil import volume in multiple historical time periods; the output result of the initial port crude oil import volume prediction model is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model.

[0030] That is to say, the embodiment of the present invention adopts a model fusion strategy. The first initial model and the second initial model are models for predicting the port crude oil import volume from different perspectives and based on different data sets, so they can capture different laws and patterns in the data. By taking the weighted sum of the prediction results of the two models, the advantages of the two models can be combined, while reducing the deviations or deficiencies of a single model.

[0031] If the first initial model or the second initial model performs poorly due to data noise, model overfitting or other reasons, then another well-performing model can compensate it to a certain extent by weighted sum, thereby reducing the error of the overall prediction result of the prediction model and improving the robustness of the prediction model.

[0032] The embodiment of the present invention provides a method for constructing a port crude oil import volume prediction model. The method uses a variety of factors in training the port crude oil import volume prediction model: refined oil output, other oil product output, crude oil processing volume, refined oil output growth rate, other oil product output growth rate, crude oil price volatility and refining capacity utilization rate change rate, so that the model prediction accuracy can be effectively guaranteed. In addition, the initial port crude oil import volume prediction model is composed of a first initial model and a second initial model. The output result of the initial port crude oil import volume prediction model is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model. The model fusion strategy can combine the advantages of the first initial model and the second initial model, reduce the possible deviations or deficiencies of a single model, and improve the robustness of the port crude oil import volume prediction model, thereby reducing the error of the overall prediction result and improving the accuracy of the port crude oil import volume prediction result.

[0033] In an optional implementation, the sample data of multiple historical time periods are standardized to obtain multiple groups of standard sample data, which specifically includes the following steps: Step S1041, calculating the mean and standard deviation of target sample data in multiple historical time periods; wherein the target sample data represents any type of sample data.

[0034] Step S1042, screening and deleting outliers from target sample data of multiple historical time periods based on the mean and standard deviation.

[0035] Step S1043, performing linear interpolation processing on the remaining target sample data after deleting the outliers to fill in the data at the positions corresponding to the outliers to obtain the cleaned target sample data.

[0036] Step S1044, normalize the cleaned target sample data to obtain standardized target sample data.

[0037] Specifically, when standardizing sample data from multiple historical time periods, it is necessary to classify and standardize them, that is, the output of refined oil, output of other oil products, price of imported crude oil, utilization rate of refining capacity, crude oil processing volume and port crude oil import volume of multiple historical time periods are standardized respectively.

[0038] For ease of understanding, the following example uses the standardization of refined oil production as an example to explain. First, the mean of refined oil production in multiple historical time periods is calculated. and standard deviation .if , then determine is an outlier, among which Represents the production of refined oil in any historical period. After the outliers are identified using the above method, they are deleted, and the remaining positions are filled by the remaining normal refined oil production through linear interpolation. The above data processing flow can be understood as the process of data cleaning.

[0039] After data cleaning is completed, the embodiment of the present invention further normalizes various types of sample data so that all sample data are on the same scale, thereby enabling the prediction model to learn the inherent laws and characteristics of the data more quickly, thereby improving the training efficiency, convergence and stability of the model.

[0040] In an optional implementation manner, the above step S108, based on multiple groups of standard sample data and multiple groups of target features, trains the initial port crude oil import volume prediction model, specifically including the following steps: Step S1081, performing dimensionality reduction processing on multiple groups of target features to obtain multiple groups of target features after dimensionality reduction.

[0041] Specifically, in order to reduce the complexity of the model and improve the stability and generalization ability of the model, before model training, the embodiment of the present invention further performs dimensionality reduction processing on the multiple groups of target features that have been extracted to obtain multiple groups of target features after dimensionality reduction. The embodiment of the present invention does not specifically limit the method of dimensionality reduction processing, such as through principal component analysis, autoencoder and other technical means.

[0042] In an optional implementation, dimension reduction is performed on the multiple groups of target features, which specifically includes the following contents: principal component analysis is performed on the multiple groups of target features to obtain multiple groups of target features after dimension reduction.

[0043] Step S1082, using the multiple groups of target features after dimensionality reduction as input data and the port crude oil import volume as labels of the corresponding groups of target features, training the first initial model to obtain the first target model.

[0044] Step S1083, using the standardized finished oil production and other oil product production in multiple historical time periods as input data, crude oil processing volume and port crude oil import volume as labels of corresponding standard sample data, to train the second initial model and obtain the second target model.

[0045] In the embodiment of the present invention, both the first target model and the second target model can predict the port crude oil import volume, but the data used by the two in the training stage are different. The input data of the first initial model is the target feature after dimensionality reduction, and the output data is the predicted value of the port crude oil import volume, and the actual port crude oil import volume is used as the label of the corresponding target feature.

[0046] The input data of the second initial model is the standardized output of refined oil and other oil products in multiple historical time periods, and the output data is the predicted value of port crude oil imports, while the crude oil processing volume and port crude oil imports are used as labels for the corresponding standard sample data. Specifically, the second initial model does not directly use the standardized output of refined oil and other oil products in multiple historical time periods to predict the port crude oil imports, but first predicts the crude oil processing volume based on the above two types of data, and then uses the predicted crude oil processing volume to predict the port crude oil imports. Compared with the method of directly using crude oil processing volume to predict port crude oil imports, the prediction method of the second initial model can reduce the model's sensitivity to specific features, improve the model's generalization ability, and reduce model errors.

[0047] Step S1084, determining a target port crude oil import volume prediction model based on the first target model and the second target model.

[0048] By training the first initial model and the second initial model respectively, the first target model and the second target model can be obtained. At this time, the model training process can be ended, and the output results of the first target model and the second target model can be weighted by using the preset weights to obtain the target port crude oil import volume prediction model. The user can also further train the first target model and the second target model synchronously to determine the optimal weights and optimize the model parameters of the two models, thereby further enhancing the complementarity of the first target model and the second target model and improving the performance of the target port crude oil import volume prediction model.

[0049] In an optional implementation, the training process of the second initial model includes the following steps: Step S201, based on the standardized finished oil production and other oil product production in the target historical time period, predict the crude oil processing volume in the target historical time period to obtain a predicted value of the crude oil processing volume; wherein the target historical time period represents any historical time period among multiple historical time periods.

[0050] Optionally, crude oil processing volume can be predicted in two optional ways. One is to directly construct a binary linear regression equation between crude oil processing volume and the standardized finished oil production and other oil product production in the target historical time period, that is, crude oil processing volume = x1*other oil product production + x2*finished oil production + x3, x1, x2, x3 all represent equation coefficients.

[0051] The other is to establish prediction equations for crude oil processing volume and refined oil output, crude oil processing volume and other oil product output respectively according to the characteristics of data relationship, and then take the arithmetic average of the two prediction results, that is, , represents the predicted value of crude oil processing volume, represents the crude oil processing volume based on the normalized refined oil production forecast, represents the crude oil processing volume based on the normalized production of other oil products. represents the standardized output of refined oil products, Represents the standardized output of other oil products.

[0052] Through the analysis of historical data and actual changes in crude oil processing volume, refined oil production, and other oil product production, the study found that it is more appropriate to establish a univariate linear regression equation for crude oil processing volume and refined oil production, and it is more appropriate to establish a logarithmic function prediction equation for crude oil processing volume and other oil product production, that is, , , , , , They all represent equation coefficients.

[0053] Step S202, calculating a first loss function value based on the crude oil processing volume label and the crude oil processing volume forecast value in the target historical time period.

[0054] The embodiment of the present invention does not specifically limit the calculation method of the first loss function value, as long as the rule that the smaller the error between the crude oil processing volume label (that is, the actual crude oil processing volume) and the crude oil processing volume prediction value, the smaller the first loss function value is is followed. For example, the square of the difference between the two is calculated.

[0055] Step S203, predicting the crude oil import volume in the target historical time period based on the crude oil processing volume forecast value to obtain the crude oil import volume forecast value.

[0056] In combination with data correlation and variation characteristics, and considering the convenience of the prediction method, the embodiment of the present invention chooses to establish a linear regression equation between the predicted value of crude oil processing volume and the original import volume of the port. That is, ,in, , are equation coefficients, It represents the prediction result of the second objective model on the port crude oil import volume.

[0057] Step S204, calculating a second loss function value based on the crude oil import volume label and the crude oil import volume forecast value in the target historical time period.

[0058] The calculation rule of the first loss function value is similar to that of the first loss function value. As long as the error between the port crude oil import volume label (that is, the actual port crude oil import volume) and the crude oil import volume forecast value is smaller, the second loss function value is smaller. Similarly, the second loss function can choose to calculate the square of the difference between the two.

[0059] Step S205: training the second initial model based on the first loss function value and the second loss function value.

[0060] Optionally, the weighted sum of the first loss function and the second loss function is used as the loss function of the second initial model, and the model parameters are optimized and trained until a preset number of training times is reached or the loss function value is less than a preset threshold, then the training can be stopped to obtain the second target model. In addition, the second target model can also calculate the above two loss function values ​​in a batch processing manner.

[0061] The following Table 1 is the sample data used to train the second initial model. According to the data in Table 1, we can obtain: ; , .

[0062] Figure 2 This is the fitting result diagram of crude oil processing volume and finished oil output determined based on sample data. Figure 3 This is the fitting result diagram of crude oil processing volume and other oil product output determined based on sample data. Figure 4 This is a fitting result chart of crude oil processing volume and port crude oil import volume determined based on sample data.

[0063] Table 1 Original data used for prediction

[0064] The above article describes in detail the process of obtaining the second target model. In view of the fact that a conventional data label is used in the training process of the first target model, its training method can refer to the conventional model training method process. The training goal is to make the error between the model's predicted value and the label less than a preset threshold. Optionally, the first target model can select an LSTM (Long Short-Term Memory) neural network model, or a hybrid network of a convolutional neural network (CNN) and LSTM.

[0065] In an optional implementation manner, the above step S1084, based on the first target model and the second target model, determines the target port crude oil import volume prediction model, specifically comprising the following steps: Step S10841, weighting and summing the crude oil import volume prediction result of the first target model and the crude oil import volume prediction result of the second target model to obtain a weighted crude oil import volume prediction value.

[0066] Step S10842, calculating the third loss function value based on the weighted crude oil import volume forecast value and the corresponding crude oil import volume label.

[0067] Step S10843, using the third loss function value to train the first target model and the second target model to obtain a target port crude oil import volume prediction model.

[0068] That is, a specific implementation method for synchronously training the first target model and the second target model is provided herein. After the first target model and the second target model are trained separately, the training data are respectively input into the two models based on their respective model parameters, and then the output results of the two models are weighted and summed to obtain the weighted crude oil import volume prediction value, and then the third loss function value between the weighted crude oil import volume prediction value and the corresponding crude oil import volume label is calculated, such as the square of the difference, and the first target model and the second target model are trained simultaneously using the third loss function value until the preset training end condition is met (the specified number of training times or the specified prediction accuracy is reached), and the crude oil import volume prediction model of the target port is obtained. Figure 5 This is a comparison chart between the prediction results of the target port crude oil import volume prediction model and the actual port crude oil import volume. Figure 5 It can be seen that the prediction model can make high-precision predictions on the port crude oil import volume.

[0069] In an optional implementation, the target port crude oil import volume prediction model is expressed as: ;in, It represents the forecast result of crude oil import volume at the port. represents the prediction result of the first target model for the port crude oil import volume, represents the prediction result of the second objective model for the port crude oil import volume, represents the weight, , , , represents the growth rate of refined oil production, represents the growth rate of other oil products output, represents the volatility of crude oil prices, represents the change rate of refinery capacity utilization, represents the standardized output of refined oil products, represents the standardized output of other oil products, represents the predicted value of crude oil processing volume, represents the crude oil processing volume based on the normalized refined oil production forecast, Represents the crude oil processing volume predicted based on the normalized production of other oil products.

[0070] In the embodiment of the present invention, the target port crude oil import volume prediction model can also adaptively adjust the model structure according to the type of data actually obtained. If only the input data of the first target model is obtained, and the input data of the second target model is not fully obtained, then the weight of the second target input model is set to 0, and the weight of the first target input model is set to 1, that is, The value is 1; conversely, if only the input data of the second target model is obtained, and the input data of the first target model is not fully obtained, then the weight of the first target input model is set to 0, and the weight of the second target input model is set to 1, that is, The value is 0.

[0071] In summary, an embodiment of the present invention provides a method for constructing a port crude oil import volume prediction model. When constructing the prediction model, various factors affecting the port crude oil import volume are integrated, and a model fusion strategy is used. Therefore, the robustness of the model can be effectively improved and the prediction accuracy of the model can be ensured.

[0072] Embodiment 2 An embodiment of the present invention also provides a port crude oil import volume prediction model construction system, which is mainly used to execute the port crude oil import volume prediction model construction method provided in the above-mentioned embodiment 1. The port crude oil import volume prediction model construction system provided in the embodiment of the present invention is specifically introduced below.

[0073] Figure 6 A functional module diagram of a port crude oil import volume prediction model construction system provided by an embodiment of the present invention, such as Figure 6 As shown, the device mainly includes: an acquisition module 10, a standardization module 20, a feature engineering module 30, and a training module 40, wherein: The acquisition module 10 is used to obtain sample data of multiple historical time periods; wherein the sample data includes: finished oil output, other oil product output, imported crude oil price, refining capacity utilization rate, crude oil processing volume and port crude oil import volume; finished oil includes: gasoline, diesel and kerosene; other oil products include: naphtha, fuel oil, liquefied petroleum gas and petroleum asphalt.

[0074] The standardization module 20 is used to perform standardization processing on sample data of multiple historical time periods to obtain multiple groups of standard sample data.

[0075] The feature engineering module 30 is used to perform feature engineering processing on multiple groups of standard sample data to obtain multiple groups of target features; wherein the target features include: the growth rate of finished oil production, the growth rate of other oil product production, the volatility of crude oil prices and the change rate of refining capacity utilization.

[0076] The training module 40 is used to train the initial port crude oil import volume prediction model based on multiple groups of standard sample data and multiple groups of target features to obtain the target port crude oil import volume prediction model; wherein the initial port crude oil import volume prediction model is composed of a first initial model and a second initial model; the training data of the first initial model are multiple groups of target features and corresponding port crude oil import volumes; the training data of the second initial model are the standardized refined oil production, other oil product production, crude oil processing volume and port crude oil import volume in multiple historical time periods; the output result of the initial port crude oil import volume prediction model is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model.

[0077] The embodiment of the present invention provides a port crude oil import volume prediction model construction system, which uses a variety of factors in training the port crude oil import volume prediction model: refined oil output, other oil product output, crude oil processing volume, refined oil output growth rate, other oil product output growth rate, crude oil price volatility and refining capacity utilization rate change rate, so it can effectively ensure the model prediction accuracy. In addition, the initial port crude oil import volume prediction model is composed of a first initial model and a second initial model, and the output result of the initial port crude oil import volume prediction model is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model. The model fusion strategy can combine the advantages of the first initial model and the second initial model, reduce the possible deviations or deficiencies of a single model, and improve the robustness of the port crude oil import volume prediction model, thereby reducing the error of the overall prediction result and improving the accuracy of the port crude oil import volume prediction result.

[0078] Optionally, the standardization module 20 is specifically used for: Calculate the mean and standard deviation of target sample data for multiple historical time periods; wherein the target sample data represents any type of sample data.

[0079] Filter and remove outliers from target sample data over multiple historical time periods based on mean and standard deviation.

[0080] The remaining target sample data after deleting the outliers are linearly interpolated to fill in the data at the positions corresponding to the outliers to obtain the cleaned target sample data.

[0081] The cleaned target sample data is normalized to obtain standardized target sample data.

[0082] Optionally, the training module 40 includes: The dimension reduction unit is used to perform dimension reduction processing on multiple groups of target features to obtain multiple groups of target features after dimension reduction.

[0083] The first training unit is used to train the first initial model by using the multiple groups of target features after dimensionality reduction as input data and the port crude oil import volume as labels of the target features of the corresponding groups to obtain the first target model.

[0084] The second training unit is used to train the second initial model using the standardized refined oil production and other oil product production in multiple historical time periods as input data, and the crude oil processing volume and port crude oil import volume as labels of corresponding standard sample data to obtain a second target model.

[0085] The determination unit is used to determine a prediction model for the crude oil import volume of a target port based on the first target model and the second target model.

[0086] Optionally, the training process of the second initial model includes: Based on the standardized finished oil production and other oil product production in the target historical time period, the crude oil processing volume in the target historical time period is predicted to obtain a predicted value of the crude oil processing volume; wherein the target historical time period represents any historical time period among multiple historical time periods.

[0087] Based on the crude oil processing volume label and the crude oil processing volume forecast value of the target historical time period, the first loss function value is calculated.

[0088] The crude oil import volume in the target historical period is predicted based on the crude oil processing volume forecast value to obtain the crude oil import volume forecast value.

[0089] Based on the crude oil import volume label and the crude oil import volume forecast value in the target historical time period, the second loss function value is calculated.

[0090] The second initial model is trained based on the first loss function value and the second loss function value.

[0091] Optionally, the determining unit is specifically configured to: The crude oil import volume forecast result of the first target model and the crude oil import volume forecast result of the second target model are weighted and summed to obtain a weighted crude oil import volume forecast value.

[0092] Based on the weighted crude oil import volume prediction value and the corresponding crude oil import volume label, the third loss function value is calculated.

[0093] The third loss function value is used to train the first target model and the second target model to obtain the target port crude oil import volume prediction model.

[0094] Alternatively, the target port crude oil import volume prediction model is expressed as: ;in, It represents the forecast result of crude oil import volume at the port. represents the prediction result of the first target model for the port crude oil import volume, represents the prediction result of the second objective model for the port crude oil import volume, represents the weight, , , , represents the growth rate of refined oil production, represents the growth rate of other oil products output, represents the volatility of crude oil prices, represents the change rate of refinery capacity utilization, represents the standardized output of refined oil products, represents the standardized output of other oil products, represents the crude oil processing volume based on the normalized refined oil production forecast, Represents the crude oil processing volume predicted based on the normalized production of other oil products.

[0095] Optionally, the dimension reduction unit is specifically used to: perform principal component analysis on multiple groups of target features to obtain multiple groups of target features after dimension reduction.

[0096] Embodiment 3 See also Figure 7 An embodiment of the present invention provides an electronic device, which includes: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected via the bus 62; the processor 60 is used to execute an executable module stored in the memory 61, such as a computer program.

[0097] The memory 61 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0098] The bus 62 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0099] Among them, the memory 61 is used to store programs, and the processor 60 executes the program after receiving the execution instruction. The method executed by the device defined by the process disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 60 or implemented by the processor 60.

[0100] The processor 60 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 60. The above processor 60 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 61, and the processor 60 reads the information in the memory 61 and completes the steps of the above method in combination with its hardware.

[0101] A computer program product of a method and system for constructing a port crude oil import volume prediction model provided in an embodiment of the present invention includes a computer-readable storage medium storing a non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0102] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0103] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0104] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0105] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, or the positions or positional relationships in which the product of the invention is usually placed when in use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0106] In addition, the terms "horizontal", "vertical", "overhanging" and the like do not mean that the components are required to be absolutely horizontal or overhanging, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0107] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

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

Claims

1. A method for constructing a port crude oil import volume prediction model, characterized in that: include: Obtain sample data for multiple historical time periods; wherein the sample data includes: refined oil output, other oil product output, imported crude oil price, refining capacity utilization rate, crude oil processing volume and port crude oil import volume; the refined oil includes: gasoline, diesel and kerosene; the other oil products include: naphtha, fuel oil, liquefied petroleum gas and petroleum asphalt; Standardizing the sample data of the multiple historical time periods to obtain multiple groups of standard sample data; Performing feature engineering processing on the multiple groups of standard sample data to obtain multiple groups of target features; wherein the target features include: the growth rate of refined oil production, the growth rate of other oil product production, the volatility of crude oil prices and the change rate of refining capacity utilization; Based on the multiple groups of standard sample data and the multiple groups of target features, the initial port crude oil import volume prediction model is trained to obtain the target port crude oil import volume prediction model; wherein, the initial port crude oil import volume prediction model is composed of a first initial model and a second initial model; the training data of the first initial model are the multiple groups of target features and the corresponding port crude oil import volumes; the training data of the second initial model are the standardized finished oil production, other oil product production, crude oil processing volume and port crude oil import volumes in multiple historical time periods; the output result of the initial port crude oil import volume prediction model is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model.

2. The method for constructing a port crude oil import volume prediction model according to claim 1, characterized in that: The sample data of the multiple historical time periods are standardized to obtain multiple groups of standard sample data, including: Calculating the mean and standard deviation of the target sample data of the multiple historical time periods; wherein the target sample data represents any type of data in the sample data; Filtering and deleting outliers from the target sample data of the multiple historical time periods based on the mean and standard deviation; Performing linear interpolation processing on the remaining target sample data after deleting the outliers to fill in the data at the positions corresponding to the outliers to obtain the cleaned target sample data; The cleaned target sample data is normalized to obtain standardized target sample data.

3. The method for constructing a port crude oil import volume prediction model according to claim 1, characterized in that: Based on the multiple groups of standard sample data and the multiple groups of target features, the initial port crude oil import volume prediction model is trained, including: Performing dimensionality reduction processing on the multiple groups of target features to obtain multiple groups of target features after dimensionality reduction; The first initial model is trained by using the multiple groups of target features after dimension reduction as input data and the port crude oil import volume as labels of the target features of the corresponding groups to obtain a first target model; The second initial model is trained by using the standardized refined oil production and other oil product production in multiple historical time periods as input data, and the crude oil processing volume and port crude oil import volume as labels of corresponding standard sample data to obtain a second target model; Based on the first target model and the second target model, a prediction model for the crude oil import volume of the target port is determined.

4. The method for constructing a port crude oil import volume prediction model according to claim 3, characterized in that: The training process of the second initial model includes: Based on the standardized refined oil production and other oil product production in the target historical time period, predict the crude oil processing volume in the target historical time period to obtain a predicted value of the crude oil processing volume; wherein the target historical time period represents any historical time period among the multiple historical time periods; Calculating a first loss function value based on the crude oil processing volume label of the target historical time period and the crude oil processing volume forecast value; Predicting the crude oil import volume in the target historical time period based on the crude oil processing volume forecast value to obtain a crude oil import volume forecast value; Calculating a second loss function value based on the crude oil import volume label of the target historical time period and the predicted value of the crude oil import volume; The second initial model is trained based on the first loss function value and the second loss function value.

5. The method for constructing a port crude oil import volume prediction model according to claim 3, characterized in that: Determining the target port crude oil import volume prediction model based on the first target model and the second target model includes: The crude oil import volume prediction result of the first target model and the crude oil import volume prediction result of the second target model are weighted and summed to obtain a weighted crude oil import volume prediction value; Calculating a third loss function value based on the weighted crude oil import volume forecast value and the corresponding crude oil import volume label; The first target model and the second target model are trained using the third loss function value to obtain the crude oil import volume prediction model of the target port.

6. The method for constructing a port crude oil import volume prediction model according to claim 4, characterized in that: The target port crude oil import volume prediction model is expressed as: ; in, It represents the forecast result of crude oil import volume at the port. represents the prediction result of the first target model for the port crude oil import volume, represents the prediction result of the second objective model for the port crude oil import volume, represents the weight, , , , represents the growth rate of refined oil production, represents the growth rate of other oil products output, represents the volatility of crude oil prices, represents the change rate of refinery capacity utilization, represents the standardized output of refined oil products, represents the standardized output of other oil products, represents the predicted value of crude oil processing volume, represents the crude oil processing volume based on the normalized refined oil production forecast, Represents the crude oil processing volume predicted based on the normalized production of other oil products.

7. The method for constructing a port crude oil import volume prediction model according to claim 3, characterized in that: Performing dimensionality reduction processing on the multiple groups of target features, including: Principal component analysis is performed on the multiple groups of target features to obtain multiple groups of target features after dimension reduction.

8. A port crude oil import volume prediction model construction system, characterized in that: include: The acquisition module is used to acquire sample data of multiple historical time periods; wherein the sample data includes: refined oil output, other oil product output, imported crude oil price, refining capacity utilization rate, crude oil processing volume and port crude oil import volume; the refined oil includes: gasoline, diesel and kerosene; the other oil products include: naphtha, fuel oil, liquefied petroleum gas and petroleum asphalt; A standardization module, used for standardizing the sample data of the multiple historical time periods to obtain multiple groups of standard sample data; A feature engineering module is used to perform feature engineering processing on the multiple groups of standard sample data to obtain multiple groups of target features; wherein the target features include: the growth rate of refined oil production, the growth rate of other oil product production, the volatility of crude oil prices and the change rate of refining capacity utilization; A training module is used to train the initial port crude oil import volume prediction model based on the multiple groups of standard sample data and the multiple groups of target features to obtain a target port crude oil import volume prediction model; wherein the initial port crude oil import volume prediction model is composed of a first initial model and a second initial model; the training data of the first initial model are the multiple groups of target features and the corresponding port crude oil import volumes; the training data of the second initial model are the standardized finished oil production, other oil product production, crude oil processing volume and port crude oil import volumes in multiple historical time periods; the output result of the initial port crude oil import volume prediction model is the weighted sum of the first prediction result of the first initial model and the second prediction result of the second initial model.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the method for constructing a port crude oil import volume prediction model according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method for constructing a port crude oil import volume prediction model according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Recent demand forecasting method and application of country crude oil

    CN102750436A

  • Ship freight transport efficiency regulation and control method and system based on random forests and deep learning

    CN110298611A

  • Method and system for predicting total corn supply quantity

    CN112700041A

  • Port cargo throughput prediction method and system based on big data

    CN117494908A

Cited By

  • Coastal crude oil transportation prediction and early warning system and method based on supply and demand whole chain

    CN121189810A