A natural gas hydrate production capacity prediction method and device, electronic equipment and storage medium

By combining self-attention mechanism and Kalman filtering, gas well parameter data is processed and the production capacity prediction model is optimized and adjusted, which solves the problem of insufficient prediction accuracy of traditional methods under complex conditions and achieves higher prediction accuracy and reliability.

CN120509552BActive Publication Date: 2025-11-11GUANGZHOU MARINE GEOLOGICAL SURVEY SANYA SOUTH CHINA SEA INST OF GEOLOGY +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510999205.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-11-11
Estimated Expiration
2045-07-21

AI Technical Summary

Technical Problem

Traditional natural gas hydrate production prediction methods struggle to capture the global information in input data when dealing with complex underground conditions and nonlinear relationships, resulting in poor prediction accuracy. This is especially true in environments with multiple coupled factors and dynamic changes, where prediction precision and generalization ability are insufficient.

Method used

By employing a self-attention mechanism combined with time-domain parameter data, the production dynamic parameters, gas well reservoir static parameters, and engineering fracturing parameters of gas well samples are obtained, matrix-processed, and predicted using a multi-head self-attention mechanism. Kalman filtering is then used to filter and reduce noise in the production dynamic parameters, thereby optimizing and adjusting the production capacity prediction model.

Benefits of technology

It improves the accuracy and reliability of natural gas hydrate production capacity forecasting, and can better uncover nonlinear relationships and long-distance dependencies in the data, providing more accurate decision support for oil and gas field development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509552B_ABST
    Figure CN120509552B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, electronic device, and storage medium for predicting natural gas hydrate production capacity. The method includes: acquiring target parameters of a gas well sample before a target time and inputting the target parameters into an input module; matrixing all target parameters using a data processing module and then merging them to obtain an input matrix; inputting the input matrix into a self-attention mechanism module and processing it using a multi-head self-attention mechanism to obtain the predicted production capacity at the target time; optimizing and adjusting the production capacity prediction model based on the predicted production capacity and the actual production capacity at the target time using an objective function to construct a prediction error; and using the optimized and adjusted production capacity prediction model to predict the natural gas hydrate production capacity of the target gas well. This application improves the accuracy and reliability of natural gas hydrate production capacity prediction by using a self-attention mechanism combined with time-domain parameter data for model optimization and adjustment. This application can be widely applied in the field of data processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, electronic device and storage medium for predicting natural gas hydrate production capacity. Background Technology

[0002] Natural gas hydrate production prediction is a key technology in natural gas exploration and development, directly impacting production planning and resource assessment in natural gas hydrate fields. Traditional methods for predicting natural gas hydrate production mainly rely on physical models and empirical formulas, such as production instability analysis. However, these methods have limitations when dealing with complex subsurface conditions and nonlinear relationships, especially in environments with multi-factor coupling and dynamic changes, often exhibiting low prediction accuracy and generalization ability. With the rapid development of artificial intelligence (AI) technology, especially the widespread application of deep learning methods, data-driven modeling methods have gradually been introduced into natural gas hydrate production prediction. In recent years, deep learning models such as deep convolutional neural networks (CNN), recurrent neural networks (RNN), and long short-term memory networks (LSTM) have been applied to natural gas hydrate production prediction with some success.

[0003] Although traditional deep learning models have been applied to predict natural gas hydrate production capacity, these models are usually based on fixed local information. Therefore, when dealing with complex problems with long-term dependencies and global features, they are difficult to fully capture the global information in the input data, resulting in poor prediction accuracy. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, electronic device, and storage medium for predicting natural gas hydrate production capacity, aiming to solve at least one problem in the prior art.

[0005] To achieve the above objectives, one aspect of this application proposes a method for predicting natural gas hydrate production capacity, the method comprising:

[0006] Obtain the target parameters of the gas well sample before the target time and input the target parameters into the input module; the target parameters include production dynamic parameters, gas well reservoir static parameters and engineering fracturing parameters;

[0007] The data processing module matrixifies all target parameters and then merges them to obtain the input matrix.

[0008] The input matrix is ​​fed into the self-attention mechanism module, and the multi-head self-attention mechanism is used to process it to obtain the predicted production capacity at the target time;

[0009] Based on the predicted capacity and the actual capacity at the target time, the capacity prediction model is optimized and adjusted by constructing a prediction error using an objective function; the capacity prediction model includes an input module, a data processing module, and a self-attention mechanism module.

[0010] The optimized and adjusted production capacity prediction model is used to predict the natural gas hydrate production capacity of the target gas well.

[0011] In some embodiments, prior to the step of inputting the target parameter to the input module, the method further includes the following steps:

[0012] The Kalman filter method is used to filter and reduce noise in production dynamic parameters;

[0013] The production dynamic parameters include daily output, tubing pressure, and casing pressure.

[0014] In some embodiments, all target parameters are matrixed and then merged to obtain the input matrix, including the following steps:

[0015] The production dynamic parameters are matrixed to obtain the first matrix; where each column of the first matrix corresponds to the parameter value of each type of parameter item in the production dynamic parameters at multiple time steps before the target time;

[0016] The static parameters of the gas well reservoir are matrixed to obtain a second matrix; where each column of the second matrix corresponds to the parameter value of each type of parameter item in the static parameters of the gas well reservoir at multiple time steps before the target time;

[0017] The engineering fracturing parameters are matrixed to obtain a third matrix; where each column of the third matrix corresponds to the parameter value of each type of parameter item in the engineering fracturing parameters at multiple time steps before the target time;

[0018] The first, second, and third matrices are combined to obtain the input matrix.

[0019] In some embodiments, merging the first matrix, the second matrix, and the third matrix to obtain the input matrix includes the following steps:

[0020] The first, second, and third matrices are horizontally concatenated to obtain the input matrix.

[0021] The number of columns in the input matrix is ​​equal to the total number of all parameter items in the target parameters, and the number of rows in the input matrix is ​​equal to the total number of time steps.

[0022] In some embodiments, the target parameters include parameter values ​​of various types of parameter items at multiple time steps prior to the target time; the input matrix is ​​input into the self-attention mechanism module, and the predicted productivity at the target time is obtained by processing using a multi-head self-attention mechanism, including the following steps:

[0023] The input matrix is ​​fed into the self-attention mechanism module, and the input matrix is ​​subjected to the first linear transformation based on the pre-learned weight matrix to obtain the query matrix, key matrix and value matrix;

[0024] Perform relevance calculations on the query matrix and key matrix to obtain the relevance score between each time step;

[0025] The relevance score is converted into attention weights using a normalized exponential function;

[0026] Based on attention weights, the value matrix corresponding to each time step is weighted and summed to obtain the prediction output;

[0027] The predicted output is multiplied by the preset output weight matrix and then added to the preset bias to obtain the predicted capacity at the target time.

[0028] In some embodiments, the gas well sample includes multiple sub-samples; based on the predicted production capacity and the actual production capacity at the target time, the production capacity prediction model is optimized and adjusted by constructing a prediction error using an objective function, including the following steps:

[0029] The root mean square error is constructed based on the predicted capacity and the actual capacity at the target time for each subsample;

[0030] The predicted capacity of all subsamples is averaged to obtain the predicted average value. Based on the predicted average value, the predicted capacity of each subsample and the actual capacity at the target time are combined to construct the coefficient of determination.

[0031] The root mean square error and coefficient of determination are used as objective functions to optimize and adjust the model parameters of the capacity prediction model.

[0032] In some embodiments, the optimized and adjusted production capacity prediction model is used to predict the natural gas hydrate production capacity of the target gas well, including the following steps:

[0033] Obtain the target parameters of the target gas well before the predicted time;

[0034] The target parameters corresponding to the target gas well are input into the optimized and adjusted production capacity prediction model. Through matrixing and multi-head self-attention mechanism, the target predicted production capacity of the target gas well at the time to be predicted is obtained.

[0035] To achieve the above objectives, another aspect of this application provides a natural gas hydrate production capacity prediction device, the device comprising:

[0036] The data acquisition module is used to acquire the target parameters of the gas well sample before the target time and input the target parameters into the input module; the target parameters include production dynamic parameters, gas well reservoir static parameters and engineering fracturing parameters;

[0037] The first data processing module is used to matrix-encode all target parameters and then merge them to obtain the input matrix.

[0038] The second data processing module is used to input the input matrix into the self-attention mechanism module and use the multi-head self-attention mechanism to process and obtain the predicted production capacity at the target time.

[0039] The model training module is used to optimize and adjust the capacity prediction model based on the predicted capacity and the actual capacity at the target time, using an objective function to construct the prediction error. The capacity prediction model includes an input module, a data processing module, and a self-attention mechanism module.

[0040] The model application module is used to predict the natural gas hydrate production capacity of target gas wells using the optimized and adjusted production capacity prediction model.

[0041] In some embodiments, the apparatus further includes:

[0042] The filtering module is used to filter and reduce noise in production dynamic parameters using the Kalman filtering method.

[0043] The production dynamic parameters include daily output, tubing pressure, and casing pressure.

[0044] To achieve the above objectives, another aspect of the embodiments of this application proposes an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned method.

[0045] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method.

[0046] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method.

[0047] The embodiments of this application include at least the following beneficial effects: This application provides a method, apparatus, electronic device, storage medium, and program product for predicting natural gas hydrate production capacity. This solution obtains target parameters of a gas well sample before a target time and inputs these parameters into an input module. The target parameters include production dynamic parameters, gas well reservoir static parameters, and engineering fracturing parameters. A data processing module matrixifies all target parameters and merges them to obtain an input matrix. The input matrix is ​​then input into a self-attention mechanism module, which uses a multi-head self-attention mechanism to process and obtain the predicted production capacity at the target time. Based on the predicted production capacity and the actual production capacity at the target time, a prediction error is constructed using an objective function to optimize and adjust the production capacity prediction model. The production capacity prediction model includes an input module, a data processing module, and a self-attention mechanism module. The optimized production capacity prediction model is used to predict the natural gas hydrate production capacity of the target gas well. This application, through a self-attention mechanism combined with time-domain parameter data for model optimization and adjustment, aims to improve the accuracy and reliability of natural gas hydrate production capacity prediction by fully exploring the nonlinear relationships and long-distance dependencies in the data, thereby providing more accurate decision support for oil and gas field development. Attached Figure Description

[0048] Figure 1 This is a schematic diagram of an implementation environment for the method for predicting natural gas hydrate production capacity provided in this application embodiment;

[0049] Figure 2 This is a flowchart illustrating a method for predicting natural gas hydrate production capacity provided in an embodiment of this application;

[0050] Figure 3 This is a schematic diagram illustrating the unfolding process of step S200 provided in the embodiments of this application;

[0051] Figure 4 This is a schematic diagram of the unfolding process of step S300 provided in the embodiments of this application;

[0052] Figure 5 This is a schematic diagram of the overall process of the natural gas hydrate production capacity prediction method provided in the embodiments of this application;

[0053] Figure 6 This is a schematic diagram illustrating a data example comparing daily output before and after Kalman filtering, provided in an embodiment of this application.

[0054] Figure 7 This is a schematic diagram of the model principle structure of the capacity prediction model provided in the embodiments of this application;

[0055] Figure 8 This is a schematic diagram illustrating a comparison between the actual yield and the model prediction results provided in the embodiments of this application;

[0056] Figure 9 This is a schematic diagram of the structure of a natural gas hydrate production capacity prediction device provided in an embodiment of this application;

[0057] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0059] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0060] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0062] In the prediction of natural gas hydrate production capacity, numerous factors influence the capacity, and the interrelationships and dependencies between these factors are typically nonlinear and exhibit complex spatiotemporal dynamics. Traditional methods often fail to adequately consider these complex factors, resulting in deficiencies in prediction accuracy and generalization ability.

[0063] In view of this, this application provides a method for predicting natural gas hydrate production capacity. This method obtains target parameters of a gas well sample before a target time and inputs these parameters into an input module. The target parameters include production dynamic parameters, gas well reservoir static parameters, and engineering fracturing parameters. A data processing module matrixifies all target parameters and merges them to obtain an input matrix. This input matrix is ​​then input into a self-attention mechanism module, which uses a multi-head self-attention mechanism to process the data and obtain the predicted production capacity at the target time. Based on the predicted production capacity and the actual production capacity at the target time, a prediction error is constructed using an objective function to optimize and adjust the production capacity prediction model. The production capacity prediction model includes an input module, a data processing module, and a self-attention mechanism module. The optimized production capacity prediction model is then used to predict the natural gas hydrate production capacity of the target gas well. This application, through a self-attention mechanism combined with time-domain parameter data for model optimization and adjustment, aims to improve the accuracy and reliability of natural gas hydrate production capacity prediction by fully exploring the nonlinear relationships and long-distance dependencies in the data, thereby providing more accurate decision support for oil and gas field development.

[0064] It is understood that the natural gas hydrate production capacity prediction method provided in this application can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet, laptop, or desktop computer, but it is not limited to these.

[0065] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided in an embodiment of this application. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.

[0066] Server 101 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0067] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.

[0068] Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the application does not impose any limitations.

[0069] For example, based on Figure 1 The implementation environment shown in this application embodiment provides a natural gas hydrate production capacity prediction method. The following description uses the application of this natural gas hydrate production capacity prediction method in server 101 as an example. It can be understood that the natural gas hydrate production capacity prediction method can also be applied in terminal 102.

[0070] Reference Figure 2 , Figure 2 This is an optional flowchart of the natural gas hydrate production capacity prediction method provided in the embodiments of this application. The execution subject of the natural gas hydrate production capacity prediction method can be any of the aforementioned computer devices (including servers or terminals). Figure 2 The method may include, but is not limited to, steps S100 to S500.

[0071] Step S100: Obtain the target parameters of the gas well sample before the target time, and input the target parameters into the input module;

[0072] The target parameters include production dynamic parameters, gas well reservoir static parameters, and engineering fracturing parameters;

[0073] For example, in some specific embodiments, the input module includes three parts: 1. Gas well production dynamic parameters, including daily gas production, tubing pressure, and casing pressure; 2. Gas well reservoir static parameters, including hydrate saturation, reservoir permeability, reservoir porosity, and reservoir depth; 3. Engineering fracturing parameters, including fracturing fluid volume, sand filling volume, fracture length, and fracture width.

[0074] In some embodiments, before the step of inputting the target parameters to the input module, the method may further include the following steps: filtering and reducing noise of production dynamic parameters using a Kalman filter method; wherein the production dynamic parameters include daily output, tubing pressure, and casing pressure.

[0075] For example, in some specific implementations, the Kalman filter method is used to filter the data and reduce the data noise value. The specific steps include two parts:

[0076] In the prediction step of Kalman filtering, the estimated system state is predicted based on the state from the previous step:

[0077] 1. Prediction steps:

[0078]

[0079] in, It refers to the current moment State prediction It is the optimal estimate from the previous moment. It is the state transition matrix. It is a control input matrix. It controls the input.

[0080] 2. Update steps:

[0081] When new observation data Upon arrival, the Kalman filter updates the predicted state estimate, incorporating new observation information to reduce errors:

[0082] Calculate the Kalman gain:

[0083]

[0084] in, It is the observation matrix, representing the relationship from state to observation. It is the observation noise covariance matrix, representing the measurement uncertainty.

[0085] Step S200: The data processing module performs matrix transformation on all target parameters, and then merges them to obtain the input matrix;

[0086] It should be noted that in some embodiments, such as Figure 3As shown, matrixing all target parameters and then merging them to obtain the input matrix can include the following steps: S201, matrixing the production dynamic parameters to obtain a first matrix; wherein each column in the first matrix corresponds to the parameter value of each type of parameter item in the production dynamic parameters at multiple time steps before the target time; S202, matrixing the gas well reservoir static parameters to obtain a second matrix; wherein each column in the second matrix corresponds to the parameter value of each type of parameter item in the gas well reservoir static parameters at multiple time steps before the target time; S203, matrixing the engineering fracturing parameters to obtain a third matrix; wherein each column in the third matrix corresponds to the parameter value of each type of parameter item in the engineering fracturing parameters at multiple time steps before the target time; S204, merging the first matrix, the second matrix, and the third matrix to obtain the input matrix.

[0087] For example, in some specific embodiments, a data processing module, which receives input from the input module, matrices the data to facilitate model calculation.

[0088] Furthermore, the dynamic parameter matrix is ​​represented as a... The matrix is ​​shown below:

[0089]

[0090] in This represents the number of time steps, where 3 indicates the three dynamic parameters at each time step. This indicates the daily output (104 / d). This indicates the oil pipe pressure (MPa). This indicates the casing pressure (MPa).

[0091] Furthermore, the static parameters of the gas well reservoir are matrixed and represented as a single... The matrix is ​​shown below:

[0092]

[0093] in Indicates hydrate saturation (%). This represents reservoir permeability (mD). Indicates reservoir porosity (%) Indicates the reservoir depth (m).

[0094] Furthermore, the engineering parameters of the gas well are matrixed and represented as a single... The matrix is ​​shown below:

[0095]

[0096] in, This indicates the volume of fracturing fluid (m3). This indicates the amount of sand filled (m3). Indicates the crack length. Indicates the width of the crack.

[0097] Furthermore, the three parameters are combined into a single input matrix. .

[0098] In some embodiments, step S204 may include the following steps: horizontally concatenating the first matrix, the second matrix, and the third matrix to obtain an input matrix; wherein the number of columns in the input matrix is ​​equal to the total number of all parameter items in the target parameters, and the number of rows in the input matrix is ​​equal to the total number of time steps.

[0099] For example, in some specific implementations, the matrices of the three parameters are horizontally concatenated and merged into a single overall input matrix. , forming a The matrix is ​​shown below:

[0100]

[0101] Step S300: Input the input matrix into the self-attention mechanism module and use the multi-head self-attention mechanism to process and obtain the predicted production capacity at the target time;

[0102] It should be noted that the target parameters include parameter values ​​of various types of parameter items at multiple time steps prior to the target time; in some embodiments, such as Figure 4 As shown, step S300 may include the following steps: S301, inputting the input matrix into the self-attention mechanism module, performing a first linear transformation on the input matrix based on the pre-learned weight matrix to obtain a query matrix, a key matrix, and a value matrix; S302, performing correlation calculations on the query matrix and the key matrix to obtain the correlation score between each time step; S303, converting the correlation score into attention weights using a normalized exponential function; S304, performing a weighted summation on the value matrix corresponding to each time step based on the attention weights to obtain the predicted output; S305, adding the product of the predicted output and the preset output weight matrix to the preset bias to obtain the predicted capacity at the target time.

[0103] For example, in some specific implementations, a self-attention mechanism module is used. The core idea of ​​this module is to effectively capture the long-term dependencies between input features by calculating the correlation between various inputs and assigning different weights to different inputs.

[0104] Furthermore, the input matrix The query is obtained through linear transformation. ),key( ) and value ( )matrix.

[0105] Furthermore, let the dimensions of these matrices be... ,in The dimension of each vector is calculated through matrix transformations, as shown below:

[0106]

[0107] in, , , It is a query ( ),key( ) and value ( )matrix, , , It is the weight matrix for learning.

[0108] Further calculations, and The correlation score is used to measure the importance of the correlation between each time step.

[0109]

[0110] The scores are converted into weights using the Softmax function:

[0111]

[0112] Furthermore, the obtained attention weights right Perform a weighted summation to obtain the weighted output:

[0113]

[0114] Furthermore, in order to capture different patterns in the data, a multi-head self-attention mechanism is used. Multiple attention heads are computed in parallel, each focusing on different feature representations. Finally, the outputs of the multiple heads are concatenated and a linear transformation is applied to obtain the final output.

[0115] Furthermore, the final predicted production capacity of the gas well is calculated using the following formula:

[0116]

[0117] in, Forecast production capacity for gas wells It is the weight matrix of the output layer. It is a bias.

[0118] Step S400: Based on the predicted capacity and the actual capacity at the target time, the capacity prediction model is optimized and adjusted by constructing a prediction error using an objective function;

[0119] The capacity prediction model includes an input module, a data processing module, and a self-attention mechanism module.

[0120] It should be noted that the gas well sample includes multiple sub-samples; in some embodiments, step S400 may include the following steps: constructing the root mean square error based on the predicted production capacity of each sub-sample and the actual production capacity at the target time; averaging the predicted production capacity of all sub-samples to obtain the predicted average value, constructing the coefficient of determination based on the predicted average value combined with the predicted production capacity of each sub-sample and the actual production capacity at the target time; and optimizing and adjusting the model parameters of the production capacity prediction model using the root mean square error and the coefficient of determination as the objective function.

[0121] For example, in some specific implementations, the root mean square error (RMSE) is used. ) and coefficient of determination ( Let be the objective function, and its calculation formula is:

[0122] The formula for root mean square error is:

[0123]

[0124] in, It is the sample size; This is the actual value; This is a predicted value.

[0125] The formula for the coefficient of determination is:

[0126]

[0127] in, It is the sample size; This is the actual value; It is a predicted value; It is the average value.

[0128] In some specific application scenarios, the samples can be pre-divided into training and test sets. First, the relevant processing flow from steps S100 to S400 is executed based on the training set to optimize and adjust the training phase of the model. Then, the relevant processing flow from steps S100 to S400 can be executed again based on the test set. When executing the relevant processing flow from step S400, the model prediction accuracy is verified only by the prediction error obtained from the objective function without any adjustments. If the accuracy meets the requirements, it is directly applied. Otherwise, the relevant processing flow from steps S100 to S400 is iteratively executed based on the training set for training until the accuracy verification of the test set meets the requirements.

[0129] Step S500: Use the optimized and adjusted production capacity prediction model to predict the natural gas hydrate production capacity of the target gas well.

[0130] It should be noted that in some embodiments, step S500 may include the following steps: obtaining the target parameters of the target gas well before the time to be predicted; inputting the target parameters corresponding to the target gas well into the optimized and adjusted production capacity prediction model, and processing them through matrixing and multi-head self-attention mechanism to obtain the target predicted production capacity of the target gas well at the time to be predicted.

[0131] For example, in some specific implementations, before inputting the target parameters into the model during the actual application of the capacity prediction model, the Kalman filter method can be used to suppress noise and filter the production dynamic data in the target parameters to ensure the accuracy and stability of the input data and provide high-quality input data for subsequent model prediction.

[0132] To explain in detail the principle of the technical solution of the present invention, the overall process of the present invention will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.

[0133] First, it's important to note that numerous factors influence natural gas hydrate production capacity prediction. The relationships and dependencies between these factors are typically non-linear and exhibit complex spatiotemporal dynamics. Traditional methods often fail to adequately consider these complex factors, resulting in deficiencies in prediction accuracy and generalization ability. Therefore, effectively mining the complex dependencies within natural gas hydrate production data, especially long-term dependencies and capturing global information, remains a significant technological challenge.

[0134] In view of this, the present invention optimizes and adjusts the model by using a self-attention mechanism combined with time-domain parameter data. It aims to improve the accuracy and reliability of natural gas hydrate production capacity prediction by fully exploring the nonlinear relationships and long-distance dependencies in the data, thereby providing more accurate decision support for oil and gas field development.

[0135] In some specific application scenarios, such as Figure 5 As shown, the natural gas hydrate production capacity prediction method provided by this invention can be implemented through the following process steps:

[0136] (1) Data preprocessing:

[0137] Collect dynamic production data from a gas well, including data on well tubing pressure and casing pressure.

[0138] Specifically, the Kalman filter method is used to filter the data and reduce data noise. The specific steps include two parts:

[0139] In the prediction step of Kalman filtering, the estimated system state is predicted based on the state from the previous step:

[0140] 1. Prediction steps:

[0141]

[0142] in, It refers to the current moment State prediction It is the optimal estimate from the previous moment. It is the state transition matrix. It is a control input matrix. It controls the input.

[0143] 2. Update steps:

[0144] When new observation data Upon arrival, the Kalman filter updates the predicted state estimate, incorporating new observation information to reduce errors:

[0145] Calculate the Kalman gain:

[0146]

[0147] in, It is the observation matrix, representing the relationship from state to observation. This is the observation noise covariance matrix, representing the measurement uncertainty. The dynamic effects of gas well production before and after Kalman filtering are shown below. Figure 6 As shown.

[0148] (2) Structural design of gas well production capacity prediction model (e.g.) Figure 7 (As shown, this is for illustrative purposes only; specific structural details are not limited if the data processing flow is clear.)

[0149] To enhance the physical constraint capability of the model, this invention designs three modules:

[0150] The first module is the input module, which consists of three parts: 1. Dynamic parameters of gas well production (dynamic data) after Kalman filtering, including daily gas well production, tubing pressure, and casing pressure; 2. Static parameters of gas well reservoir (static data), including hydrate saturation, reservoir permeability, reservoir porosity, and reservoir depth; 3. Engineering fracturing parameters (fracturing data), including fracturing fluid volume, sand filling volume, fracture length, and fracture width.

[0151] The second module is the data processing module. This module takes over from the input module and converts the data into a matrix to facilitate model calculation.

[0152] Furthermore, the dynamic parameter matrix is ​​represented as a... The matrix is ​​shown below:

[0153]

[0154] in This represents the number of time steps, where 3 indicates the three dynamic parameters at each time step. This indicates the daily output (104 / d). This indicates the oil pipe pressure (MPa). This indicates the casing pressure (MPa).

[0155] Furthermore, the static parameters of the gas well reservoir are matrixed and represented as a single... The matrix is ​​shown below:

[0156]

[0157] in Indicates hydrate saturation (%). This represents reservoir permeability (mD). Indicates reservoir porosity (%) Indicates the reservoir depth (m).

[0158] Furthermore, the engineering parameters of the gas well are matrixed and represented as a single... The matrix is ​​shown below:

[0159]

[0160] in, This indicates the volume of fracturing fluid (m3). This indicates the amount of sand filled (m3). Indicates the crack length. Indicates the width of the crack.

[0161] Furthermore, the three parameters are combined into a single input matrix. , forming a The matrix is ​​shown below:

[0162]

[0163] The third module is the self-attention mechanism module. The core idea of ​​this module is to effectively capture the long-term dependencies between input features by calculating the correlation between various inputs and assigning different weights to different inputs.

[0164] Furthermore, the input matrix The query is obtained through linear transformation. ),key( ) and value ( )matrix.

[0165] Furthermore, let the dimensions of these matrices be... ,in The dimension of each vector is calculated through matrix transformations, as shown below:

[0166]

[0167] in, , , It is a query ( ),key( ) and value ( )matrix, , , It is the weight matrix for learning.

[0168] Further calculations, and The correlation score is used to measure the importance of the correlation between each time step.

[0169]

[0170] The scores are converted into weights using the Softmax function:

[0171]

[0172] Furthermore, the obtained attention weights right Perform a weighted summation to obtain the weighted output:

[0173]

[0174] Furthermore, in order to capture different patterns in the data, a multi-head self-attention mechanism is used. Multiple attention heads are computed in parallel, each focusing on different feature representations. Finally, the outputs of the multiple heads are concatenated and a linear transformation is applied to obtain the final output.

[0175] Furthermore, the final predicted production capacity of the gas well is calculated using the following formula:

[0176]

[0177] in, Forecast production capacity for gas wells It is the weight matrix of the output layer. It is a bias.

[0178] (3) Model training and validation (testing):

[0179] The specific steps for model training are as follows:

[0180] First, the dataset is divided into training and test sets, such as... Figure 8 This example compares the predicted results of actual production with those of models using different types of models (LSTM and SAM) based on the attention mechanism and training optimization process described in this application. Specifically, the ratio can be adjusted according to the actual dynamic production time of the gas well at a ratio between 0.5 and 0.8.

[0181] Furthermore, using the root mean square error (RMSE) ) and coefficient of determination ( Let be the objective function, and its calculation formula is:

[0182] The formula for root mean square error is:

[0183]

[0184] in, It is the sample size; This is the actual value; This is a predicted value.

[0185] The formula for the coefficient of determination is:

[0186]

[0187] in, It is the sample size; This is the actual value; It is a predicted value; It is the average value.

[0188] In summary, this invention proposes a natural gas hydrate production capacity prediction method based on a self-attention mechanism, which captures the complex dependencies affecting production capacity. Specifically, by constructing a deep learning model based on the Transformer architecture, it fully mines the long-term dependencies and global features in gas well production data, automatically learning and adjusting the weights of the relationships between various input features. This method not only effectively addresses multi-factor coupling and nonlinear problems but also provides high prediction accuracy with limited historical data support. Experimental verification shows that the proposed method can significantly improve the accuracy of natural gas hydrate production capacity prediction, providing more reliable technical support for oil and gas field production planning, resource assessment, and optimization decisions.

[0189] Specifically, the core principles of the technical solution of this invention include:

[0190] 1. A Natural Gas Hydrate Production Prediction Method Based on Self-Attention Mechanism: The core technology of this invention lies in utilizing a self-attention mechanism to process dynamic production data from gas wells. By assigning different weights to input features, the model can dynamically adjust and capture long-term dependencies and global information between data, thereby improving the accuracy and generalization ability of predictions.

[0191] 2. Kalman Filtering Preprocessing Step: This invention uses the Kalman filtering method to suppress noise and filter data in gas well production dynamics to ensure the accuracy and stability of the input data and provide high-quality input data for subsequent model training.

[0192] 3. Modular Design of Gas Well Production Capacity Prediction Model: This invention designs three modules: an input module, a data processing module, and a self-attention mechanism module. Each module can independently and efficiently process different types of input data (such as dynamic parameters, static parameters, and engineering fracturing parameters), and performs comprehensive modeling through a self-attention mechanism to improve the overall prediction accuracy.

[0193] 4. Application of Multi-Head Self-Attention Mechanism: To further improve model performance, this invention employs a multi-head self-attention mechanism, enabling the model to weight input data from multiple perspectives and capture the expressive information of different features. Each "attention head" focuses on different feature representations, effectively enhancing the model's ability to handle complex problems.

[0194] 5. Model Training and Validation Methods: This invention designs a clear training process, including dataset partitioning, selection of objective functions (root mean square error and coefficient of determination), and implementation of training and validation methods. By rigorously validating and evaluating the model training process, the accuracy and reliability of the model in practical applications are ensured.

[0195] Compared with the prior art, the present invention has at least the following beneficial effects:

[0196] First, traditional methods rely heavily on physical models and empirical formulas, which cannot effectively handle nonlinear relationships and long-term dependencies among multiple factors, especially resulting in low prediction accuracy under complex underground conditions. This invention, by introducing a self-attention mechanism, can dynamically adjust the weights between input features, thereby effectively capturing long-term dependencies between features and improving the model's expressive power and prediction accuracy.

[0197] Secondly, this invention employs Kalman filtering to remove noise from production dynamic data, ensuring data accuracy and stability, and further improving the reliability of model training. By combining Kalman filtering with a self-attention mechanism, it becomes more robust in handling noisy data and fully utilizes information such as gas well production dynamics, reservoir static parameters, and engineering fracturing parameters to achieve effective fusion of multi-dimensional data.

[0198] Furthermore, the use of a multi-head self-attention mechanism enables the model to focus on different features of the input data from different perspectives, further enhancing its ability to handle complex nonlinear relationships. The weighted output calculated by the model through linear transformation allows each feature to be dynamically adjusted according to its importance, improving the accuracy and generalization ability of gas well production capacity prediction.

[0199] Finally, by optimizing the objective functions (root mean square error and coefficient of determination) during the training process, this invention can not only make high-precision predictions of gas well production capacity, but also effectively measure the model's fitting effect and prediction accuracy, ensuring the effectiveness of its application under different production conditions.

[0200] In summary, this invention innovatively improves the accuracy, robustness, and generalization ability of natural gas hydrate production capacity prediction by combining Kalman filtering and self-attention mechanism. It solves the problem of difficulty in handling multi-factor interactions and long-term dependencies in existing technologies, and has significant practical application value and economic benefits.

[0201] like Figure 9 As shown in the illustration, this application also provides a natural gas hydrate production capacity prediction device 900, which can implement the above-described method. The device includes:

[0202] The data acquisition module 901 is used to acquire the target parameters of the gas well sample before the target time and input the target parameters into the input module; the target parameters include production dynamic parameters, gas well reservoir static parameters and engineering fracturing parameters;

[0203] The first data processing module 902 is used to matrix all target parameters through the data processing module and then merge them to obtain the input matrix.

[0204] The second data processing module 903 is used to input the input matrix into the self-attention mechanism module and use the multi-head self-attention mechanism to process and obtain the predicted production capacity at the target time.

[0205] The model training module 904 is used to optimize and adjust the capacity prediction model based on the predicted capacity and the actual capacity at the target time by constructing the prediction error using an objective function; the capacity prediction model includes an input module, a data processing module, and a self-attention mechanism module.

[0206] Model application module 905 is used to predict the natural gas hydrate production capacity of target gas wells using the optimized and adjusted production capacity prediction model.

[0207] In some embodiments, the apparatus may further include:

[0208] The filtering module is used to filter and reduce noise in production dynamic parameters using the Kalman filtering method.

[0209] The production dynamic parameters include daily output, tubing pressure, and casing pressure.

[0210] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0211] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0212] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0213] like Figure 10 As shown, Figure 10 The hardware structure of an electronic device 1000 according to another embodiment is illustrated. The electronic device 1000 includes:

[0214] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (aSIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0215] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RaM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 to execute the network node population optimization method of the embodiments of this invention.

[0216] Input / output interface 1003 is used to implement information input and output;

[0217] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0218] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);

[0219] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0220] The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0221] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0222] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0223] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0224] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0225] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0226] The natural gas hydrate production capacity prediction method, apparatus, electronic equipment, storage medium, and program product provided in this application obtain target parameters of a gas well sample before a target time and input these parameters into an input module. The target parameters include production dynamic parameters, gas well reservoir static parameters, and engineering fracturing parameters. A data processing module matrixifies all target parameters and merges them to obtain an input matrix. This input matrix is ​​then input into a self-attention mechanism module, which uses a multi-head self-attention mechanism to process the data and obtain the predicted production capacity at the target time. Based on the predicted production capacity and the actual production capacity at the target time, a prediction error is constructed using an objective function to optimize and adjust the production capacity prediction model. The production capacity prediction model includes an input module, a data processing module, and a self-attention mechanism module. The optimized production capacity prediction model is used to predict the natural gas hydrate production capacity of the target gas well. This application uses a self-attention mechanism combined with time-domain parameter data for model optimization and adjustment, aiming to improve the accuracy and reliability of natural gas hydrate production capacity prediction by fully exploring the nonlinear relationships and long-distance dependencies in the data, thereby providing more accurate decision support for oil and gas field development.

[0227] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0228] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0229] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0230] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0231] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0232] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0233] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0234] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0235] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0236] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0237] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for predicting natural gas hydrate production capacity, characterized in that, The method includes the following steps: Obtain the target parameters of the gas well sample before the target time, and input the target parameters into the input module; wherein, the target parameters include production dynamic parameters, gas well reservoir static parameters, and engineering fracturing parameters; The data processing module matrixifies all the target parameters and then merges them to obtain the input matrix. The step of matrixing all the target parameters and then merging them to obtain the input matrix includes the following steps: The production dynamic parameters are matrixed to obtain a first matrix; wherein each column of the first matrix corresponds to the parameter value of each type of parameter item in the production dynamic parameters at multiple time steps before the target time; Wherein, the first matrix is ​​represented as a The matrix is ​​expressed as: in, 3 represents the number of time steps; 3 indicates the three dynamic parameters for each time step. This indicates daily output, expressed in units of 10⁴ / d. This indicates the oil pipe pressure, expressed in MPa. This indicates the casing pressure, expressed in MPa. The static parameters of the gas well reservoir are matrixed to obtain a second matrix; wherein each column of the second matrix corresponds to the parameter value of each type of parameter item in the static parameters of the gas well reservoir at multiple time steps before the target time; Wherein, the second matrix is ​​represented as a The matrix is ​​expressed as: in, The percentage of hydrate saturation is expressed as % . Represents reservoir permeability, in mD; Reservoir porosity is expressed in % (%). Indicates reservoir depth, in meters (m). The engineering fracturing parameters are matrixed to obtain a third matrix; wherein each column of the third matrix corresponds to the parameter value of each type of parameter item in the engineering fracturing parameters at multiple time steps before the target time; The third matrix is ​​represented as a The matrix is ​​expressed as: in, This indicates the volume of fracturing fluid, in cubic meters (m). 3 ; Indicates the amount of sand filled in m 3 ; Indicates the length of the crack; Indicates the crack width; The first matrix, the second matrix, and the third matrix are combined to obtain the input matrix; The input matrix is ​​input into the self-attention mechanism module, and the multi-head self-attention mechanism is used to process it to obtain the predicted production capacity at the target time. Based on the predicted capacity and the actual capacity at the target time, a prediction error is constructed using an objective function to optimize and adjust the capacity prediction model; wherein, the capacity prediction model includes the input module, the data processing module, and the self-attention mechanism module; The optimized and adjusted production capacity prediction model is used to predict the natural gas hydrate production capacity of the target gas well.

2. The method according to claim 1, characterized in that, Before the step of inputting the target parameter to the input module, the method further includes the following steps: The Kalman filter method is used to filter and reduce noise in the production dynamic parameters; The production dynamic parameters include daily output, tubing pressure, and casing pressure.

3. The method according to claim 1, characterized in that, The step of merging the first matrix, the second matrix, and the third matrix to obtain the input matrix includes the following steps: The first matrix, the second matrix, and the third matrix are horizontally concatenated to obtain the input matrix. Wherein, the number of columns in the input matrix is ​​equal to the total number of all parameter items in the target parameters, and the number of rows in the input matrix is ​​equal to the total number of time steps.

4. The method according to claim 1, characterized in that, The target parameters include parameter values ​​of various types of parameters at multiple time steps prior to the target time; the step of inputting the input matrix into the self-attention mechanism module and using a multi-head self-attention mechanism to process and obtain the predicted productivity at the target time includes the following steps: The input matrix is ​​input into the self-attention mechanism module, and the input matrix is ​​subjected to a first linear transformation based on the pre-learned weight matrix to obtain the query matrix, key matrix and value matrix; Perform correlation calculations on the query matrix and the key matrix to obtain the correlation score between each time step; The relevance scores are converted into attention weights using a normalized exponential function; Based on the attention weights, the value matrix corresponding to each time step is weighted and summed to obtain the prediction output; The predicted output and the product of the preset output weight matrix are added to the preset bias to obtain the predicted production capacity at the target time.

5. The method according to claim 1, characterized in that, The gas well sample includes multiple sub-samples; the process of optimizing and adjusting the production capacity prediction model based on the predicted production capacity and the actual production capacity at the target time, using an objective function to construct the prediction error, includes the following steps: The root mean square error is constructed based on the predicted capacity and the actual capacity at the target time for each of the subsamples; The predicted capacity of all the sub-samples is averaged to obtain the predicted average value. Based on the predicted average value, the predicted capacity of each sub-sample and the actual capacity at the target time are combined to construct a deterministic coefficient. The root mean square error and the coefficient of determination are used as the objective function to optimize and adjust the model parameters of the capacity prediction model.

6. The method according to any one of claims 1 to 5, characterized in that, The process of predicting the natural gas hydrate production capacity of a target gas well using the optimized and adjusted production capacity prediction model includes the following steps: Obtain the target parameters of the target gas well before the predicted time; The target parameters corresponding to the target gas well are input into the optimized and adjusted production capacity prediction model. Through the matrixing and multi-head self-attention mechanism, the target predicted production capacity of the target gas well at the time to be predicted is obtained.

7. A natural gas hydrate production capacity prediction device, characterized in that, The device includes: The data acquisition module is used to acquire target parameters of gas well samples before a target time and input the target parameters into the input module; wherein, the target parameters include production dynamic parameters, gas well reservoir static parameters, and engineering fracturing parameters; The first data processing module is used to matrix-encode all the target parameters and then merge them to obtain the input matrix. The step of matrixing all the target parameters and then merging them to obtain the input matrix includes the following steps: The production dynamic parameters are matrixed to obtain a first matrix; wherein each column of the first matrix corresponds to the parameter value of each type of parameter item in the production dynamic parameters at multiple time steps before the target time; Wherein, the first matrix is ​​represented as a The matrix is ​​expressed as: in, 3 represents the number of time steps; 3 indicates the three dynamic parameters for each time step. This indicates daily output, expressed in units of 10⁴ / d. This indicates the oil pipe pressure, expressed in MPa. This indicates the casing pressure, expressed in MPa. The static parameters of the gas well reservoir are matrixed to obtain a second matrix; wherein each column of the second matrix corresponds to the parameter value of each type of parameter item in the static parameters of the gas well reservoir at multiple time steps before the target time; Wherein, the second matrix is ​​represented as a The matrix is ​​expressed as: in, The percentage of hydrate saturation is expressed as % . Represents reservoir permeability, in mD; Reservoir porosity is expressed in % (%). Indicates reservoir depth, in meters (m). The engineering fracturing parameters are matrixed to obtain a third matrix; wherein each column of the third matrix corresponds to the parameter value of each type of parameter item in the engineering fracturing parameters at multiple time steps before the target time; The third matrix is ​​represented as a The matrix is ​​expressed as: in, This indicates the volume of fracturing fluid, in cubic meters (m). 3 ; Indicates the amount of sand filled in m 3 ; Indicates the length of the crack; Indicates the crack width; The first matrix, the second matrix, and the third matrix are combined to obtain the input matrix; The second data processing module is used to input the input matrix into the self-attention mechanism module and use the multi-head self-attention mechanism to process and obtain the predicted production capacity at the target time. The model training module is used to optimize and adjust the capacity prediction model by constructing a prediction error using an objective function based on the predicted capacity and the actual capacity at the target time; wherein, the capacity prediction model includes the input module, the data processing module, and the self-attention mechanism module; The model application module is used to predict the natural gas hydrate production capacity of the target gas well using the optimized and adjusted production capacity prediction model.

8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dialogue prediction method and device

    CN112214591A

  • Traffic flow prediction method, device, equipment, storage medium and product

    CN119252027A