Gas consumption prediction method based on neural network algorithm

The gas consumption prediction model is constructed through neural network algorithms, which solves the difficulty of gas consumption prediction in traditional methods under complex working conditions, and realizes accurate prediction of the oil and gas conveying system, which improves the safety and economic benefits of the system.

CN120278002APending Publication Date: 2025-07-08CIMC ENRIC ENGINEERING TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510341201.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

Traditional gas consumption prediction methods have limitations in dealing with complex nonlinear relationships and uncertainties, and it is difficult to deal with the variable working conditions and environmental factors in the oil and gas conveying system, which affects the design and operation costs of the conveying system and the safety and economic benefits of the production process.

Method used

The gas consumption prediction method based on neural network algorithm is adopted to construct experimental sample data sets, perform data preprocessing, and use the BP neural network model to train the gas consumption prediction model, combining real-time temperature and pressure data to predict gas consumption.

Benefits of technology

It realizes accurate prediction of gas consumption under different working conditions, supports the optimized design and operation of the oil and gas conveying system, and improves the safety and economic benefits of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278002A_ABST
    Figure CN120278002A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of oil and gas flow safety guarantee, and discloses a gas consumption prediction method based on a neural network algorithm, and the method comprises the steps: firstly, collecting the component data, experimental temperature data and experimental pressure data of a compound hydrate inhibitor in a hydrate generation experiment, building an experimental sample data set based on the collected data, and carrying out the calculation of the experimental sample data set; and training the neural network model based on the sample data set and the sample label data to obtain a gas consumption prediction model, and realizing gas consumption prediction through the gas consumption prediction model. In the model training process, various influence factors can be comprehensively considered, the complex mapping relation between the gas consumption and the various influence factors is established, accurate prediction of the gas consumption under different working conditions can be achieved, and therefore important decision support is provided for optimization design and operation of an oil and gas conveying system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of oil and gas flow safety assurance, and particularly relates to a gas consumption prediction method based on a neural network algorithm. Background Art

[0002] In the oil and gas industry, oil and gas flow safety assurance is a key technology to ensure the safe and effective transmission of oil and gas from the wellhead to the terminal processing facilities. With the increasing difficulty of oil and gas field exploitation and the complexity of the development environment, ensuring the reliable operation of the transportation system is particularly important.

[0003] Hydrates may form in oil and gas transportation pipelines under certain conditions, which may lead to catastrophic consequences. Hydrate inhibitors are chemical substances that inhibit the formation of hydrates in the exploitation, transportation, and processing of natural gas. Among them, gas consumption is an important parameter for evaluating the inhibition effect of hydrate inhibitors, and accurate prediction of gas consumption plays an important role. Gas consumption not only affects the design and operation costs of the transportation system, but also directly relates to the safety and economic benefits of the entire production process. Traditional gas consumption prediction usually relies on empirical formulas and numerical simulations based on physical models. However, these methods have certain limitations in dealing with complex non-linear relationships and uncertainties, and it is difficult to cope with the changing working conditions and environmental factors in actual production. Summary of the Invention

[0004] To solve the above problems, this application provides a gas consumption prediction method based on a neural network algorithm.

[0005] According to an embodiment of this application, a gas consumption prediction method based on a neural network algorithm is disclosed. The gas consumption prediction method includes the following steps:

[0006] Construct an experimental sample data set based on the component data of the compound hydrate inhibitor in the hydrate formation experiment, the experimental temperature data detected by the temperature sensor, and the experimental pressure data detected by the pressure sensor;

[0007] Perform data preprocessing on the sample data in the experimental sample data set to obtain a target sample data set;

[0008] Input the sample data in the target sample data set into the neural network model to obtain gas consumption prediction data corresponding to each sample data in the target sample data set;

[0009] Based on the gas consumption prediction data and the sample label data, adjust the model parameters of the neural network model to obtain a gas consumption prediction model, where the sample label data is the experimental gas consumption obtained based on the experimental temperature data and the experimental pressure data;

[0010] Input the component data, real-time temperature data, and real-time pressure data of the compound hydrate inhibitor into the gas consumption prediction model to obtain the gas consumption prediction result.

[0011] In some embodiments, preprocessing the sample data in the experimental sample data set to obtain a target sample data set includes: processing the null values in the experimental sample data set to obtain a first sample data set; deleting the sample data outside the constraint range in the first sample data set to obtain a second sample data set; normalizing the sample data in the second sample data set to obtain the target sample data set. And, before adjusting the model parameters of the neural network model based on the gas consumption prediction data and sample label data, the gas consumption prediction method further includes: obtaining the experimental gas consumption based on the experimental temperature data and the experimental pressure data; normalizing the experimental gas consumption to obtain the normalized experimental gas consumption; using the normalized experimental gas consumption as the value of the sample label data.

[0012] In some embodiments, processing the null values in the experimental sample data set to obtain a first sample data set includes: deleting the sample data with null data items in the experimental sample data set to obtain a first sample data set, where each sample data includes the component data of the compound hydrate inhibitor in the hydrate formation experiment, the experimental temperature data corresponding to the component data, and the experimental pressure data.

[0013] In some embodiments, processing the null values in the experimental sample data set to obtain a first sample data set includes: filling the null data items in the experimental sample data set to obtain a first sample data set.

[0014] In some embodiments, preprocessing the sample data in the experimental sample data set to obtain a target sample data set further includes: dividing the normalized sample data set into a training data set and a test data set to obtain a target sample data set including the training data set and the test data set.

[0015] In some embodiments, dividing the normalized sample data set into a training data set and a test data set includes: dividing the normalized sample data set into a training data set and a test data set according to a ratio of 8:2.

[0016] In some embodiments, obtaining the experimental gas consumption based on the experimental temperature data and the experimental pressure data includes: based on the relational expression Determine the gas consumption in the experiment; where P represents the experimental pressure data detected in the hydrate formation experiment, T represents the experimental temperature data detected in the hydrate formation experiment, V represents the gas volume in the reactor during the hydrate formation experiment, R represents the gas constant, Z represents the gas compressibility factor, and 0 and t represent the moments at t = 0 and at time t, respectively.

[0017] In some embodiments, the neural network model is a BP neural network model.

[0018] In some embodiments, the compound hydrate inhibitor includes solvent water, polyvinylpyrrolidone, monohydric alcohol compounds, and soluble chlorides, and the component data of the compound hydrate inhibitor includes the dosage of polyvinylpyrrolidone, the dosage of the monohydric alcohol compounds, and the dosage of the soluble chlorides.

[0019] In some embodiments, the monohydric alcohol compounds include any one of methanol, ethanol, and propanol.

[0020] In some embodiments, the soluble chlorides include any one of sodium chloride and potassium chloride.

[0021] The technical solutions provided in the embodiments of the present application at least include the following beneficial effects:

[0022] The solution disclosed in the present application first collects the component data, experimental temperature data, and experimental pressure data of the compound hydrate inhibitor in the hydrate formation experiment, constructs an experimental sample data set based on the collected data, then trains the neural network model based on the sample data set and sample label data to obtain a gas consumption prediction model, and realizes gas consumption prediction through the gas consumption prediction model. During the model training process, various influencing factors can be comprehensively considered, and a complex mapping relationship between gas consumption and various influencing factors can be established, which can accurately predict the gas consumption under different working conditions, thereby providing important decision-making support for the optimal design and operation of the oil and gas transportation system.

[0023] It should be understood that the above general description and the following detailed description are only exemplary and do not limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0025] Figure 1 Shows a flowchart of a gas consumption prediction method based on a neural network algorithm according to an embodiment of the present application;

[0026] Figure 2 Shows a curve graph of experimental temperature data collected according to an embodiment of the present application;

[0027] Figure 3 Shows the experimental pressure data curve graph collected in an embodiment of the present application;

[0028] Figure 4 Shows the detailed flowchart of the data preprocessing steps in an embodiment of the present application;

[0029] Figure 5 Shows the comparison graph between the gas consumption result predicted by the gas consumption prediction model in an embodiment of the present application and the actual gas consumption. Detailed implementation mode

[0030] Now, the exemplary embodiments will be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these exemplary embodiments are provided so that the description of the present application will be more complete and thorough, and will fully convey the concept of the exemplary embodiments to those skilled in the art.

[0031] In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more features.

[0032] In addition, the described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present application. However, those skilled in the art will realize that the technical solutions of the present application can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail to avoid obscuring aspects of the present application.

[0033] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all the contents and operations / steps, nor are they necessarily executed in the described order. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined, so the actual execution order may change according to the actual situation.

[0034] Gas consumption is an important parameter for evaluating the inhibition effect of hydrate inhibitors, and accurate prediction of gas consumption plays an important role. In the related art, it is usually dependent on empirical formulas and numerical simulations based on physical models to achieve gas consumption prediction. These methods have certain limitations in dealing with complex non-linear relationships and uncertainties and are difficult to cope with the changing working conditions and environmental factors in actual production.

[0035] To this end, the present application provides a gas consumption prediction method that can accurately predict the gas consumption under different working conditions. The method first collects the component data of the compound hydrate inhibitor, the experimental temperature data, and the experimental pressure data in the hydrate formation experiment, constructs an experimental sample data set based on the collected data, and then trains a neural network model based on the sample data set and the sample label data to obtain a gas consumption prediction model, and realizes gas consumption prediction through the gas consumption prediction model. During the model training process, various influencing factors can be comprehensively considered, and a complex mapping relationship between the gas consumption and various influencing factors can be established, so as to accurately predict the gas consumption under different working conditions, and provide important decision-making support for the optimal design and operation of the oil and gas transportation system.

[0036] The gas consumption in the present application may be the gas consumption of natural gas.

[0037] The following makes a detailed description of the gas consumption prediction method based on the neural network algorithm provided by the present application in combination with specific embodiments.

[0038] Figure 1 The flowchart of the gas consumption prediction method based on the neural network algorithm according to an embodiment of the present application is shown. Refer to Figure 1 As shown, the gas consumption prediction method at least includes an experimental sample data set construction step, a data preprocessing step, a model training step, and a gas consumption prediction step, etc., corresponding to the following steps S110, step S120, steps S130-S140, and step S150 respectively, which are introduced in detail as follows:

[0039] In step S110, an experimental sample data set is constructed based on the component data of the compound hydrate inhibitor, the experimental temperature data detected by the temperature sensor, and the experimental pressure data detected by the pressure sensor in the hydrate formation experiment. Then, step S120 is executed.

[0040] Among them, the component data of the compound hydrate inhibitor includes the components of the compound hydrate inhibitor and the dosage of each component.

[0041] In some embodiments, the compound hydrate inhibitor includes solvent water, polyvinylpyrrolidone (PVP), monohydric alcohol compounds, and soluble chlorides. The component data of the compound hydrate inhibitor includes the dosage of polyvinylpyrrolidone, the dosage of monohydric alcohol compounds, and the dosage of soluble chlorides.

[0042] Among them, the solvent water is deionized water. Deionized water is water treated by ion exchange and contains almost no dissolved minerals, salts, and ions. By using deionized water, the interference of impurities in ordinary water on the effect of the inhibitor can be avoided, and the function of the inhibitor can be ensured not to be affected by other impurities.

[0043] As a non-ionic polymer compound, polyvinylpyrrolidone can form a thin film on the surface of hydrate crystals, hindering the growth and aggregation of hydrate crystals, thereby reducing the number of hydrate crystals and effectively delaying the nucleation and growth rate of hydrates.

[0044] As a thermodynamic hydrate inhibitor, the addition of monohydric alcohol compounds can significantly increase the formation temperature of hydrates. According to the thermodynamic principle, monohydric alcohols inhibit the formation of hydrates at higher temperatures, extending the formation time of hydrates.

[0045] Specifically, the monohydric alcohol compounds include any one of methanol, ethanol, and propanol.

[0046] In some embodiments, the monohydric alcohol compound is methanol (MeOH). Methanol forms hydrogen bonds with water molecules, changing the structure of water and making the formation of hydrates more difficult. Methanol slows down the nucleation of hydrates by disrupting the hydration of water molecules, and methanol has a low freezing point, which can effectively reduce the formation temperature of hydrates. In this way, methanol can inhibit the formation of hydrates and extend the formation time of hydrates.

[0047] After soluble chlorides dissolve in water, chloride ions (Cl-) are released. These chloride ions reduce the nucleation and growth rates of hydrates by increasing the ionic strength of the solution. Moreover, soluble chlorides and methanol synergistically inhibit the formation of hydrates, ensuring that the formation of hydrates is effectively inhibited within a wide range of temperatures and pressures.

[0048] Specifically, the soluble chlorides include any one of sodium chloride and potassium chloride.

[0049] In some embodiments, the soluble chloride is sodium chloride (NaCl). After sodium chloride dissolves in water, it can make hydrates less likely to form by lowering the freezing point of water. Moreover, the increased ionic strength of water after sodium chloride dissolves can disrupt the crystal structure of hydrates, further inhibiting their growth and deposition.

[0050] Exemplarily, the component data of some compound hydrate inhibitors and the corresponding experimental gas consumption in the hydrate formation experiment are shown in Table 1 below:

[0051] Table 1

[0052]

[0053] Before constructing the experimental sample data set, it is first necessary to conduct hydrate formation experiments on each compound hydrate inhibitor. During the experiment, gas cylinders, reactors, stirrers, cooling equipment, pressure sensors, and temperature sensors are required. Among them, the gas cylinder is provided with an air outlet, and the reactor is provided with an air inlet, and the air inlet is communicated with the air outlet. The gas cylinder is used to store methane. The air inlet and the air outlet are connected by a pipeline. When the valve of the gas cylinder is opened, methane can flow through the air outlet and the air inlet into the reactor. The reactor contains a compound hydrate inhibitor, so that the gas transported by the gas cylinder can react in the reactor.

[0054] The reaction process of natural gas is simulated using methane. This is because methane (CH4) is the main component of natural gas, usually accounting for more than 80% and even higher in some natural gas fields. Therefore, the chemical properties and physical characteristics of methane largely determine the overall properties of natural gas. By using methane as the simulation gas, the behavior characteristics of natural gas during pipeline transportation, storage, and use can be more accurately reflected. Moreover, as a common gas, methane is relatively easy to obtain and store. Although natural gas may contain other hydrocarbon and non-hydrocarbon gases, the content of these gases is relatively low, and some gases may be toxic or flammable and explosive. Using methane as the simulation gas can avoid these potential safety risks and ensure the safety and reliability of the experimental process.

[0055] It should be noted that when the reactor is reacting, it needs to be in a closed system to avoid gas leakage.

[0056] The stirrer is arranged in the reactor. Part of the stirrer is located in the reactor and is used to agitate the compound hydrate inhibitor in the reactor. Among them, the stirrer can make the compound hydrate inhibitor in the reactor fully mix and transfer heat with the incoming gas. Moreover, in natural gas pipelines, natural gas often flows under certain pressure and temperature conditions. The function of the stirrer can simulate the flow process of natural gas, so as to better restore the fluid behavior in the actual natural gas pipeline, and then more accurately test the effect of the compound hydrate inhibitor on the natural gas hydrate inhibitor.

[0057] Specifically, the stirrer can be a paddle stirrer, a propeller stirrer, an impeller stirrer, etc. In some other embodiments, the stirrer can be a magnetic stir bar.

[0058] In order to further simulate the reaction temperature of natural gas pipeline flow, the reactor is arranged on the cooling equipment, and the cooling equipment can be used to control the temperature of the reactor.

[0059] Specifically, the cooling equipment can adopt a water bath device. By adjusting the water bath temperature, a low-temperature environment in the reactor can be maintained to ensure the actual conditions for hydrate formation in the simulated natural gas.

[0060] A pressure sensor is disposed inside the reactor and is used to detect the pressure inside the reactor. Since the formation of hydrate usually affects the system pressure, by setting up a pressure sensor to monitor the pressure change inside the reactor in real time, the gas consumption during the reaction process can be recorded. Meanwhile, the initial pressure inside the reactor after the gas cylinder intakes gas can be judged through the pressure sensor.

[0061] A temperature sensor is disposed inside the reactor and is used to detect the temperature inside the reactor. By setting up a temperature sensor, the temperature inside the reactor can be monitored in real time, which can further ensure the stability of the reaction conditions and monitor the formation of hydrate.

[0062] Perform hydrate formation experiments on each compound hydrate inhibitor, including: placing the compound hydrate inhibitor in the reactor; controlling the temperature of the cooling equipment until the temperature inside the reactor reaches the preset temperature; opening the switching valve of the gas cylinder until the pressure inside the reactor reaches the preset pressure and then closing the gas cylinder; controlling the stirrer to work; collecting real-time temperature data through the temperature sensor and collecting real-time pressure data through the pressure sensor.

[0063] The experimental temperature data refers to the real-time temperature data detected by the temperature sensor during the hydrate formation experiment. In one embodiment, the collected experimental temperature data is as Figure 2 shown. The experimental pressure data refers to the real-time pressure data detected by the pressure sensor during the hydrate formation experiment. In one embodiment, the collected experimental pressure data is as Figure 3 shown. For each set of data, both experimental temperature data and experimental pressure data are collected during the hydrate formation experiment to obtain the corresponding experimental gas consumption of each compound hydrate inhibitor in the hydrate formation experiment based on the experimental temperature data and experimental pressure data, and add label parameters, named "experimental gas consumption", and count the gas consumption at each temperature and pressure in the hydrate formation experiment, which is the value of the "experimental gas consumption" label parameter, that is, the sample label data.

[0064] In some embodiments, determine the experimental gas consumption based on the relational formula ; where P represents the experimental pressure data detected during the hydrate formation experiment, T represents the experimental temperature data detected during the hydrate formation experiment, V represents the gas volume inside the reactor during the hydrate formation experiment, R represents the gas constant, taking R = 8.314 J / (mol·K), Z represents the gas compressibility factor, 0 and t respectively represent the moment t = 0 and the moment t.

[0065] Among them, Based on this relational formula, the gas amount n0 at the moment t = 0 can be obtained. Based on this relational formula, the gas amount n at the moment t can be obtained t . Δn = n0 - nt , that is, the difference in the gas volume in the reactor at two different times is used as the experimental gas consumption. The accurate calculation of the experimental gas consumption helps to train an accurate gas consumption prediction model in the subsequent steps.

[0066] In step S120, data preprocessing is performed on the sample data in the experimental sample dataset to obtain a target sample dataset. Then, step S130 is executed.

[0067] In one embodiment, as Figure 4 shown, the steps of performing data preprocessing on the sample data in the experimental sample dataset include the following steps S410 to S430, which are introduced in detail as follows:

[0068] In step S410, the null values in the experimental sample dataset are processed to obtain a first sample dataset. Then, step S420 is executed.

[0069] In some embodiments, processing the null values in the experimental sample dataset specifically means: deleting the sample data with null data items in the experimental sample dataset. Each sample data includes the component data of the compound hydrate inhibitor in the hydrate formation experiment, the experimental temperature data corresponding to the component data, and the experimental pressure data.

[0070] In some embodiments, processing the null values in the experimental sample dataset specifically means: filling in the null data items in the experimental sample dataset. The data item refers to the data category in the sample data, such as the temperature data item, the pressure data item, the component data item of the compound hydrate inhibitor, etc.

[0071] In some embodiments, processing the null values in the experimental sample dataset specifically means: when all the data items in a sample data are null values, deleting the sample data; when some data items in the sample data are null values but some data items are not null values, filling in the null data items in the sample data with the mean value or 0.

[0072] In step S420, the sample data outside the constraint range in the first sample dataset is deleted to obtain a second sample dataset. Then, step S430 is executed.

[0073] The constraint range can be determined based on the theoretical situation. When the sample data exceeds this constraint range, it is regarded as invalid sample data and the sample data is deleted. For example, the experimental temperature data is 10°C, which is an impossible situation in the hydrate formation experiment, so the sample data corresponding to this experimental temperature data is deleted.

[0074] In step S430, the sample data in the second sample dataset is normalized to obtain a target sample dataset.

[0075] In some embodiments, based on the relational expression the sample data in the second sample dataset is normalized. Wherein, x represents the sample data to be normalized, min(x) represents the minimum value in the second sample dataset, max(x) represents the maximum value in the second sample dataset, and x' represents the normalized sample data.

[0076] Corresponding to the sample data, the present application also normalizes the experimental gas consumption, obtains the experimental gas consumption after normalization, and uses the experimental gas consumption after normalization as the value of the sample label data. By normalizing the sample data and the value of the sample label data, the values of each data item can be mapped between [0,1], which can avoid the adverse effects of dimension and data size on the neural network model.

[0077] In Figure 4 the illustrated embodiment, by processing null values and deleting abnormal data outside the constraint range, the noise of the original dataset is reduced, which can improve the algorithm accuracy of the subsequent trained gas consumption prediction model and contribute to improving the gas consumption prediction accuracy of the gas consumption prediction model. Using the min-max normalization method, the values of the sample data and the sample label data are mapped to the [0,1] interval, removing the dimension of each feature and reducing the influence of the noise of the original dataset again, which can greatly improve the running speed and accuracy of the algorithm.

[0078] In some embodiments, the normalized sample dataset is further divided into a training dataset and a test dataset to obtain a target sample dataset including the training dataset and the test dataset.

[0079] In some embodiments, the normalized sample dataset is divided into a training dataset and a test dataset according to a ratio of 8:2. By reasonably dividing the sample data for model training and model effect verification, it helps to train a gas consumption prediction model with accurate prediction results in subsequent steps. Of course, in other embodiments, the training dataset and the test dataset can also be divided according to other ratios. For example, the normalized sample dataset is divided into a training dataset and a test dataset according to a ratio of 7:3.

[0080] In step S130, the sample data in the target sample dataset is input into the neural network model to obtain gas consumption prediction data corresponding to each sample data in the target sample dataset. Then, step S140 is executed.

[0081] In some embodiments, the neural network model is a BP neural network model. The BP neural network includes an input layer, a hidden layer, and an output layer. The input layer is the target sample dataset obtained through the above steps, the hidden layer is default invisible, and the output layer is the gas consumption.

[0082] With the help of the BP neural network, the hidden relationships between data can be better discovered, and the gas consumption can be predicted more accurately compared with other algorithms, which can provide reference suggestions for hydrate prevention and control in the production process and avoid hydrate blockage of pipelines.

[0083] In step S140, based on the gas consumption prediction data and the sample label data, the model parameters of the neural network model are adjusted to obtain a gas consumption prediction model.

[0084] That is, based on the gas consumption prediction data and the sample label data, the neural network model is trained, and the model parameters of the neural network model are optimized until the difference between the gas consumption prediction data and the sample label data is below the target difference. At this time, the gas consumption prediction model is obtained.

[0085] Among them, the sample label data is the experimental gas consumption obtained based on the experimental temperature data and the experimental pressure data.

[0086] In some embodiments, the model parameters of the neural network model are optimized by cross-validation and the grid search method, and the model parameters when the error of the neural network model on the test data set is the smallest are retained; the model parameters when the error is the smallest are substituted into the algorithm of the neural network model, and the algorithm model file is saved and exported to obtain a gas consumption prediction model. In this way, the algorithm accuracy of the gas consumption prediction model is improved.

[0087] In some embodiments, the mean square error (MSE) is used to measure the model accuracy, and the calculation formula of MSE is:

[0088]

[0089] where y i represents the true value, y pred is the predicted value, and n represents the number of samples.

[0090] In step S150, the component data of the compound hydrate inhibitor, the real-time temperature data, and the real-time pressure data are input into the gas consumption prediction model to obtain a gas consumption prediction result.

[0091] That is, during the process of transporting natural gas through an oil and gas transportation pipeline, the component data of the compound hydrate inhibitor added to the oil and gas transportation pipeline, the real-time temperature data, and the real-time pressure data of the oil and gas transportation pipeline are input into the gas consumption prediction model, and the gas consumption prediction model predicts the natural gas consumption to obtain a gas consumption prediction result.

[0092] In one embodiment, the compound hydrate inhibitor by mass comprises 1000 parts of deionized water, 5 parts of polyvinylpyrrolidone, 19 parts of methanol, and 15 parts of sodium chloride. The comparison between the gas consumption results predicted by the gas consumption prediction model of the present application and the experimental gas consumption (actual gas consumption) obtained in the hydrate formation experiment based on the experimental temperature data and experimental pressure data is as Figure 5 shown. It can be Figure 5 seen that the gas consumption result curves predicted by the gas consumption prediction model of the present application coincide with the actual gas consumption curves for most of the time, and there are only very small differences at individual times. That is, by using the gas consumption prediction method provided by the present application, a gas consumption prediction result with a high degree of fitting with the experimental gas consumption can be obtained, and the accuracy of the gas consumption prediction result of the gas consumption prediction method provided by the present application is high.

[0093] In summary, the present application analyzes the existing experimental sample data to obtain the relationship between the experimental sample data and the gas consumption, and obtains a gas consumption prediction model. Through the gas consumption prediction model, more accurate natural gas consumption predictions can be made for the components of the compound hydrate inhibitor that have not been tested or according to the actual natural gas transportation conditions, which can provide reference suggestions for hydrate prevention and control in the production process and help avoid hydrate blockage of pipelines.

[0094] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include known common knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present application are pointed out by the appended claims.

Claims

1. A gas consumption prediction method based on neural network algorithm, characterized in that, The gas consumption prediction method includes: Constructing an experimental sample data set based on the component data of the compound hydrate inhibitor in the hydrate formation experiment, the experimental temperature data detected by the temperature sensor, and the experimental pressure data detected by the pressure sensor; Performing data preprocessing on the sample data in the experimental sample data set to obtain a target sample data set; Inputting the sample data in the target sample data set into a neural network model to obtain gas consumption prediction data corresponding to each sample data in the target sample data set; Adjusting the model parameters of the neural network model based on the gas consumption prediction data and sample label data to obtain a gas consumption prediction model, where the sample label data is the experimental gas consumption obtained based on the experimental temperature data and the experimental pressure data; Inputting the component data of the compound hydrate inhibitor, the real-time temperature data, and the real-time pressure data into the gas consumption prediction model to obtain a gas consumption prediction result.

2. The gas consumption prediction method according to claim 1, wherein The performing data preprocessing on the sample data in the experimental sample data set to obtain a target sample data set includes: Processing the null values in the experimental sample data set to obtain a first sample data set; Deleting the sample data outside the constraint range in the first sample data set to obtain a second sample data set; Performing normalization processing on the sample data in the second sample data set to obtain a target sample data set; Before adjusting the model parameters of the neural network model based on the gas consumption prediction data and sample label data, the gas consumption prediction method further includes: Obtaining the experimental gas consumption based on the experimental temperature data and the experimental pressure data; Performing normalization processing on the experimental gas consumption to obtain the normalized experimental gas consumption; Using the normalized experimental gas consumption as the value of the sample label data.

3. The gas consumption prediction method according to claim 2, wherein The processing the null values in the experimental sample data set to obtain a first sample data set includes: Deleting the sample data with null data items in the experimental sample data set to obtain a first sample data set, where each sample data includes the component data of the compound hydrate inhibitor in the hydrate formation experiment, the experimental temperature data corresponding to the component data, and the experimental pressure data; Or, Filling the null data items in the experimental sample data set to obtain a first sample data set.

4. The gas consumption prediction method according to claim 2, wherein The performing data preprocessing on the sample data in the experimental sample data set to obtain a target sample data set further includes: Dividing the normalized sample data set into a training data set and a test data set to obtain a target sample data set including the training data set and the test data set.

5. The gas consumption prediction method according to claim 4, characterized in that The dividing the normalized sample data set into a training data set and a test data set includes: Dividing the normalized sample data set into a training data set and a test data set according to a ratio of 8:

2.

6. The gas consumption prediction method according to claim 2, characterized in that The obtaining the experimental gas consumption based on the experimental temperature data and the experimental pressure data includes: Based on the relational expression Determine the experimental gas consumption; Wherein, P represents the experimental pressure data detected in the hydrate formation experiment, T represents the experimental temperature data detected in the hydrate formation experiment, V represents the gas volume in the reactor during the hydrate formation experiment, R represents the gas constant, Z represents the gas compressibility factor, 0 and t respectively represent the moment of t = 0 and the moment of t.

7. The gas consumption prediction method according to any one of claims 1 to 6, characterized in that The neural network model is a BP neural network model.

8. The gas consumption prediction method according to any one of claims 1 to 6, characterized in that The compound hydrate inhibitor includes solvent water, polyvinylpyrrolidone, monohydric alcohol compounds, and soluble chlorides. The component data of the compound hydrate inhibitor includes the dosage of polyvinylpyrrolidone, the dosage of monohydric alcohol compounds, and the dosage of soluble chlorides.

9. The gas consumption prediction method according to claim 8, characterized in that The monohydric alcohol compound includes any one of methanol, ethanol, and propanol.

10. The gas consumption prediction method according to claim 8, characterized in that, The soluble chloride includes any one of sodium chloride and potassium chloride.