A training and prediction method of an intelligent prediction model for drilling overflow conditions and a downhole overflow risk probability prediction system

By improving the fusion of particle swarm algorithm and neural network models, the optimal fusion model is formed, which solves the misjudgment and overfitting problems in drilling overflow monitoring, and realizes advanced prediction and accurate identification of overflow, improving the The credibility and prediction accuracy of downhole overflow risk management.

CN116796647BActive Publication Date: 2024-11-19SHENGSHANG ONLINE NETWORK TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310856388.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-13
Publication Date
2024-11-19
Estimated Expiration
2043-07-13

AI Technical Summary

Technical Problem

The existing drilling overflow condition monitoring mainly relies on manual judgment, which has the risk of misjudgment and is difficult to achieve advanced prediction of overflow. The early feature recognition accuracy is low, and traditional methods are easy to overfit, and there is a lack of effective downhole overflow risk prediction. system.

Method used

Using data preprocessing, training of machine learning group intelligent models, obtaining optimal fusion model, and predicting and visualization methods, we will improve the LSTM and BP neural network models optimized by particle swarm algorithm, and combine genetic algorithms and annealing algorithms to form 11 models, the optimal fusion model was selected for overflow prediction, avoid overfitting and improve generalization ability.

Benefits of technology

It realizes advanced prediction and accurate identification of overflow, reduces false alarm rate, improves the accuracy of overflow condition recognition, provides real-time and future moments of overflow probability prediction, and enhances the ability to manage downhole overflow risk Reliability and prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116796647B_ABST
    Figure CN116796647B_ABST
Patent Text Reader

Abstract

The present invention discloses a training and prediction method of an intelligent prediction model for drilling overflow conditions and an underground overflow risk probability prediction system, including: data preprocessing, training a machine learning group intelligent model, obtaining an optimal fusion model, and optimal fusion model prediction and visualization. The present invention can not only monitor overflow conditions in real time, but also realize advance prediction of overflows, visualize the probability of overflows in the current and future time periods, and give targeted AI operation suggestions when overflow conditions are predicted, further helping to avoid overflows; the present invention integrates a variety of machine learning models and improves them, which summarizes most of the mainstream prediction algorithms, and performs training and new sample data prediction and evaluation based on the logging data provided by the user, and combines the optimal fusion model through a variety of error evaluation results. Compared with the prediction of a single model, it can provide higher prediction accuracy and solve the problem that the early characteristics of overflows are not obvious and false alarms are prone to occur.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of machine learning and drilling engineering, and in particular to a training and prediction method of an intelligent prediction model for drilling overflow conditions and a downhole overflow risk probability prediction system. Background Art

[0002] If drilling accidents such as leaks, overflows, blowouts, and wellbore collapse occur during oil extraction, it will not only affect drilling costs and pollute the environment, but may even cause casualties. Among them, overflow is the most frequent type of drilling accident, and it is also one of the more common underground complex accidents that affect drilling construction safety. Overflow will not only cause serious damage to the reservoir, increase exploration and development costs, and reduce oil and gas extraction efficiency, but more importantly, if timely measures are not taken, it may cause major disasters such as stuck drill, well collapse, and blowout, causing more serious adverse effects. Therefore, the research and development of the underground overflow risk probability prediction system during the drilling process is of great significance.

[0003] Traditional drilling overflow conditions mainly rely on manual monitoring of various logging data, and based on experience, analyze the changes in logging curves to determine whether overflow has occurred in the well or there are signs of overflow. This is closely related to the experience and sense of responsibility of the monitoring personnel, which is prone to misjudgment and has many uncontrollable factors.

[0004] At present, the proposed techniques for learning and identifying multiple manually selected logging parameters through methods such as Bayesian networks and neural networks still have the following limitations:

[0005] (1) Overflow conditions can only be monitored in real time or identified from historical drilling data. Some of them have achieved a certain degree of accuracy, but they cannot achieve advance prediction of overflow conditions. According to oil and gas drilling experience, nearly 70% of blowout events occur within 30 minutes after the overflow is discovered, and half of them occur within 10 minutes. Therefore, it can be seen that real-time monitoring alone is difficult to meet the needs. Therefore, the present invention can achieve advance prediction of overflow conditions and output the probability of overflow in real time and in the future;

[0006] (2) The accuracy of early feature recognition of overflow conditions is not high, and false alarms often occur. Therefore, the present invention integrates multiple mainstream machine learning algorithms and models, and improves the algorithms. The overflow condition recognition accuracy of the final fusion model is higher;

[0007] (3) In the specific network model training process, almost all papers and practices currently segment the same sample data, and then use the segmented training set and test set for model learning. However, since they are still based on the same sample data, there is a risk of overfitting. Therefore, the present invention uses another new logging data when evaluating the prediction ability of each method of the fusion model, and the model is relatively more credible and generalizable. Summary of the invention

[0008] The present invention proposes a training and prediction method for an intelligent prediction model of drilling overflow conditions and a downhole overflow risk probability prediction system. The method and system aim to achieve advance prediction of overflow, accurately identify and warn when overflow is about to occur, and promptly remind personnel to take measures to avoid overflow accidents, thereby indirectly preventing overflow from evolving into a more serious blowout disaster.

[0009] The technical solution of the present invention is as follows:

[0010] A training and prediction method of an intelligent prediction model for drilling overflow conditions and a downhole overflow risk probability prediction system, including: data preprocessing, training a machine learning group intelligent model, obtaining an optimal fusion model, optimal fusion model prediction and visualization, wherein:

[0011] Data preprocessing steps: Collect three groups of data, including original logging data, new well logging data and well logging data to be predicted. Perform data cleaning, PCA attribute dimension reduction, data set partitioning and normalization SMOTE unbalanced data processing operations on the original logging data. Perform data cleaning, data set partitioning and normalization, and overflow key feature column extraction operations on the new well logging data and well logging data to be predicted.

[0012] The step of training the machine learning swarm intelligence model is as follows: based on the original logging data that has undergone the data preprocessing step, the data are used to train the long short-term memory network (Long Short-Term Memory, LSTM) model IPSO-LSTM optimized by the improved particle swarm algorithm (Improved Particle Swarm Optimization, IPSO) and the BP neural network model IPSO-BP optimized by the improved particle swarm algorithm IPSO, and at the same time, the same algorithms of the improved particle swarm algorithm are set: Genetic Algorithm (Genetic Algorithm, GA), annealing algorithm (Simulated Annealing, SA), and the same algorithm of the long short-term memory network LSTM ARIMA time series model (Autoregressive Integrated Moving Average) Average) as a comparative reference, and another seven models are composed of the long short-term memory network model GA-LSTM optimized by genetic algorithm, the ARIMA time series model GA-ARIMA optimized by genetic algorithm, the BP neural network model GA-BP optimized by genetic algorithm, the long short-term memory network model SA-LSTM optimized by annealing algorithm, the BP neural network model SA-BP optimized by annealing algorithm, the ARIMA time series model SA-ARIMA optimized by annealing algorithm, the ARIMA time series model IPSO-ARIMA optimized by improved particle swarm algorithm, and two BP neural network models and LSTM long short-term memory network models that do not use optimization algorithms as references, a total of 11 models;

[0013] Steps for obtaining the optimal fusion model: Based on the new well logging data that has undergone three steps of data cleaning, data set division and normalization, and overflow key feature column extraction, the 11 models are used to predict the data respectively, and the prediction results of the 11 models and 8 error evaluation values ​​are compared: MAPE (Mean Absolute Percentage Error), MAE (Mean Absolute Error), RMSE (Root Mean Squared Error), R-squared, accuracy, recall, F1 Score and precision. The optimal models of the regression and classification stages are selected and combined into the optimal fusion model;

[0014] Optimal fusion model prediction and visualization steps: Based on the optimal fusion model and the logging data of the well to be predicted that has undergone three steps of data cleaning, data set division and normalization, and overflow key feature column extraction, the optimal fusion model is used to perform two-step prediction on the logging data of the well to be predicted: first, a regression model is used for advance prediction, and then a classification model is used for overflow prediction to obtain the final overflow prediction result, and the prediction result is visualized in the underground overflow risk probability prediction system.

[0015] Furthermore, the data processing step includes: firstly, performing a three-step data cleaning process of filling missing values, smoothing noise data, identifying and deleting outliers and invalid data on the logging data collected five days before and after the overflow, and standardizing the logging data; then performing PCA data dimensionality reduction processing on the d-dimensional original logging data: the logging data is organized into a d-dimensional matrix X with n rows by columns, and each row of X is subtracted from the mean of the row to obtain the covariance matrix of X, as well as the eigenvalues ​​and corresponding eigenvectors of the covariance matrix, and then the eigenvectors are arranged in rows from top to bottom according to the corresponding eigenvalues, and the first m rows are taken to form a matrix P, and Y=PX is the data reduced to m dimensions, which is used as the important feature of the overflow after being processed by the PCA data dimensionality reduction method.

[0016] Furthermore, the step of training the machine learning swarm intelligent model includes: based on the preprocessed original logging data, 11 models are trained respectively, which can be divided into the regression stage according to the different process stages to which each model belongs: LSTM reference regression prediction model, IPSO-LSTM optimization regression prediction model, GA-LSTM optimization regression prediction model, SA-LSTM optimization regression prediction model, IPSO-ARIMA optimization regression prediction model, GA-ARIMA optimization regression prediction model, SA-ARIMA optimization regression prediction model, and classification stage: BP reference classification model, IPSO-BP optimization classification prediction model, GA-BP optimization classification prediction model, SA-BP optimization classification prediction model, that is, using three optimization algorithms of IPSO, GA, and SA and two regression models LSTM, ARIMA and one classification model BP neural network to cross-combine respectively to form 9 optimization models, and then adding the BP neural network classification model and LSTM regression model that have not been optimized.

[0017] Furthermore, in the improved particle swarm algorithm IPSO, the following optimizations are used based on the PSO particle swarm algorithm:

[0018] 1) Compared with the fixed value C1=C2=2, the nonlinear update of the particle individual learning factor C1 and the group learning factor C2 is realized: C1 is large and C2 is small in the early stage of particle iteration to ensure particle independence; C1 is small and C2 is large in the later stage to converge to the global optimal position as soon as possible;

[0019] 2) Improve inertia weight: Comparing the four weight update methods, linear decreasing update, two nonlinear decreasing methods A and B, and randomly generated inertia weight, the B type nonlinear decreasing method is preferred, and the convergence speed is significantly improved;

[0020] 3) Set two random search coefficients r1 and r2 to prevent particles from falling into the local optimal solution;

[0021] Furthermore, the combination of the three optimization algorithms IPSO, GA, and SA with the classification and regression models is as follows:

[0022] 1) The F1 Score of the classification prediction model and the mean absolute error MAE of the regression prediction model are used as the fitness values ​​of the above three optimization algorithms to design the fitness functions of the three optimization algorithms. The global iterative optimization is performed to find the maximum F1 Score value of the classification model and the minimum mean absolute error value of the regression model, and finally the optimal solution is obtained;

[0023] 2) The six hyperparameters that affect the performance of the BP neural network, namely, the number of hidden layers of the BP neural network, the number of neurons in each layer (each layer can be different), the initial weight value W and threshold b of each layer of neurons (each layer can be different), the number of epochs of each round of iterative training of the neural network, and the batchSize size of the samples used by the neural network to update the weight parameters each time, are used as the optimization objectives of the optimization algorithm;

[0024] 3) The six hyperparameters that affect the prediction effect of the LSTM long short-term memory network, namely, the number of LSTM layers, the number of neurons in the LSTM layer, the number of Dense fully connected layers, the number of neurons in the Dense layer, the number of epochs for each round of iterative training of the LSTM long short-term memory network, and the batchSize size of the number of samples used by the neural network to update the weight parameters each time, are used as the optimization objectives of the optimization algorithm;

[0025] 4) The three hyperparameters that affect the prediction effect of the ARIMA time series network, namely the autoregressive (AR) order, the number of differences (Difference) and the order of the moving average (MA), are used as the optimization objectives of the optimization algorithm;

[0026] 5) The IPSO improved particle swarm algorithm will exit this round of optimization when the specified error is reached during each round of iterative optimization. Otherwise, the optimization will be stopped when the set maximum number of iterations is reached. For the GA and SA optimization algorithms, when the change in the loss function is less than 0.0001 for 10 consecutive rounds, it will be assumed that the current round has converged and the current round of optimization will be exited. The above settings can improve the efficiency of model training.

[0027] Furthermore, in the step of taking the optimal fusion model, the 11 models are used to predict the new well logging data after data cleaning and taking the overflow key feature column, and the error values ​​are calculated respectively:

[0028] 1) For regression models LSTM, IPSO-LSTM, GA-LATM, SA-LSTM, IPSO-ARIMA,

[0029] GA-ARIMA and SA-ARIMA respectively calculate the four error evaluation values ​​of MAPE, MAE, RMSE and R-squared between the predicted values ​​and the true values ​​of these seven models;

[0030] 2) For the classification models BP, IPSO-BP, GA-BP, and SA-BP, the four error evaluation values ​​of accuracy, recall, F1 Score, and precision between the predicted values ​​and the true values ​​of these four models are calculated respectively;

[0031] Based on the statistical prediction results and error evaluation values ​​of each regression and classification model, the optimal models of the regression and classification are selected respectively. The optimal fusion model is formed according to the rule that the regression model comes first, the classification model comes second, and the input data of the classification model is the prediction result data of the regression model.

[0032] Furthermore, in the optimal fusion model prediction and visualization step: the optimal fusion model is used to predict the logging data of the well to be predicted that has been cleaned and has the overflow key feature column: the overflow key feature column data is first sent to the regression model in the optimal fusion model to predict the specific value of the specified time step, and then the data predicted by the regression model output is sent to the classification model in the optimal fusion model, and the probability of overflow in the future time period is classified and predicted according to the overflow key feature column data in the future time period predicted by the regression model, and the model prediction results are displayed in the underground overflow risk probability prediction system.

[0033] Furthermore, the prediction results of the regression model and the fusion model are visualized in the downhole overflow risk probability prediction system: the prediction results of the regression model and the prediction results of the optimal fusion model are displayed in the form of a line graph on the prediction page of the downhole overflow risk probability prediction system, and the overflow probability at the current moment and the AI ​​suggestions for the drilling conditions at this moment are also displayed.

[0034] Furthermore, the logging data of new wells and wells to be predicted are cleaned, the data sets are divided and normalized, and the overflow key feature columns are obtained in three steps:

[0035] 1) The overflow key feature columns of the new well logging data and the well logging data to be predicted are the original logging data.

[0036] Overflow key feature columns selected after PCA attribute dimensionality reduction;

[0037] 2) In the present invention, different data sets are used in the two processes of training and predictive verification of the 11 models. The original logging data is used in the training stage of the 11 models, and the new well logging data is used in the predictive verification of the model capabilities. The purpose of this design is to avoid overfitting of the model and improve the credibility of the model.

[0038] Technical effects and advantages of the present invention:

[0039] (I) Technical Effect

[0040] The present invention proposes a training and prediction method for an intelligent prediction model of drilling overflow conditions and a downhole overflow risk probability prediction system, which achieves the following technical effects:

[0041] 1. The training and prediction methods of the drilling overflow condition intelligent prediction model realize data preprocessing of the input logging data, and use a machine learning group intelligent model composed of 11 groups of machine learning models to train and learn the logging data, and obtain the optimal fusion model suitable for this well. Finally, this optimal fusion model is used to predict the overflow of the well in advance, accurately identify and warn when overflow is about to occur, and promptly remind personnel to take measures to avoid overflow accidents, thereby indirectly preventing overflows from evolving into more serious blowout disasters;

[0042] 2. The downhole overflow risk probability prediction system uses python and PyQt5 to design and encapsulate the GUI visualization interface. The system has built-in training and prediction methods for the above-mentioned drilling overflow condition intelligent prediction model, and realizes human-computer interaction for operations such as model training and prediction, logging data import and overflow key feature selection, as well as visualization of the regression prediction results (historical and future numerical curves of overflow key features) and classification prediction results (overflow probability) of the above-mentioned optimal fusion model, and provides AI operation suggestions based on logging data combined with predicted overflow probability information.

[0043] (ii) Advantages

[0044] 1. It can not only monitor overflow conditions in real time, but also predict overflows in advance, visualize the probability of overflows in the current and future time periods, and give targeted AI operation suggestions when overflow conditions are predicted, further helping to avoid overflows;

[0045] 2. The present invention integrates and improves a variety of machine learning models, which summarizes most of the mainstream prediction algorithms, and performs training and prediction evaluation of new sample data (new well logging data) based on the logging data provided by the user. The optimal fusion model is combined with a variety of error evaluation results. Compared with the prediction of a single model, it can provide higher prediction accuracy and solve the problem that the early characteristics of overflow are not obvious and false alarms are prone to occur;

[0046] 3. Use new sample data (new well logging data) to perform prediction evaluation on the model, instead of splitting the same sample data and then using the split training set and test set for model learning as almost all papers and practices currently do. Using new sample data can more objectively reflect the generalization performance of the prediction model and avoid overfitting and data leakage problems in model training;

[0047] 4. Based on the training and prediction methods of the intelligent prediction model of drilling overflow conditions, a downhole overflow risk probability prediction system that supports human-computer interaction is provided, and the prediction results are visualized to facilitate the operation of oilfield on-site personnel. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 The figure shows a schematic diagram of the overall design of a drilling overflow condition intelligent prediction model, a prediction method, and a downhole overflow risk probability prediction system according to an embodiment of the present invention;

[0049] Figure 2 It is a flowchart of a training and prediction method of an intelligent prediction model for drilling overflow conditions and a downhole overflow risk probability prediction system according to an embodiment of the present invention;

[0050] Figure 3 Shown is a flow chart of data preprocessing steps in an embodiment of the present invention;

[0051] Figure 3 (A) shows a scree plot of the PCA attribute dimension reduction method in the data preprocessing step of a specific embodiment of the present invention;

[0052] Figure 3 (B) is a schematic diagram showing a data annotation result in a data preprocessing step in a specific embodiment of the present invention;

[0053] Figure 4 The figure is a flow chart of an IPSO improved particle swarm algorithm according to an embodiment of the present invention;

[0054] Figure 5 Shown is a flow chart of combining various optimization algorithms with various machine learning models in an embodiment of the present invention;

[0055] Figure 5(A) is a schematic diagram showing the first result of using the IPSO improved particle swarm algorithm to perform global optimization on the LSTM long short-term memory network in a specific embodiment of the present invention;

[0056] Figure 5 (B) is a schematic diagram showing a second result of using the IPSO improved particle swarm algorithm to perform global optimization on the LSTM long short-term memory network according to an embodiment of the present invention;

[0057] Figure 5 (C) is a comparison diagram of the prediction effects of an LSTM long short-term memory network and an ARIMA time series network model after a round of optimization according to a specific embodiment of the present invention;

[0058] Figure 6 Shown is a flow chart of a model evaluation and fusion process according to an embodiment of the present invention;

[0059] Figure 7 The figure is an operation flow chart of a downhole overflow risk probability prediction system in a specific embodiment of the present invention;

[0060] Figure 7 (A) is a first interface design diagram of a downhole overflow risk probability prediction system according to a specific embodiment of the present invention;

[0061] Figure 7 (B) is a second interface design diagram of a downhole overflow risk probability prediction system according to a specific embodiment of the present invention;

[0062] Figure 7 (C) shows the third interface design diagram of the underground overflow risk probability prediction system according to a specific embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the system or device product is executed in practice, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel.

[0065] It should be noted that the training and prediction methods of the intelligent prediction model for drilling overflow conditions in this article can be used in the field of drilling engineering or in the identification and prediction of overflow conditions, and can also be used in other situations besides the field of drilling engineering and overflow conditions. The training and prediction methods of the intelligent prediction model for drilling overflow conditions in this article and the application fields and target conditions of the downhole overflow risk probability prediction system are not limited.

[0066] The present invention provides a training and prediction method for an intelligent prediction model for drilling overflow conditions and a downhole overflow risk probability prediction system, which are used for advance prediction of overflows. Based on multiple machine learning models, historical logging data and new well logging data are trained and predicted and verified, and the model that can most accurately predict the well to be predicted is selected, and the interactive software and model prediction results are displayed in a visual manner.

[0067] like Figure 1 The figure shows a visualization diagram of the training and prediction method of an intelligent prediction model for drilling overflow conditions according to an embodiment of the present invention, which includes four steps: data preprocessing, training a machine learning swarm intelligent model, obtaining an optimal fusion model, and optimal fusion model prediction and visualization.

[0068] like Figure 2 The figure is a flow chart of a training and prediction method of a drilling overflow condition intelligent prediction model and a downhole overflow risk probability prediction system according to an embodiment of the present invention, which specifically includes the following steps:

[0069] Step 201, data preprocessing. In this step, data preprocessing operations are performed on the original logging data, and data cleaning and overflow key feature column extraction operations are performed on the new well logging data. Among them, the data preprocessing operation includes four steps: data cleaning, PCA attribute dimension reduction, data set partitioning and normalization, and SMOTE unbalanced data processing. The overflow key feature column extraction operation is to select the overflow key feature column of the new well logging data according to the PCA attribute dimension reduction results of the original logging data. Specifically, the PCA attribute dimension reduction will extract the most critical and representative feature columns based on the input data, which can reduce the data items while ensuring the data quality (see the data preprocessing process for details). Figure 3 ).

[0070] Among them, the original logging data and the new well logging data are different well data from nearby wells, which are used to more accurately evaluate the trained model. The two logging data may contain different data contents, which are generally recorded in time series, including mechanical drilling speed, outlet flow, inlet flow, pump stroke, riser pressure, total pool volume, hook hanging weight, torque, outlet conductivity and other data.

[0071] Step 202, based on the processed original logging data, train and save 11 machine learning classification and regression models respectively. In this step, the original logging data after the above data preprocessing operation is used to train each regression or classification machine learning model, which are respectively the long short-term memory network model IPSO-LSTM optimized by the improved particle swarm algorithm, the BP neural network model IPSO-BP optimized by the improved particle swarm algorithm IPSO, the ARIMA time series model IPSO-ARIMA optimized by the improved particle swarm algorithm, the long short-term memory network model GA-LSTM optimized by the genetic algorithm, the BP neural network model GA-BP optimized by the genetic algorithm, the ARIMA time series model GA-ARIMA optimized by the genetic algorithm, the long short-term memory network model SA-LSTM optimized by the annealing algorithm, the BP neural network model SA-BP optimized by the annealing algorithm, the ARIMA time series model SA-ARIMA optimized by the annealing algorithm, the BP neural network model and the LSTM long short-term memory network model. Among them, these 11 models can be divided into 7 regression models (LSTM, IPSO-LSTM, IPSO-ARIMA, GA-LSTM, GA-ARIMA, SA-LSTM, SA-ARIMA) and 4 classification models (BP neural network, IPSO-BP, GA-BP, SA-BP) according to different application scenarios and purposes. They can also be divided into unoptimized models (LSTM, BP neural network), IPSO improved particle swarm algorithm optimization (IPSO-LSTM, IPSO-ARIMA, IPSO-BP), GA genetic algorithm optimization (GA-LSTM, GA-ARIMA, GA-BP) and SA annealing algorithm optimization (SA-LSTM, SA-ARIMA, SA-BP) according to the optimization algorithms used.

[0072] Furthermore, the IPSO improved particle swarm algorithm is improved on the basis of the PSO particle swarm algorithm. The improvement process is as follows: Figure 4 As shown in the figure, the IPSO improved particle swarm algorithm consists of two core attributes: speed and position. The speed indicates the direction and distance that the particle moves in the next iteration. The position is a solution to the problem being solved. The speed and displacement update formulas are:

[0073]

[0074] The speed formula consists of three items. The first item is the weight part, which is composed of the inertia weight and the particle's own speed, indicating the particle's trust in its previous state of motion. The second item is the cognitive part, which indicates the particle's own thinking, that is, the part of the particle's own experience, which can be understood as the distance and direction between the particle's current position and its own historical optimal position. The third item is the group part, which indicates the information sharing and cooperation between particles, that is, the experience from other excellent particles in the group, which is the distance and direction between the particle's current position and the group's historical optimal position. In the formula, w is the inertia weight, k is the number of iterations, d is the particle dimension number, c1 is the individual learning factor, c2 is the group learning factor, r1 and r2 are random numbers in the interval [0, 1], and v is the distance and direction between the particle's current position and the group's historical optimal position. id k is the velocity vector of particle i in the kth iteration, x id k is the position vector of particle i in the dth dimension in the kth iteration, p k id,pbest is the historical optimal position of particle i in the dth dimension in the kth iteration, that is, the optimal solution searched by the i-th particle after the kth iteration, p k d,gbest is the historical optimal position of the swarm in the dth dimension in the kth iteration, that is, the optimal solution in the entire particle swarm after the kth iteration.

[0075] Among them, the IPSO improved particle swarm algorithm improves the inertia weight w, c1 individual learning factor, c2 group learning factor, r1, r2 random numbers of the speed update formula. The inertia weight w is updated nonlinearly using the following formula. After comparing with linear decrease, random inertia decrease and multiple nonlinear decreases, this update method has the best improvement effect:

[0076]

[0077] The following formula is used to update the individual learning factor c1 and the group learning factor c2, so that in the early stage of particle iteration, C1 is large and C2 is small, ensuring the independence of particles; in the later stage, C1 is small and C2 is large, converging to the global optimum as soon as possible. Among them, max_iter is the maximum number of iterations of the IPSO improved particle swarm algorithm, and iteration is the current number of cycles:

[0078]

[0079]

[0080] The displacement update formula is the position of the previous step + the speed of the next step, as shown below:

[0081]

[0082] Among them, the principles of the three optimization algorithms, IPSO improved particle swarm algorithm, GA genetic algorithm, and SA annealing algorithm, are to use a group of basic individuals, each of which carries some hyperparameters of the model to be optimized as its own attributes, and iterative optimization is carried out with the goal of minimizing the error or maximizing the accuracy of the model after applying these hyperparameters.

[0083] Specifically, when optimizing the LSTM network, the three optimization algorithms all set the number of LSTM layers, the number of LSTM neurons, the number of Dense fully connected layers, the number of Dense neurons, the number of epochs for each round of iterative training of the LSTM network, and the batchSize of the number of samples used for each weight parameter update of the neural network. These six hyperparameters that affect the prediction effect of the LSTM network are used as the basic individual attributes of the optimization algorithm. The mean absolute error (MAE) between the true value of the sample and the predicted value of the LSTM network is used as the fitness value of the optimization algorithm to design the fitness function.

[0084] Specifically, when optimizing the ARIMA time series network, the three optimization algorithms all set the autoregression (AR) order, the difference (Difference) number and the moving average (MA) order, which are three hyperparameters that affect the prediction effect of the ARIMA time series network, as the fitness values ​​of the optimization algorithm to design the fitness function;

[0085] Specifically, when optimizing the BP neural network, the three optimization algorithms all set the number of hidden layers, the number of neurons in each layer (each layer can be different), the initial value W and threshold b of the weight of each layer of neurons (each layer can be different), the number of epochs of each round of iterative training of the neural network, and the number of samples used by the neural network each time to update the weight parameters. These six hyperparameters that affect the performance of the BP neural network are used as the fitness values ​​of the optimization algorithm to design the fitness function;

[0086] Specifically, these 11 machine learning models are designed to use three optimization algorithms: IPSO improved particle swarm algorithm, GA genetic algorithm and SA annealing algorithm. By setting the fitness function, the algorithm continuously iterates and updates and calculates the fitness value of each round to achieve the optimal fitness value. At this time, the optimal model is found, the optimization algorithm stops and saves the optimal model (such as Figure 5 shown).

[0087] Step 203, load 11 machine learning models, predict the processed new well logging data respectively, and save the prediction results of each model and various error evaluation information. In this step, the above-mentioned 7 regression models (LSTM, IPSO-LSTM, IPSO-ARIMA, GA-LSTM, GA-ARIMA, SA-LSTM, SA-ARIMA) and 4 classification models (BP neural network, IPSO-BP, GA-BP, SA-BP), a total of 11 trained machine learning models are used to predict the processed new well logging data. Among them, the new well logging data undergoes data preprocessing operations in four steps in step 201: data cleaning, PCA attribute dimension reduction, data set partitioning and normalization, and SMOTE unbalanced data processing.

[0088] Step 204, model evaluation and fusion. In this step, the prediction results and error evaluation data of the above-mentioned 7 regression models (LSTM, IPSO-LSTM, IPSO-ARIMA, GA-LSTM, GA-ARIMA, SA-LSTM, SA-ARIMA) and 4 classification models (BP neural network, IPSO-BP, GA-BP, SA-BP), a total of 11 machine learning models, are evaluated, and the prediction results that are reliable are screened and comprehensively referenced by the error evaluation value to form the optimal fusion model.

[0089] Specifically, the above regression models LSTM, IPSO-LSTM, GA-LATM, SA-LSTM, IPSO-ARIMA, GA-ARIMA, and SA-ARIMA calculate the four error evaluation values ​​of MAPE, MAE, RMSE, and R-squared between the predicted values ​​and the true values ​​of these seven models respectively.

[0090] Specifically, the above classification models BP, IPSO-BP, GA-BP, and SA-BP respectively calculate the four error evaluation values ​​of accuracy, recall, F1 Score, and precision between the predicted values ​​and the true values ​​of these four models.

[0091] The evaluation of regression models mainly considers the evaluation value of mean absolute error (MAE). The mean absolute error (MAE) focuses on the absolute error between the predicted result and the true result, and is used to represent the prediction effect of the model. The calculation formula is as follows: y represents the true value of the sample data. Represents the predicted value of sample data:

[0092]

[0093] The evaluation of classification models mainly considers the F1 Score value, which is an indicator used in statistics to measure binary classification models. It takes into account both the accuracy and recall of the classification model. It is the harmonic average of the precision and recall, and is used to comprehensively consider the accuracy and completeness of the model prediction. The calculation process of the F1 Score value is as follows:

[0094] First, define the following confusion matrix, where TP (True Positive) represents the number of true positive examples, that is, the number of samples that are actually positive examples and the model predicts are also positive examples; FP (False Positive) represents the number of false positive examples, that is, the number of samples that are actually negative examples and the model predicts are positive examples; FN (False Negative) represents the number of false negative examples, that is, the number of samples that are actually positive examples and the model predicts are negative examples; TN (True Negative) represents the number of true negative examples, that is, the number of samples that are actually negative examples and the model predicts are also negative examples:

[0095]

[0096] Then calculate the precision:

[0097]

[0098] Then calculate the recall:

[0099]

[0100] Finally, the F1 Score value can be calculated:

[0101]

[0102] Step 205, take the overflow key feature column of the logging data of the well to be predicted and perform data cleaning, then load the optimal fusion model to predict the processed logging data of the well to be predicted. In this step, the overflow key feature column of the logging data of the well to be predicted after data cleaning is predicted using the above optimal fusion model.

[0103] Step 206: Visualize the prediction results of the optimal fusion model and give AI suggestions based on the current logging information. In this step, the visualization content includes curves showing the past and future values ​​of the overflow key feature column and the probability of overflow, the current probability value of overflow, and the numerical curve of the overflow probability in the future time period, such as Figure 7 (C) shown.

[0104] Figure 3The flowchart of the data preprocessing steps in the embodiment of the present invention is shown. It should be mentioned here that the present invention requires data cleaning, PCA attribute dimension reduction, data set division and normalization, and SMOTE unbalanced data processing for the original logging data, a total of four data preprocessing steps, while the new well logging data and the well logging data to be predicted only require data cleaning, data set division and normalization, and overflow key feature column extraction operations. Specifically, Figure 3 The steps include:

[0105] Step 301, data cleaning. This step is to solve the data quality problem. In the actual logging data obtained, there are usually some data problems that are inevitable, such as missing data and invalid filling data of -9999 or 0. For such problems, if a small amount of data is missing, the mean filling method is used, that is, the average value of the five points before and after the time series is taken to fill. If a large block of data is missing, this part of the data is directly deleted.

[0106] Step 302, PCA attribute dimension reduction, extracting the key feature column data of overflow. This step is to select the most critical features that cause overflow in the logging data. It is also an important means to compress data dimensions and improve training efficiency. This step mainly performs the following tasks:

[0107] (1) Principal component analysis: Principal component analysis uses the idea of ​​"dimensionality reduction" to transform multiple features into a few comprehensive indicators (principal components). Each principal component is a linear combination of the original data, which is independent of each other and retains most of the information of the original data. The essence of principal component analysis is to seek comprehensive alternative objects through the correlation of the original data, and to ensure that the information loss in the transformation process is minimized. The covariance matrix R is calculated based on the standardized data set:

[0108]

[0109] Calculate the eigenvalues ​​of the matrix R λ1≥λ2≥…≥λ n ≥0 and the corresponding eigenvectors u1,u2,…,u n , where u j =(u 1j ,u 2j ,…,u nj ),u nj Represents the nth component of the jth eigenvector; n new indicator variables are composed of eigenvectors:

[0110]

[0111] In the formula, y1 is the first principal component, y2 is the second principal component, ..., y n is the nth principal component. Calculate each principal component y j Contribution ratebj (j=1,2,...,n) and y1,y2,…,y n The cumulative contribution rate α of (p≤n) p .

[0112]

[0113] (2) Overflow feature screening: based on the causes of overflow and the correlation between feature parameters, the key feature parameters used to predict overflow are screened. Multiple indicators with certain correlation are linearly combined, and the dimension reduction is performed with the goal of explaining as much information as possible in the original data with the least dimension. After the dimension reduction, the variables are linearly independent of each other. The new variables finally determined are the linear combination of the original variables. The proportion of the principal component in the variance is smaller, and the ability to integrate the original information is weaker. The scree plot results of the analysis are as follows: Figure 3 As shown in (A), when the broken line suddenly changes from steep to smooth, the number of factors corresponding to the transition from steep to smooth is the number of reference extracted factors.

[0114] Step 303, data set division and normalization. This step is to avoid the problem of overfitting in the model training results. In this step, the original logging data will be divided into a training set, a validation set, and a test set. The logging data of new wells and the logging data of wells to be predicted will not be subjected to this step. Specifically, the division ratios of the training set, the validation set, and the test set are 70%, 30%, and 30%, respectively. The validation set is used to verify the model training effect, and the test set is used to test the prediction effect of the trained model on the divided new data. Among them, normalization is to solve the problem of inconsistent dimensions between data. For example, both feature 1 and feature 2 measure air pressure, but the sample data value of feature 1 is Pa, while the sample data value of feature 2 is MPa. If dimensionless processing is not performed, the impact of feature 2 on the model is obviously greater than the impact of feature 1 on the model. The present invention uses the min-max method for normalization processing, which linearly scales the original data, and maps the data in the range of [0, 1] with the maximum and minimum values ​​in the data as the range. The formula is as follows:

[0115]

[0116] Step 304, SMOTE unbalanced data processing. This step is to solve the problem of severe data imbalance. Since overflow rarely occurs in actual production, the ratio of non-overflow data to overflow data in logging data can reach more than 1:10, which means severe data imbalance. Unbalanced data will cause the training results of the overflow prediction model to be biased towards the category with larger data volume (no overflow). Specifically, the following work is performed to keep the data composition of the two relatively balanced:

[0117] a) The SMOTE unbalanced data processing method based on oversampling is used in the training set, and the original proportions of the test set and the validation set are retained unchanged;

[0118] b) Mark the overflow section data according to the drilling daily report, such as Figure 3 (B) shows that the "tag" column is the overflow tag column.

[0119] Among them, 0 means "no overflow occurred" and 1 means "overflow occurred".

[0120] Figure 4 The flowchart of an IPSO improved particle swarm algorithm according to an embodiment of the present invention is shown, which specifically includes the following steps:

[0121] Step 401, initialize the properties of particles in the IPSO improved particle swarm algorithm and limit the range of particle activity. In this step, define the properties of the particles and initialize them, and specify the range of variation of each property to prevent particles from crossing the boundary during the global optimization process. Specifically, the properties of the particles include the number of particles, the maximum number of iterations of the improved particle swarm algorithm, the c1 and c2 values ​​of the velocity update formula, the inertia weight w, the initial velocity of all particles, the global optimal fitness, and the optimal fitness of the particles themselves. The upper and lower bounds of the value range of each of the 8 properties, the opening and closing of the interval, and the numerical type are limited. Among them, the numerical types are integer type int, floating point type float, string type str, and array type list. Among them, the interval opening and closing are controlled by 0 and 1, 0 represents "open interval" and 1 represents "closed interval".

[0122] Step 402, each particle moves based on the displacement formula and the improved speed update formula, and updates the optimal fitness value of the individual particles and the group in each iteration. In this step, each particle continuously updates the particle's speed and position according to the above displacement formula and the improved speed formula before reaching the maximum number of iterations, and calculates and updates the particle's fitness value in each iteration. The fitness value is the result value returned by the above machine learning model after the above machine learning model is trained using the current particle's attribute values. Among them, the result value returned by the classification prediction machine learning model is its F1 Score value, and the result value returned by the regression prediction machine learning model is its mean absolute error MAE value.

[0123] Step 403, when the particle reaches the specified error value or the maximum number of iterations, it stops moving and exits the IPSO improved particle swarm algorithm. In this step, the improved particle swarm algorithm calculates the current error value in each cycle, and determines whether it has reached the specified error value or the current number of iterations has reached the maximum number of iterations. If it has reached it, it exits the cycle. Among them, the current error value is the above-mentioned F1 Score value or the mean absolute error MAE value calculated in each round.

[0124] Step 404: The particle finds the optimal result and ends the movement. In this step, the improved particle swarm algorithm reaches the maximum number of iterations, returns the best fitness value of the particle during all rounds of iterations, ends the movement, and exits the cyclic iteration process of the improved particle swarm algorithm.

[0125] Figure 5 The flowchart of combining various optimization algorithms with various machine learning models in an embodiment of the present invention is shown, which specifically includes the following steps:

[0126] Step 501, initialize each optimization algorithm, and design fitness functions for BP neural network model, LSTM long short-term memory network model and ARIMA time series model respectively. In this step, first initialize each optimization algorithm, and the three optimization algorithms optimize the same hyperparameters for each machine learning model, and set the same fitness function. Among them, the hyperparameters that need to be optimized for the BP neural network model are the number of hidden layers, the number of neurons in each layer, the initial weight value W and threshold b of each layer of neurons, the epoch value of each round of iterative training of the neural network, and the batchSize size of the number of samples used by the neural network to update the weight parameters each time; the hyperparameters that need to be optimized for the LSTM long short-term memory network model are the number of LSTM layers, the number of neurons in the LSTM layer, the number of Dense fully connected layers, the number of neurons in the Dense layer, the epoch value of each round of iterative training of the LSTM long short-term memory network, and the batchSize size of the number of samples used by the neural network to update the weight parameters each time; the hyperparameters that need to be optimized for the ARIMA time series network model are the autoregressive (AR) order, the number of differences (Difference) and the order of the moving average (MA).

[0127] Step 502: Based on the designed fitness function, use various optimization algorithms to optimize the hyperparameters of the above three models and save the optimal model. In this step, the IPSO improved particle swarm algorithm, GA genetic algorithm and SA annealing algorithm are used to optimize the above three machine learning models. Among them, the partial optimization process of the IPSO improved particle swarm algorithm for the LSTM long short-term memory network is recorded as follows: Figure 5 (A) Figure 5 As shown in (B), the comparison of the prediction effects of the LSTM long short-term memory network and the ARIMA time series network model after a round of optimization is shown in Figure 5 (C) shown. Among them, Figure 5 (A) To set the hyperparameters (activation function, memory window length of LSTM long short-term memory network model) of some quantitative LSTM network models, the IPSO improved particle swarm algorithm is used to optimize them, and the optimization results (RMSE error calculation results of training set, test set and validation set and the best hyperparameter values ​​found) are recorded. Figure 5 (B) Figure 5 (A) Two groups of code output results in the console. Figure 5 (C) It can be clearly seen that in this round of optimization, the prediction curve of the LSTM long short-term memory network model is closer to the real data than the ARIMA time series network model in areas with large fluctuations.

[0128] Figure 6 The flowchart of a model evaluation and fusion process according to an embodiment of the present invention is shown, which specifically includes the following steps:

[0129] Step 601, respectively calculate the MAPE, MAE, RMSE, R-squared of the 7 regression models and the accuracy, recall, precision, F1 Score of the 4 classification models, as well as the prediction results of a total of 11 machine learning models. In this step, the above 4 error evaluation values ​​are calculated and saved, and RMSE, R-squared and F1 Score are selected as representative error evaluation values ​​for evaluating regression models and classification models, as the basis for model evaluation and fusion.

[0130] Step 602: sort the seven regression models in ascending order according to the RMSE calculation results, and then sort them in descending order according to the R-squared calculation results. Take the prediction results of the top three models and take the average of these three models row by row and feature by feature column as the output regression prediction results. The calculation formula of R-squared is as follows:

[0131]

[0132] Among them, TSS represents the degree of change of y, which is proportional to the variance, and its calculation formula is:

[0133]

[0134] Among them, RSS represents the residual between the model and the true value, and its calculation formula is:

[0135]

[0136] Among them, ESS represents the model's prediction of the change of y, and its calculation formula is:

[0137]

[0138] Step 603, sort the four classification models in descending order according to the F1 Score value, and take the overflow binary classification prediction results and predicted overflow probability of the top three prediction models. The overflow binary classification prediction result is 0 or 1, 0 means "overflow is not predicted to occur", and 1 means "overflow is predicted to occur".

[0139] Step 604, the majority of the binary classification prediction results is the final prediction result of whether overflow occurs, and the mean of the overflow probability is taken as the final overflow prediction probability value. In this step, since the above-mentioned regression and classification models both select an odd number of results as references, there will definitely be a situation where the binary classification results account for the majority, and this situation is taken as the prediction result of the final model. Among them, since the overflow probability for a period of time in the future is continuously predicted, the average of the predicted overflow probability values ​​of the three models IPSO-BP, GA-BP and SA-BP at each time point is taken as the overflow prediction probability at this moment and the overflow prediction probability value for the future time period output by the model.

[0140] Figure 7 The figure shows the operation flow chart of the downhole overflow risk probability prediction system in a specific embodiment of the present invention. The specific steps include:

[0141] Step 701, input database connection information to import or select local file to import logging data, preview the imported logging data, the operation interface is as follows Figure 7 As shown in (A), the original logging data is imported by filling in the database connection or uploading the local file.

[0142] Step 702: After locating the overflow key features based on the PCA attribute dimensionality reduction results, click the "Import Data" button to import the overflow key feature column data into the optimal fusion model and perform prediction. In this step, different PCA attribute dimensionality reduction results may be obtained due to different geographical locations or different data quality of logging data, and the names of data columns in the logging data of each well site may also be different. Therefore, it is necessary to manually select the column where the key parameters are located based on the overflow key feature column analyzed by the PCA attribute dimensionality reduction of the original logging data. The operation interface is as follows: Figure 7 (B) shown.

[0143] Step 703: Visually display the regression prediction results of the well logging data to be predicted and the AI ​​suggestions based on the current logging data. Click the "Predict Future Overflow Probability" button to display the overflow probability curve for the future time period. The operation interface is as follows: Figure 7 (C) shown.

[0144] Specific embodiments are used in this article to illustrate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the methods and core ideas of this article. At the same time, for general technicians in this field, according to the ideas of this article, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on this article.

Claims

1. A training and prediction method for an intelligent prediction model for drilling overflow conditions, characterized in that: include: Data preprocessing step, training machine learning swarm intelligence model step, obtaining the optimal fusion model step, optimal fusion model prediction and visualization step, among which: Data preprocessing steps: collect three groups of data, including original logging data, new well logging data and well logging data to be predicted, and perform data cleaning, PCA attribute dimension reduction, data set division and normalization and SMOTE unbalanced data processing operations on the original logging data in turn; perform data cleaning, data set division and normalization and overflow key feature column extraction operations on the new well logging data and well logging data to be predicted; among them, the original logging data and the new well logging data are different well data of adjacent wells; The step of training the machine learning swarm intelligence model is as follows: based on the original logging data that has undergone the data preprocessing step, the data are used to train the long short-term memory network model IPSO-LSTM optimized by the improved particle swarm algorithm and the BP neural network model IPSO-BP optimized by the improved particle swarm algorithm. At the same time, similar algorithms of the improved particle swarm algorithm: genetic algorithm GA, annealing algorithm SA, and similar algorithm ARIMA time series model of the long short-term memory network LSTM are set as comparative references to form another seven models, namely, the long short-term memory network model GA-LSTM optimized by the genetic algorithm, the ARIMA time series model GA-ARIMA optimized by the genetic algorithm, the BP neural network model GA-BP optimized by the genetic algorithm, the long short-term memory network model SA-LSTM optimized by the annealing algorithm, the BP neural network model SA-BP optimized by the annealing algorithm, the ARIMA time series model SA-ARIMA optimized by the annealing algorithm, the ARIMA time series model IPSO-ARIMA optimized by the improved particle swarm algorithm, and two BP neural network models and LSTM long short-term memory network models that do not use optimization algorithms as references, a total of 11 models; Steps for obtaining the optimal fusion model: Based on the new well logging data that has undergone three steps of data cleaning, data set division and normalization, and overflow key feature column extraction, the 11 models are used to predict the data respectively, and the prediction results of the 11 models and 8 error evaluation values ​​are compared: MAPE, MAE, RMSE, R-squared, accuracy, recall rate, F1 Score and precision. The optimal models of the regression and classification stages are selected and combined into the optimal fusion model; Optimal fusion model prediction and visualization steps: Based on the optimal fusion model and the logging data of the well to be predicted that has undergone three operations of data cleaning, data set division and normalization, and overflow key feature column extraction, the optimal fusion model is used to perform two-step prediction on the logging data of the well to be predicted: first, a regression model is used for advance prediction, and then a classification model is used for overflow prediction, to obtain the final overflow prediction result, and the prediction result is visualized in the underground overflow risk probability prediction system; The data preprocessing step specifically includes: firstly, the logging data collected five days before and after the overflow are subjected to three data cleaning processes, namely, filling missing values, smoothing noise data, identifying and deleting outliers and invalid data, to standardize the logging data; then, the d-dimensional original logging data is subjected to PCA data dimensionality reduction processing: the original logging data is organized into a d-dimensional matrix X with n rows by columns, each row of X is subtracted from the mean of the row, the covariance matrix of X, and the eigenvalues ​​and corresponding eigenvectors of the covariance matrix are obtained, and then the eigenvectors are arranged by rows from top to bottom according to the corresponding eigenvalues, and the first m rows are taken to form a matrix P, and Y=PX is the data reduced to m dimensions, which is used as the important feature of the overflow after the PCA data dimensionality reduction method is used; The step of training the machine learning swarm intelligent model specifically includes: based on the pre-processed original logging data, 11 models are trained respectively, which can be divided into regression stage according to the different process stages to which each model belongs: LSTM reference regression model, IPSO-LSTM optimization regression model, GA-LSTM optimization regression model, SA-LSTM optimization regression model, IPSO-ARIMA optimization regression model, GA-ARIMA optimization regression model, SA-ARIMA optimization regression model, and classification stage: BP reference classification model, IPSO-BP optimization classification model, GA-BP optimization classification model, SA-BP optimization classification model, that is, using three optimization algorithms of IPSO, GA, and SA and two regression models LSTM, ARIMA and one classification model BP neural network to form 9 optimization models, and then adding unoptimized BP neural network classification model and LSTM regression model; In the step of obtaining the optimal fusion model, the 11 models are used to predict the new well logging data after data cleaning and taking the overflow key feature column, and the error values ​​are calculated respectively: 1) For the regression models LSTM, IPSO-LSTM, GA-LATM, SA-LSTM, IPSO-ARIMA, GA-ARIMA, and SA-ARIMA, calculate the four error evaluation values ​​of MAPE, MAE, RMSE, and R-squared between the predicted values ​​and the true values ​​of these seven models respectively; 2) For the classification models BP, IPSO-BP, GA-BP, and SA-BP, the four error evaluation values ​​of accuracy, recall, F1 Score, and precision between the predicted values ​​and the true values ​​of these four models are calculated respectively; Based on the prediction results and error evaluation values ​​of the statistical regression and classification models, the optimal models of the regression and classification are selected respectively, and the optimal fusion model is formed according to the rule that the regression model is in the front and the classification model is in the back, and the input data of the classification model is the prediction result data of the regression model; In the optimal fusion model prediction and visualization step: the optimal fusion model is used to predict the logging data of the well to be predicted after data cleaning and taking the overflow key feature column: the overflow key feature column data is first sent to the regression model in the optimal fusion model to predict the specific value of the specified time step, and then the data predicted by the regression model output is sent to the classification model in the optimal fusion model, and the probability of overflow in the future time period is classified and predicted according to the overflow key feature column data in the future time period predicted by the regression model, and the model prediction results are displayed in the underground overflow risk probability prediction system.

2. The training and prediction method of the drilling overflow condition intelligent prediction model according to claim 1 is characterized by: In the improved particle swarm algorithm IPSO, the following optimizations are used based on the PSO particle swarm algorithm: 1) Compared with the fixed value C1=C2=2, the nonlinear update of the particle individual learning factor C1 and the group learning factor C2 is realized: C1 is large and C2 is small in the early stage of particle iteration to ensure particle independence; C1 is small and C2 is large in the later stage to converge to the global optimal position as soon as possible; 2) Improve inertia weight: The inertia weight w is updated nonlinearly using the following formula. After comparing with linear decrease, random inertia decrease, and multiple nonlinear decreases, this update method has the best improvement effect: ; 3) Set two random search coefficients r1 and r2 to prevent particles from falling into the local optimal solution.

3. The training and prediction method of the drilling overflow condition intelligent prediction model according to claim 1 is characterized by: The combination of three optimization algorithms, IPSO, GA, and SA, with classification and regression models is as follows: 1) The F1 Score of the classification model and the mean absolute error MAE of the regression model are used as the fitness values ​​of the above three optimization algorithms to design the fitness functions of the three optimization algorithms. The global iterative optimization is performed to find the maximum F1 Score value of the classification model and the minimum mean absolute error value of the regression model, and finally the optimal solution is obtained; 2) The six hyperparameters that affect the performance of the BP neural network, namely, the number of hidden layers of the BP neural network, the number of neurons in each layer, the initial weight value W and threshold b of each layer of neurons, the number of epochs of each round of iterative training of the neural network, and the batchSize size of the samples used by the neural network to update the weight parameters each time, are used as the optimization algorithm's optimization objectives; 3) The six hyperparameters that affect the prediction effect of the LSTM long short-term memory network, namely, the number of LSTM layers, the number of neurons in the LSTM layer, the number of Dense fully connected layers, the number of neurons in the Dense layer, the number of epochs for each round of iterative training of the LSTM long short-term memory network, and the batchSize size of the number of samples used by the neural network to update the weight parameters each time, are used as the optimization objectives of the optimization algorithm; 4) The three hyperparameters that affect the prediction effect of the ARIMA time series network, namely the autoregressive order, the number of differences and the order of the moving average, are used as the optimization objectives of the optimization algorithm; 5) The IPSO improved particle swarm algorithm will exit this round of optimization when the specified error is reached during each round of iterative optimization. Otherwise, the optimization will be stopped when the set maximum number of iterations is reached. For the GA and SA optimization algorithms, when the change in the loss function is less than 0.0001 for 10 consecutive rounds, it will be assumed that the current round has converged and the current round of optimization will be exited. The above settings can improve the efficiency of model training.

4. The training and prediction method of the intelligent prediction model for drilling overflow conditions according to claim 1 is characterized in that: The prediction results of the regression model and the fusion model are visualized in the downhole overflow risk probability prediction system: the prediction results of the regression model and the prediction results of the optimal fusion model are displayed in the form of a line graph on the prediction page of the downhole overflow risk probability prediction system, and the overflow probability at the current moment and the AI ​​suggestions for the drilling situation at this moment are also displayed.

5. The training and prediction method of the intelligent prediction model for drilling overflow conditions according to claim 1 is characterized in that: The logging data of new wells and wells to be predicted are cleaned, the data sets are divided and normalized, and the overflow key feature columns are obtained in three steps: 1) The overflow key feature columns of the new well logging data and the well logging data to be predicted are the overflow key feature columns selected after the original logging data is reduced by PCA attributes; 2) Different data sets were used in the training and prediction verification of the 11 models. Original logging data was used in the training phase of the 11 models, and new well logging data was used in the prediction and verification of model capabilities. The purpose of this design is to avoid overfitting of the model and improve the credibility of the model.

Citation Information

Cited By

  • Well mouth overflow risk prediction system and method

    CN120387592A