Well wall stability analysis and risk evaluation method based on quasi Monte Carlo method

By combining the quasi-Monte Carlo method with long short-term memory neural networks, the problem of uncertainty in rock mechanics parameters and geostress in wellbore stability analysis was solved, enabling efficient and accurate prediction of wellbore stability and risk, and providing a scientific basis for drilling design.

CN121503159APending Publication Date: 2026-02-10YANGTZE UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511813687.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing wellbore stability analysis methods cannot effectively quantify rock mechanics parameters and geostress uncertainties, resulting in overly conservative safety factor designs or insufficient risk assessments, making it difficult to reflect the actual probability of instability. Furthermore, traditional methods are inefficient in handling multivariate uncertainties and are difficult to combine with real-time drilling data to achieve dynamic prediction.

Method used

The quasi-Monte Carlo method is used to model the parameter distribution, generate a large-scale parameter combination sample, and combine it with a long short-term memory neural network model to handle wellbore stress calculation and instability conditions, identify key control factors, construct a risk assessment system, and realize wellbore stability analysis and risk prediction.

Benefits of technology

It improves the accuracy and reliability of wellbore stability analysis and risk prediction. By integrating uncertainty modeling with efficient numerical simulation, it provides a scientific basis for drilling design and well control measures, thereby enhancing the accuracy and efficiency of risk prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503159A_ABST
    Figure CN121503159A_ABST
Patent Text Reader

Abstract

The invention discloses a borehole wall stability analysis and risk evaluation method based on a quasi Monte Carlo method, and relates to the technical field of petroleum and natural gas drilling, and the method comprises the following steps: carrying out data cleaning and preprocessing on multi-source parameters, and carrying out parameter distribution modeling to obtain a multi-parameter joint probability distribution model; a quasi-Monte Carlo sampling method is utilized to obtain large-scale parameter combination samples with uniform sample coverage, and well wall stress, collapse conditions and fracture conditions are calculated to obtain collapse coefficients and fracture coefficients under each sample; performing variance decomposition according to a corresponding relation between each input parameter and a borehole wall instability result, identifying key control factors, constructing a training sample set, and training the long-short-term memory neural network model; and inputting related parameters obtained in an actual drilling process into the trained long-short-term memory neural network model to obtain a borehole wall stability result. By implementing the method provided by the invention, the accuracy and reliability of borehole wall stability analysis and risk prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil and gas drilling technology, and more specifically, to a wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method. Background Technology

[0002] Wellbore stability is a core issue in oil and gas drilling engineering. Instability can lead to wellbore collapse, rupture, abnormal wellbore diameter (reduction or enlargement), stuck pipe, and other accidents. In severe cases, it can even cause blowouts or drilling failures, resulting in significant economic losses and safety risks. According to industry statistics, the global oil industry suffers direct economic losses of over $600 million annually due to wellbore instability.

[0003] Existing analytical methods primarily rely on mechanical models (such as elastic, plastic, and fracture mechanics models) combined with deterministic rock mechanics parameters (internal friction angle, cohesion, elastic modulus) and geostress data (maximum / minimum horizontal principal stress, vertical principal stress) for calculation. However, rock mechanics parameters and geological factors such as geostress exhibit significant uncertainties due to complex geological structures, heterogeneous lithology, and measurement limitations. The internal friction angle of rocks at different depths within the same well section may fluctuate dramatically due to variations in mineral composition, and the direction and magnitude of geostress may deviate from preset values ​​due to tectonic stress disturbances. Traditional deterministic analysis cannot quantify the impact of such uncertainties, leading to potentially overly conservative safety factor designs or insufficient risk assessments, failing to reflect the actual probability of instability.

[0004] Traditional methods face three bottlenecks when dealing with multivariate uncertainties: First, rock mechanics parameters are nonlinearly coupled with geostress, and deviations in a single parameter are easily amplified, affecting the overall judgment; second, probabilistic and statistical methods (such as Monte Carlo simulation) are inefficient and difficult to combine with real-time drilling data to achieve dynamic prediction; and third, machine learning is still in its early stages of application in the field of wellbore stability and lacks effective integration with numerical simulation, which limits the generalization and accuracy of prediction models.

[0005] Therefore, existing methods have significant shortcomings in handling lithological parameter uncertainties, quantifying instability risk probabilities, and providing real-time dynamic predictions. There is an urgent need for new analytical methods that integrate probability statistics, efficient numerical simulation, and intelligent algorithms to improve the accuracy and reliability of wellbore instability risk prediction. Summary of the Invention

[0006] The purpose of this invention is to provide a wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method, which can improve the accuracy and reliability of wellbore stability analysis and risk prediction.

[0007] This invention provides a wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method, comprising the following steps: S1: Collect drilling process and well logging, well logging and well testing data to obtain multi-source parameters related to wellbore stability. Clean and preprocess the multi-source parameters to obtain the processed multi-source parameters. S2: Perform parameter distribution modeling based on the processed multi-source parameters to obtain a joint probability distribution model of the multi-parameters; S3: Use the quasi-Monte Carlo sampling method to generate a large-scale parameter combination sample within the distribution interval of the joint probability distribution model of the multi-parameter model, and perform a sampling convergence test on the generated large-scale parameter combination sample to obtain a large-scale parameter combination sample with uniform sample coverage. S4: Based on a large-scale parameter combination sample with uniform sample coverage, calculate the wellbore stress, and calculate the collapse and rupture conditions based on the wellbore stress calculation results to obtain the collapse coefficient and rupture coefficient under each sample. S5: Establish the correspondence between each input parameter and the wellbore instability results, and perform variance decomposition to determine the sensitivity of each parameter to the degree of influence on wellbore stability, and identify the key control factors affecting wellbore collapse and rupture; construct a two-dimensional feature matrix with well depth and corresponding key control factors, and form a training sample set with collapse probability and rupture probability as output labels; S6: Construct a long short-term memory neural network model, use the training sample set to train and validate the long short-term memory neural network model, and obtain a trained long short-term memory neural network model; S7: Input the relevant parameters obtained during the actual drilling process into the trained long short-term memory neural network model to obtain the wellbore stability results.

[0008] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method.

[0009] Implementing the wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method provided by this invention has the following beneficial effects: This invention addresses the problems of large deviations in wellbore stability analysis, inaccurate risk assessment, low propagation efficiency of parameter uncertainty, insufficient sensitivity identification, and low prediction accuracy caused by uncertainties in lithological parameters and geostress data in existing technologies. First, data acquisition and preprocessing are performed, collecting data from the drilling process and in-well logging, extracting multi-source parameters related to wellbore stability, and cleaning and standardizing the raw data to ensure parameter scale uniformity. Then, based on parameter uncertainty, a parameter distribution model is constructed. The distribution of each parameter is fitted based on historical statistics and engineering experience to establish a multi-parameter joint probability distribution model. A quasi-Monte Carlo (QMC) method is used to generate uniformly covered parameter combination samples within the probability distribution interval. Compared with traditional Monte Carlo, this achieves higher computational accuracy and efficiency with fewer samples, effectively solving the problem of low propagation efficiency of parameter uncertainty. Next, the stress state (circumferential, radial, and axial stress) of the wellbore surrounding rock is calculated based on elasticity theory and the finite element method. The collapse coefficient and fracture coefficient are calculated respectively using the Mohr-Coulomb criterion and tensile strength criterion. This invention identifies wellbore instability modes and then uses a multi-point estimation method for global sensitivity analysis to establish the correspondence between input parameters and instability results. It quantitatively identifies key influencing factors of wellbore instability, providing a clear interpretation of the results and thus offering more reliable technical support for pre-drilling geological design and on-site well control. Based on this, the input parameter sequence generated by QMC sampling and well depth features are used to construct training samples. The Long Short-Term Memory (LSTM) neural network, adept at processing sequential data, accurately captures the dynamic characteristics of parameters changing with well depth, overcoming the technical bottleneck of insufficient accuracy in traditional neural networks for such problems. By processing the sequential data changing with well depth using the LSTM neural network model, dynamic characteristics of parameters are extracted, enabling rapid prediction of wellbore stability. Finally, the LSTM prediction results are combined with the multi-point estimation analysis results, and a risk assessment system is constructed using the analytic hierarchy process and fuzzy comprehensive evaluation. A comprehensive risk index is calculated and graded, outputting collapse probability curves, fracture probability curves, and wellbore risk level maps along the well depth direction, providing a scientific basis for drilling design and well control measures. In summary, this invention effectively integrates uncertainty modeling, efficient numerical simulation, and intelligent algorithms, improving the accuracy and reliability of risk prediction. Attached Figure Description

[0010] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart of the wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method provided by the present invention; Figure 2 This invention provides a typical wellbore instability probability logging chart for the T96 well in Dagang Oilfield. Detailed Implementation

[0011] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0012] Figure 1 A schematic diagram of the wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method in this embodiment is shown. In this embodiment, the wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method includes the following steps: S1: Collect drilling process and well logging, well logging and well testing data to obtain multi-source parameters related to wellbore stability. Clean and preprocess the multi-source parameters to obtain the processed multi-source parameters. In one exemplary embodiment, the data cleaning and preprocessing of the multi-source parameters includes: Replace errors or placeholders in the original data with null values ​​to indicate missing data; The data is standardized using max-min normalization to eliminate the gap between different data units.

[0013] In one exemplary embodiment, the calculation formula for standardizing the data using max-min normalization is as follows:

[0014] In the formula, The original data, This is the minimum value of the parameter in the sample. This is the maximum value of the parameter in the sample. This is the dimensionless value after normalization.

[0015] In one exemplary embodiment, the multi-source parameters related to wellbore stability include: cohesion, internal friction angle, elastic modulus, Poisson's ratio, tensile strength, Biot coefficient, pore pressure, overburden stress, and drilling fluid density.

[0016] S2: Perform parameter distribution modeling based on the processed multi-source parameters to obtain a joint probability distribution model of the multi-parameters; In one exemplary embodiment, the parameter distribution modeling based on the processed multi-source parameters includes: fitting the distribution of different parameters based on historical statistics and engineering experience.

[0017] In one exemplary embodiment, the distribution fitting of different parameters includes: cohesion and tensile strength following a log-normal distribution, pore pressure following a normal distribution, and internal friction angle and Biot coefficient following a Beta distribution.

[0018] In one exemplary embodiment, the parameter estimation formulas for the cohesion and tensile strength are as follows:

[0019] In the formula, For the first One sample, The total number of samples, The logarithmic mean is... The variance is logarithmic. The formulas for estimating the mean and variance of the pore pressure are as follows:

[0020] In the formula, This represents the sample mean of the pore pressure. The sample variance of pore pressure; The shape parameters of the internal friction angle and Biot coefficient are:

[0021] In the formula, The sample mean. For sample variance, , These are the shape parameters of the friction angle and Biot coefficient distribution, respectively.

[0022] S3: Use the quasi-Monte Carlo sampling method to generate a large-scale parameter combination sample within the distribution interval of the joint probability distribution model of the multi-parameter model, and perform a sampling convergence test on the generated large-scale parameter combination sample to obtain a large-scale parameter combination sample with uniform sample coverage. In an exemplary embodiment, the formula for generating a large-scale parameter combination sample within the distribution interval of the multi-parameter joint probability distribution model using the quasi-Monte Carlo sampling method is as follows:

[0023] in, Indicates the first The sample at the th Values ​​can be taken in each parameter dimension; For low-difference sequences in the first The point and the first The values ​​in each dimension range from [0,1]. For the first The inverse function of the cumulative distribution function with parameters; S4: Based on a large-scale parameter combination sample with uniform sample coverage, calculate the wellbore stress, and calculate the collapse and rupture conditions based on the wellbore stress calculation results to obtain the collapse coefficient and rupture coefficient under each sample. In one exemplary embodiment, the wellbore stress calculation is based on the Kirsch solution and elasticity theory; In one exemplary embodiment, the wellbore stress calculation uses the following formulas to calculate the circumferential stress, radial stress, and axial stress of the wellbore:

[0024]

[0025]

[0026] In the formula, The radius of the wellbore. It is the azimuth angle. For mud pressure, , These are the maximum and minimum horizontal principal stresses, respectively. For the stress of the overlying strata, Poisson's ratio; The effective stress is expressed as:

[0027] in, For Biot coefficient, Pore ​​pressure, , , These are the effective radial, circumferential, and axial stresses at the wellbore wall, respectively. , , These represent the total radial, circumferential, and axial stresses at the wellbore wall, respectively.

[0028] In one exemplary embodiment, the calculation of collapse conditions is based on the Mohr–Coulomb strength criterion.

[0029] In one exemplary embodiment, the collapse condition is:

[0030] In the formula, For the maximum principal effective stress, For the minimum principal effective stress, It is the internal friction angle. It is cohesive force; The formulas for calculating uniaxial compressive strength and collapse coefficient are as follows:

[0031] In the formula, UCS is the uniaxial compressive strength, and E is the elastic modulus. The critical strain. For circumferential strain, The collapse coefficient is... For the cohesion of rocks, The internal friction angle of the rock.

[0032] In one exemplary embodiment, the calculation of the fracture coefficient includes:

[0033] In the formula, The maximum circumferential tensile stress in the wellbore. This refers to tensile strength.

[0034] S5: Establish the correspondence between each input parameter and the wellbore instability results, and perform variance decomposition to determine the sensitivity of each parameter to the degree of influence on wellbore stability, and identify the key control factors affecting wellbore collapse and rupture; construct a two-dimensional feature matrix with well depth and corresponding key control factors, and form a training sample set with collapse probability and rupture probability as output labels; In one exemplary embodiment, establishing the correspondence between each input parameter and the wellbore instability result, and performing variance decomposition, includes: using a multi-point estimation method to perform variance decomposition on the input parameters, calculating the first-order and total effect indices, and identifying the key control factors affecting wellbore collapse and fracturing; wherein, the formula for calculating the first-order and total effect indices is as follows:

[0035] In the formula, For the first The first-order sensitivity index of the input parameters; Y is the model output; N is the number of samplings. For the first One input parameter; The variance of the model output; For given parameters Under these circumstances, the conditional expectation of the model output Y; This indicates that the parameter is used. The output variance caused by the change.

[0036] In one exemplary embodiment, the training sample set includes a training set, a validation set, and a test set, with a ratio of 7:2:1.

[0037] S6: Construct a long short-term memory neural network model, use the training sample set to train and validate the long short-term memory neural network model, and obtain a trained long short-term memory neural network model; In one exemplary embodiment, constructing the long short-term memory neural network model includes: The system employs a gating mechanism and cell state, wherein the gating mechanism includes a forgetting gate, an input gate, and an output gate, and the forgetting gate is defined by the following formula:

[0038] In the formula, The output of the forget gate; Here is the weight matrix for the forget gate. This is the output of the previous unit state; For the current cell's input; For the bias term of the forget gate; It is the sigmoid function; The input gate is as follows:

[0039]

[0040]

[0041] In the formula, The input gate activation vector; For activation functions; In time step The input vector; It is the weight matrix of the input gate. It is the bias vector of the input gate; It is the bias vector; To determine the current input at the current time step t. and the hidden state of the previous moment A calculated "temporary" cell state value; This is the weight matrix for the candidate cell states; is the bias vector for the candidate cell state; and Candidate cells at time steps and The state; Output for the forget gate; The output gate is as follows:

[0042]

[0043] In the formula, To control the current cell state How much information is output to the hidden state at the current time step? ; Candidate cell state; It is the hyperbolic tangent activation function; This is the weight matrix for the candidate cell states; is the bias vector for the candidate cell state; The output layer uses the Sigmoid activation function, as shown in the formula:

[0044] In the formula, The predicted probability of collapse or rupture. This is the result of linear combination of fully connected layers. For category labels, Represents the type of collapse. Represents the type of breakage; The loss function uses cross-entropy and combines it with a regularization term, as shown in the formula:

[0045] In the formula, The loss function; For the sample size, For real labels, To predict probabilities, The regularization coefficient is . For the first Layer weights, The sample number. For category indexing, For network layer number, Indicates the first The squared L2 norm of the layer weight matrix.

[0046] S7: Input the relevant parameters obtained during the actual drilling process into the trained long short-term memory neural network model to obtain the wellbore stability results.

[0047] In one exemplary embodiment, the wellbore stability results include wellbore collapse probability and wellbore fracture probability; and / or, the wellbore stability results include wellbore instability risk level curves and zonal evaluation results.

[0048] In one exemplary embodiment, the relevant parameters obtained during the actual drilling process include real-time monitored mud density, well depth, annular pressure, and logging parameters.

[0049] In some embodiments, the wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method described above can also be implemented in the following ways.

[0050] In this embodiment, the wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method mainly includes the following steps: Step 101: Data Acquisition. Collect drilling process and on-site logging, well logging, and well testing data, and extract multi-source parameters related to wellbore stability, including cohesion. internal friction angle Elastic modulus E, Poisson's ratio Tensile strength St, Biot coefficient pore pressure Overburden stress And drilling fluid density (MW); Step 102: Data cleaning and preprocessing. Missing values ​​are handled and outliers are removed from the collected raw parameters. Max-min normalization is used to achieve dimensionlessness, ensuring that the scale of each parameter is consistent.

[0051] Step 103: Parameter distribution modeling. Based on historical statistics and engineering experience, the distributions of different parameters are fitted. For example, cohesion and tensile strength follow a log-normal distribution, pore pressure follows a normal distribution, and friction angle and Biot coefficient follow a Beta distribution. Then, a joint probability distribution model of multiple parameters is constructed. Step 104: Quasi-Monte Carlo (QMC) Sampling. In the fitted multi-parameter distribution model, the Quasi-Monte Carlo (QMC) method is used to generate a large-scale sample of parameter combinations. This method generates samples using low-discrepancy sequences instead of traditional random numbers, thereby achieving more uniform sample coverage with a smaller sample size, improving computational efficiency and accuracy. Step 105: Sampling convergence test. Compare the statistical characteristics of the generated sample set, calculate the error between its mean, variance and the theoretical distribution. If the deviation exceeds the preset threshold, increase the number of samples or adjust the sampling interval to ensure uniform sample coverage. Step 106: Wellbore stress calculation. Based on the theory of elasticity, coordinate transformation is used to calculate the circumferential stress, radial stress, and axial stress of the wellbore. Step 107: Wellbore stability criterion. The collapse condition is calculated using the Mohr-Coulomb criterion, and the fracture condition is calculated using the tensile strength criterion, thereby obtaining the collapse coefficient and fracture coefficient for each sample; Step 108: Sensitivity Analysis Using Multi-Point Estimation Method. Establish a correspondence between each input parameter and the wellbore instability results. Use the multi-point estimation method to perform variance decomposition on the input parameters and calculate the first-order and total effect indices to identify key control factors. Step 109: Training Sample Construction. Construct a two-dimensional matrix by combining the well depth with the corresponding multi-parameter features, and use the collapse probability and fracture probability as output labels to form a training sample set, which is then divided into a training set, a validation set, and a test set in a 7:2:1 ratio. Step 110: Long Short-Term Memory (LSTM) Neural Network Modeling. An LSTM neural network model is constructed, which can effectively process sequential data and capture the dynamic dependencies of parameters as well depth changes. The input layer receives a two-dimensional sequence matrix, the LSTM layer extracts well depth sequence features, and the fully connected layer predicts the collapse and fracture probabilities. During training, a cross-entropy loss function and an adaptive learning rate optimizer are used, and overfitting is prevented through regularization and early stopping strategies. Step 111: Model Training and Validation. The LSTM network is trained using the training set, employing regularization and Dropout to prevent overfitting, and the training process is monitored using the validation set. The model converges when the validation set error falls below a threshold. Finally, accuracy is validated on the test set to ensure the prediction error is less than the set standard. Step 112: During actual drilling, the real-time monitored mud density, well depth, annular pressure, and logging parameters are input into the trained LSTM model, which outputs the probability of wellbore collapse and fracturing in real time. Risk interpretation is performed by combining the results of sensitivity analysis using the multi-point estimation method, ultimately generating a wellbore instability risk level curve and zonal evaluation results, providing a basis for drilling fluid density window design and well control.

[0052] Furthermore, in step 102, data cleaning mainly involves replacing errors or placeholders (such as -999, -9999, etc.) in the original data with null values ​​to represent missing data; (1) This represents the original value of the data point with the code i.

[0053] The data is standardized using min-max normalization to eliminate differences between different data units. The calculation formula is as follows: (2) In the formula, x is the original value (such as cohesion, friction angle, etc.). This is the minimum value of the parameter in the sample. This is the maximum value of the parameter in the sample. This is the normalized dimensionless value (range 0–1).

[0054] Furthermore, in step 103, distribution fitting is performed on different parameters based on historical statistics and engineering experience. For example, cohesion and tensile strength follow a log-normal distribution, and their parameter estimation formulas are as follows: (3) In the formula, Let n be the i-th sample, and n be the total number of samples. The logarithmic mean is... The variance is logarithmic.

[0055] Pore ​​pressure can be modeled using a normal distribution, with the mean and variance as follows: (4) In the formula, This represents the sample mean of the pore pressure. The sample variance of pore pressure; The internal friction angle and Biot coefficient can be modeled using a Beta distribution, with the following shape parameters: (5) In the formula, The sample mean. For sample variance, , These are the shape parameters of the friction angle and Biot coefficient distribution, respectively.

[0056] Furthermore, in step 104, the core of the quasi-Monte Carlo (QMC) sampling method is to replace the random sampling of the traditional Monte Carlo method with the generation of low-discrepancy sequences to more uniformly cover the integration region or parameter space, thereby improving computational efficiency and accuracy. Its formula is: (6) In the formula, For the first The sample at the th The values ​​of each parameter dimension Let be the value of the low-dispersion sequence at the i-th point and the j-th dimension, with a value ranging from [0,1]. is the inverse function of the cumulative distribution function (CDF) of the j-th parameter. This function maps the uniform distribution values ​​on the low-discrepancy sequence to the actual probability distribution of the target parameter.

[0057] Further, in step 106, based on the Kirsch solution and elasticity theory, the circumferential stress, radial stress, and axial stress of the wellbore are calculated: (7) (8) (9) In the formula, The radius of the wellbore. It is the azimuth angle. For mud pressure, , These are the maximum and minimum horizontal principal stresses, respectively. For the stress of the overlying strata, It is Poisson's ratio.

[0058] Furthermore, the effective stress is expressed as:

[0059] in, For Biot coefficient, Pore ​​pressure, , , These are the effective radial, circumferential, and axial stresses at the wellbore wall, respectively. , , These represent the total radial, circumferential, and axial stresses at the wellbore wall, respectively.

[0060] Furthermore, in step 107, based on the Mohr–Coulomb strength criterion, the collapse condition is: (10) In the formula, For the maximum principal effective stress, For the minimum principal effective stress, It is the internal friction angle. It is cohesive force.

[0061] The formulas for calculating uniaxial compressive strength and collapse coefficient are as follows: (11) In the formula, UCS is the uniaxial compressive strength, and E is the elastic modulus. The critical strain. For circumferential strain, The collapse coefficient is... For the cohesion of rocks, The internal friction angle of the rock.

[0062] The rupture condition is given by the tensile strength criterion: (12) in, The maximum circumferential tensile stress in the wellbore. This refers to tensile strength.

[0063] Furthermore, in step 108, the multi-point estimation method quantifies sensitivity by calculating the contribution of each input parameter to the output variance. Its core idea is to construct a multi-dimensional set of "points" and approximate the global behavior of the model through combinations of these points. The core idea is: (13) In the formula, is the first-order sensitivity exponent of the i-th input parameter. The larger the value, the greater the influence of the parameter on the model output (wellbore instability result); Y is the output of the model, i.e., the wellbore instability result (e.g., the probability of collapse or rupture). This is the i-th input parameter; The variance of the model output reflects the overall uncertainty of the output results; For given parameters Under these circumstances, the conditional expectation of the model output Y; This indicates that the parameter is used. The output variance caused by the change.

[0064] Furthermore, in step 110, the Long Short-Term Memory (LSTM) neural network is a special type of recurrent neural network (RNN) that is good at processing and predicting sequential data and can capture the dynamic characteristics of wellbore parameters changing with depth. The core of the LSTM unit is three gating mechanisms: forget gate, input gate, and output gate, as well as a cell state.

[0065] 1. Forget gate: determines which information needs to be discarded from the cell state.

[0066] (14) In the formula: Here is the weight matrix for the forget gate. This is the output of the previous unit state; For the current cell's input; For the bias term of the forget gate; This is the sigmoid function.

[0067] 2. Input gate: determines which new information will be stored in the cell state.

[0068] (15) (16) (17) In the formula: The input gate activation vector; For activation functions; Let be the input vector at time step t; It is the weight matrix of the input gate. It is the bias vector of the input gate; is the bias vector; Equation (17) is used to update the cell state at the current time step.

[0069] 3. Output gate: determines the final hidden state and the cell state at the next time step.

[0070] (18)

[0071] In the formula: Candidate cell state; It is the hyperbolic tangent activation function; This is the weight matrix for the candidate cell states; is the bias vector for the candidate cell state.

[0072] The output layer uses the Sigmoid activation function: (19) in, The predicted probability of collapse or rupture. The result is a linear combination of fully connected layers, where c is the category label, where "col" represents the collapse category and "frac" represents the rupture category.

[0073] The loss function uses cross-entropy, combined with a regularization term: (20) In the formula, M is the number of samples. For real labels, To predict probabilities, The regularization coefficient is . For the first Layer weights, where m is the sample index and c is the class index. For network layer number, Indicates the first The squared L2 norm of the layer weight matrix.

[0074] This invention's application study selects the T96 well in Dagang Oilfield, my country, as the research object. It employs the wellbore stability analysis method proposed in this invention, based on quasi-Monte Carlo (QMC) sampling, multi-point estimation, and a long short-term memory (LSTM) neural network, to assess the instability risk in the 3000-4100 meter well depth range. In this embodiment, rock mechanics parameters and initial stress field are first calculated based on logging and inversion data. Then, a modified Mohr-Coulomb criterion and an elasticity model are used to construct the wellbore stress-strain response relationship. Subsequently, parameter uncertainties are introduced, and the wellbore state under different operating conditions is simulated through 2000 QMC samplings. The instability probability is statistically analyzed based on the collapse coefficient (Fc < 0.15) and fracture conditions (Ft > 1 and tensile circumferential stress), ultimately forming a collapse and fracture risk profile along the well depth, providing a quantitative basis for safe drilling decisions.

[0075] like Figure 2As shown, the wellbore collapse probability (red band) and fracture probability (green band) calculated by this method are clearly distributed along the well depth, exhibiting a segmented fluctuation characteristic. In several sections, such as 3200–3400 meters and 3800–4000 meters, the collapse probability generally exceeds 60%, with local peaks approaching 100%. High collapse probability areas are usually accompanied by well diameter expansion, indicating significant wellbore instability risk in these areas. The fracture probability, on the other hand, is relatively low, showing only a short-distance increase in a few high-stress-difference sections, indicating that collapse failure is the dominant failure mode in these sections. This invention effectively quantifies wellbore instability risk under uncertainties in lithological parameters and geostress, generating intuitive risk profiles. It provides a scientific basis for drilling fluid density window design, wellbore structure optimization, and well control decisions, possessing strong industrial application value and promising prospects for wider application.

[0076] This embodiment provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method.

[0077] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method, characterized in that, Includes the following steps: S1: Collect drilling process and well logging, well logging and well testing data to obtain multi-source parameters related to wellbore stability. Clean and preprocess the multi-source parameters to obtain the processed multi-source parameters. S2: Perform parameter distribution modeling based on the processed multi-source parameters to obtain a joint probability distribution model of the multi-parameters; S3: Use the quasi-Monte Carlo sampling method to generate a large-scale parameter combination sample within the distribution interval of the joint probability distribution model of the multi-parameter model, and perform a sampling convergence test on the generated large-scale parameter combination sample to obtain a large-scale parameter combination sample with uniform sample coverage. S4: Based on a large-scale parameter combination sample with uniform sample coverage, calculate the wellbore stress, and calculate the collapse and rupture conditions based on the wellbore stress calculation results to obtain the collapse coefficient and rupture coefficient under each sample. S5: Establish the correspondence between each input parameter and the wellbore instability results, perform variance decomposition, determine the sensitivity results of each parameter's influence on wellbore stability, and identify the key control factors affecting wellbore collapse and rupture. A two-dimensional feature matrix is ​​constructed by relating well depth to the corresponding key control factors, and the collapse probability and fracture probability are used as output labels to form a training sample set. S6: Construct a long short-term memory neural network model, use the training sample set to train and validate the long short-term memory neural network model, and obtain a trained long short-term memory neural network model; S7: Input the relevant parameters obtained during the actual drilling process into the trained long short-term memory neural network model to obtain the wellbore stability results.

2. The wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method according to claim 1, characterized in that, The data cleaning and preprocessing of the multi-source parameters includes: replacing errors or placeholders in the original data with null values ​​to represent missing data; and standardizing the data using max-min normalization to eliminate the gap between different data units.

3. The wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method according to claim 1, characterized in that, The parameter distribution modeling based on the processed multi-source parameters includes: fitting the distribution of different parameters based on historical statistics and engineering experience.

4. The wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method according to claim 3, characterized in that, The distribution fitting of different parameters includes: cohesion and tensile strength following a log-normal distribution, pore pressure following a normal distribution, and internal friction angle and Biot coefficient following a Beta distribution.

5. The wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method according to claim 1, characterized in that, The formula for generating large-scale parameter combination samples within the distribution interval of the multi-parameter joint probability distribution model using the quasi-Monte Carlo sampling method is as follows: in, Indicates the first The sample at the th Values ​​can be taken in each parameter dimension; For low-difference sequences in the first The point and the first The values ​​in each dimension range from [0,1]. For the first The inverse function of the cumulative distribution function with parameters.

6. The wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method according to claim 1, characterized in that, In the wellbore stress calculation, the formulas used to calculate the circumferential stress, radial stress, and axial stress of the wellbore are as follows: In the formula, The radius of the wellbore. It is the azimuth angle. For mud pressure, , These are the maximum and minimum horizontal principal stresses, respectively. For the stress of the overlying strata, Poisson's ratio; The effective stress is expressed as: in, For Biot coefficient, Pore ​​pressure, , , These are the effective radial, circumferential, and axial stresses at the wellbore wall, respectively. , , These represent the total radial, circumferential, and axial stresses at the wellbore wall, respectively.

7. The wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method according to claim 1, characterized in that, The calculated collapse conditions are based on the Mohr–Coulomb strength criterion.

8. The wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method according to claim 1, characterized in that, The process of establishing the correspondence between each input parameter and the wellbore instability result, and performing variance decomposition, includes: using a multi-point estimation method to perform variance decomposition on the input parameters, calculating the first-order and total effect indices, and identifying the key control factors affecting wellbore collapse and fracturing; wherein, the formula for calculating the first-order and total effect indices is as follows: In the formula, For the first The first-order sensitivity index of the input parameters; Y is the model output; N is the number of samplings. For the first One input parameter; The variance of the model output; For given parameters Under these circumstances, the conditional expectation of the model output Y; This indicates that the parameter is used. The output variance caused by the change.

9. The wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method according to claim 1, characterized in that, The construction of the long short-term memory neural network model includes: The system employs a gating mechanism and cell state, wherein the gating mechanism includes a forgetting gate, an input gate, and an output gate, and the forgetting gate is defined by the following formula: In the formula, The output of the forget gate; Here is the weight matrix for the forget gate. This is the output of the previous unit state; For the current cell's input; For the bias term of the forget gate; It is the sigmoid function; The input gate is as follows: In the formula, The input gate activation vector; For activation functions; In time step The input vector; It is the weight matrix of the input gate. It is the bias vector of the input gate; It is the bias vector; To determine the current input at the current time step t. and the hidden state of the previous moment A calculated "temporary" cell state value; This is the weight matrix for the candidate cell states; is the bias vector for the candidate cell state; and Candidate cells at time steps and The state; Output for the forget gate; The output gate is as follows: In the formula, To control the current cell state How much information is output to the hidden state at the current time step? ; Candidate cell state; It is the hyperbolic tangent activation function; This is the weight matrix for the candidate cell states; is the bias vector for the candidate cell state; The output layer uses the Sigmoid activation function, as shown in the formula: In the formula, The predicted probability of collapse or rupture. This is the result of linear combination of fully connected layers. For category labels, Represents the type of collapse. Represents the type of breakage; The loss function uses cross-entropy, combined with a regularization term, as shown in the formula: In the formula, The loss function; For the sample size, For real labels, To predict probabilities, The regularization coefficient is . For the first Layer weights, The sample number. For category indexing, For network layer number, Indicates the first The squared L2 norm of the layer weight matrix.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the wellbore stability analysis and risk assessment method based on the quasi-Monte Carlo method as described in any one of claims 1-9.