Well leakage prediction method, system and equipment, storage medium and program product

By improving the fruit fly optimized SVM algorithm and combining it with chaotic mapping and reverse learning strategies, a well leakage prediction model was established. This solved the problems of accuracy and efficiency in well leakage prediction during drilling, achieving higher prediction accuracy and stability, and reducing safety risks.

CN121637201APending Publication Date: 2026-03-10CHINA NAT PETROLEUM CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies have low accuracy and efficiency in predicting well leakage during drilling, especially in complex geological environments where accidents occur frequently, leading to resource waste and increased safety risks.

Method used

An improved fruit fly optimized support vector machine (SVM) algorithm based on chaotic mapping and anti-learning strategy is adopted. By processing well logging data and selecting features, a well leakage accident prediction model is established. The model parameters are optimized using the training set to achieve accurate prediction of well leakage accidents.

Benefits of technology

It improves the accuracy and efficiency of well leakage prediction, reduces the need for manual intervention, enhances model stability and computation speed, adapts to complex nonlinear data, and reduces prediction errors and resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121637201A_ABST
    Figure CN121637201A_ABST
Patent Text Reader

Abstract

The invention discloses a well leakage prediction method, system and device, a storage medium and a program product, and the method comprises the steps: carrying out the data processing of collected logging data, generating a data set, and dividing the data set into a training set and a test set; improving and optimizing the fruit fly optimization SVM algorithm by using chaotic mapping and an anti-learning strategy; establishing a well leakage accident prediction model based on the improved fruit fly optimization SVM algorithm, and training and optimizing the well leakage accident prediction model by using the training set; and predicting the well leakage accident by using the trained and optimized well leakage accident prediction model. According to the invention, the prediction accuracy and prediction efficiency of the drilling accident are 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 in particular to a well leakage prediction method system, equipment, storage medium and program product. Background Technology

[0002] Due to complex geological environments and technical factors, the drilling process involves significant uncertainties. These uncertainties often increase the risk of accidents during drilling, especially when dealing with complex formations or developing new wells, where the frequency of accidents is even higher.

[0003] The causes of drilling accidents are often complex, making investigation difficult. Handling drilling accidents typically requires significant time and resources, including human, material, and financial resources; this not only wastes resources and causes substantial economic losses for companies, but more seriously, drilling accidents can threaten the lives of drilling personnel.

[0004] To reduce accident risks and improve drilling safety, the petroleum industry has adopted intelligent prediction methods to predict drilling accidents in recent years. However, some problems still exist, such as insufficient drilling accident datasets, excessively high dataset dimensionality, and poor accuracy and stability of prediction algorithms. Support Vector Machine (SVM) has many advantages in well leakage prediction. It is a powerful machine learning algorithm, particularly suitable for classification and regression tasks.

[0005] Therefore, there is an urgent need for a drilling accident prediction method based on the SVM algorithm to improve the prediction accuracy and efficiency of drilling accidents. Summary of the Invention

[0006] The purpose of this invention is to provide a method and system for predicting well leakage, so as to improve the accuracy and efficiency of drilling accident prediction.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] In a first aspect, embodiments of the present invention provide a well leakage prediction method, comprising:

[0009] The collected well logging data is processed to generate a dataset, which is then divided into a training set and a test set.

[0010] An improved and optimized SVM algorithm for fruit flies was developed using chaotic mapping and anti-learning strategies.

[0011] A well leakage accident prediction model is established based on the improved fruit fly optimized SVM algorithm, and the well leakage accident prediction model is trained and optimized using the training set.

[0012] Well leakage accidents can be predicted using a trained and optimized well leakage accident prediction model.

[0013] Furthermore, the collected well logging data is processed to generate a dataset, which is then divided into a training set and a test set, including:

[0014] Collect logging data and perform data preprocessing on the logging data to obtain the processed logging data;

[0015] Principal component analysis was used to select features from the processed logging data to obtain multiple principal component features related to well leakage events, thereby eliminating multicollinearity of the data.

[0016] The logging data after principal component analysis are used to form a dataset, which is then divided into a training set and a test set.

[0017] Furthermore, the fruit fly optimized SVM algorithm includes:

[0018] Step a: Randomly initialize the position of the fruit fly population: InitX_axis, InitY_axis; where X_axis and Y_axis represent the X-axis and Y-axis positions of the fruit fly population;

[0019] Step b: Define the random direction and distance by which individual fruit flies use their sense of smell to search for food, i.e., define the position (X) of the individual fruit fly. i Y i )for:

[0020] X i =X _axis +Random Value

[0021] Y i =Y _axis +Random Value

[0022] In the formula, X i This represents the X-coordinate of the i-th fruit fly on the X-axis, and Y... i This represents the Y-coordinate of the i-th fruit fly, and RandomValue represents the foraging distance of the fruit fly.

[0023] Step c: Estimate the location of individual fruit flies (X) i Y i Dist between the origin and the point i And based on the distance Dist i Calculate the taste concentration judgment value S i ;

[0024] Among them, distance Flavor concentration judgment value

[0025] Step d: Determine the flavor concentration value S i Substituting the values ​​into the flavor concentration determination function, we obtain the flavor concentration (Smell) at the location of each fruit fly. i Smell i =Function(S i );

[0026] Step e: Based on the taste concentration at each individual fruit fly location, select the fruit fly individual with the highest taste concentration in the fruit fly population; that is, [bestSmell bestIndex] = max(Smell);

[0027] Step f: Retain the highest flavor concentration value, bestSmell, and its corresponding X and Y coordinates. At this point, the fruit fly swarm will fly to this location to forage.

[0028] Smellbest = bestSmell

[0029] X _axis =X(bestIndex),

[0030] Y _axis =Y(bestIndex),

[0031] In the formula, Smellbest represents the highest flavor concentration value retained, X (bestIndex) represents the X-axis coordinate corresponding to the highest flavor concentration value, and Y (bestIndex) represents the Y-axis coordinate corresponding to the highest flavor concentration value.

[0032] Step g: Enter iterative optimization, repeat steps b to e, and determine whether the current flavor concentration is better than the flavor concentration of the previous iteration. If so, proceed to step f.

[0033] Furthermore, in the initialization phase of the fruit fly population, the fruit fly optimized SVM algorithm is improved and optimized using chaotic mapping and anti-learning strategies, including:

[0034] By introducing a logistic mapping to obtain the mapping relationship between chaotic variables and the number of iterations of the SVM algorithm, the positions of fruit flies are evenly distributed in the solution space. This is then substituted into the objective function of the fruit fly optimization SVM algorithm, and the optimal solution of the objective function is selected as the initial population position of the fruit flies.

[0035] In the initial stage of the fruit fly population, an elite reverse learning strategy is introduced. The optimal solution information found during the search process is used to update the individuals in the population, thereby reducing the homogeneity of the population and increasing the probability of high-quality solutions.

[0036] Furthermore, the mapping relationship between chaotic variables and the number of iterations of the SVM algorithm, i.e., the iterative formula of the improved fruit fly-optimized SVM algorithm, is as follows:

[0037] Cx(k+1) i =uCx(k) i (1-Cx(k) i ),

[0038] In the formula, Cx i Let x(k+1) represent a chaotic variable, and C represent an arbitrary random constant. i This represents the i-th X-axis coordinate value at the (k+1)-th iteration; k represents the current iteration number, and u represents the control parameter.

[0039] Wherein, if the variables of the problem satisfy Then x is obtained through the inverse mapping of the chaotic variables in the following formula. i :

[0040]

[0041]

[0042] In the formula, x i σ represents the i-th X-axis coordinate value in each iteration, i.e., the i-th feasible solution in each iteration; i and They represent the variables x respectively i The lower and upper limits of the value range.

[0043] Furthermore, an elite-backward learning strategy is introduced at the initial position stage of the fruit fly population. This strategy updates the population with information from the optimal solution found during the search process, including:

[0044] Suppose that a feasible solution X exists in the d-dimensional search space. i =(x 1 x 2 , ..., x d If X is a valid solution, then X is a feasible solution. i The inverse solution is Where, x d Let represent an individual feasible solution in the d-dimensional search space. This represents an individual reverse solution in a d-dimensional search space, where the superscript d indicates the total dimension of the search space, and j = 1, 2, ..., d;

[0045] Based on variable x i Obtain the minimum dynamic boundary lb of the j-dimensional search space. j and maximum dynamic boundary ub j ;in, This represents the i-th feasible solution in each iteration of the j-dimensional search space;

[0046] According to the minimum dynamic boundary lbj and the maximum dynamic boundary ub j The formula for obtaining the individual reverse solution is:

[0047]

[0048] In the formula, Let x represent the individual backward solution in the j-dimensional search space. j This represents an individual feasible solution in a j-dimensional search space, where the superscript j indicates the dimension of the search space, j = 1, 2, ..., d; j ∈[lb j ub j Assume the elite individual solution is The reverse solution for elite individuals is: The formula for the reverse solution of elite individuals is:

[0049]

[0050] In the formula, This represents the inverse solution for elite individuals in the j-dimensional search space. Denotes the elite individual solutions in the j-dimensional search space. δ is a random number on [0, 1].

[0051] Secondly, embodiments of the present invention provide a well leakage prediction system, comprising:

[0052] The preprocessing unit is used to process the acquired well logging data to generate a dataset, which is then divided into a training set and a test set.

[0053] An improved unit is used to improve and optimize the Drosophila-optimized SVM algorithm by utilizing chaotic mapping and anti-learning strategies;

[0054] The training unit is used to establish a well leakage accident prediction model based on the improved fruit fly optimized SVM algorithm, and to train and optimize the well leakage accident prediction model using the training set.

[0055] The prediction unit is used to predict well leakage accidents using a trained and optimized well leakage accident prediction model.

[0056] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program or instructions to implement the steps of the aforementioned well leakage prediction method.

[0057] Fourthly, embodiments of the present invention also provide a computer storage medium storing a computer program or instructions, which, when executed by a processor, implement the steps of the aforementioned well leakage prediction method.

[0058] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps of the aforementioned well leakage prediction method.

[0059] The technical effects and advantages of this invention are as follows: 1. This invention improves the fruit fly optimized SVM algorithm by combining the characteristics of chaotic search and reverse learning. It can explore the search space more fully during the search process, thereby enhancing the global search capability and helping to find better SVM model parameters to improve the prediction accuracy of well leakage accident prediction models, reduce prediction errors, and ensure accurate prediction of well leakage events. At the same time, it optimizes the automation characteristics of the fruit fly optimized SVM algorithm, reduces the need for manual intervention, lowers labor costs, and improves prediction efficiency. Furthermore, the improved fruit fly optimized SVM algorithm has a faster computing speed, enabling it to quickly process large amounts of data and achieve the ability to quickly predict well leakage accidents.

[0060] 2. Since well leakage prediction involves complex nonlinear data relationships, the fruit fly algorithm based on chaotic back learning provided in this invention can better handle these complex data, and can improve the fitting ability and prediction accuracy of the well leakage accident prediction model. This invention improves the fruit fly algorithm through chaotic back learning to obtain more stable results through multiple searches, reduces the volatility of the well leakage accident prediction model on different datasets, and increases the prediction stability of the well leakage accident prediction model.

[0061] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0063] Figure 1 This is a flowchart of a well leakage prediction method according to an embodiment of the present invention;

[0064] Figure 2 This is a flowchart of the fruit fly optimization algorithm in an embodiment of the present invention;

[0065] Figure 3 This is a schematic diagram of the structure of a well leakage prediction system according to an embodiment of the present invention;

[0066] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention;

[0067] Figure 5 This is a schematic diagram of the fitness curve for finding the optimal parameters in an embodiment of the present invention.

[0068] Figure 6 This is a comparison chart of the prediction results of the three algorithms in this embodiment of the invention;

[0069] Figure 7 This is a schematic diagram of the evaluation index results of the IFOA-SVM algorithm in an embodiment of the present invention;

[0070] Figure 8 This is a heatmap of the confusion matrix on the test dataset in this embodiment of the invention;

[0071] Figure 9 This is a schematic diagram of the ROC curve of the well leakage accident prediction model in an embodiment of the present invention. Detailed Implementation

[0072] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0073] In practical applications, it is necessary to select appropriate features and kernel functions and optimize parameters according to the specific problem in order to give full play to the advantages of SVM and obtain accurate prediction results.

[0074] Since the prediction accuracy of SVM is greatly affected by the penalty factor C and the kernel parameter g, in order to improve the prediction accuracy and efficiency of drilling accidents, the Fruit Fly Optimization Algorithm (FOA) is used to automatically optimize the two parameters of SVM, and a well leakage accident prediction model based on FOA optimization of SVM penalty factor C and kernel parameter g is established.

[0075] To address the shortcomings of existing technologies, this invention discloses a well leakage prediction method, such as... Figure 1 As shown, it includes the following steps:

[0076] Step S1: Process the collected well logging data to generate a dataset, and divide it into a training set and a test set;

[0077] Step S2: Improve and optimize the fruit fly optimized SVM algorithm using chaotic mapping and anti-learning strategies;

[0078] Step S3: Establish a well leakage accident prediction model based on the improved fruit fly optimized SVM algorithm, and train and optimize the well leakage accident prediction model using the training set;

[0079] Step S4: Use the trained and optimized well leakage accident prediction model to predict well leakage accidents.

[0080] In some specific embodiments, step S1: The collected well logging data is processed to generate a dataset, which is then divided into a training set and a test set, including the following steps:

[0081] (1) Use logging tools or sensors to collect raw logging data. Due to the complex geological structure and the deviation of real-time logging data obtained by sensors, and the different original characteristics of logging data, the data show a large difference in value. Therefore, the logging data is preprocessed to obtain the processed logging data.

[0082] Data preprocessing includes data cleaning, output value processing, and normalization.

[0083] Data cleaning: Well logging data is cleaned and denoised using spline interpolation, moving average, and local linear regression methods.

[0084] Output value processing: Non-numerical data in the output value is processed to be numerical, for example: "0" is used to represent that no well leakage has occurred here, and "1" is used to represent that well leakage has occurred here;

[0085] Normalization: Eliminates the adverse effects caused by differences in order of magnitude and units in the analysis of combined multi-data features; the embodiments of the present invention use the standard maximum-minimum mapping transformation method to normalize the model;

[0086] The maximum-minimum mapping transformation method includes: first, determining the maximum and minimum values ​​in the combined features, and then linearly scaling the data in the features to the interval [0, 1] using the maximum and minimum values ​​as the range. The scaling formula is shown below:

[0087]

[0088] In the formula, x new x represents the normalized value of the original well logging data after scaling. old This represents the raw well logging data in the dataset, x. max and x min These represent the maximum and minimum values ​​in the feature, respectively.

[0089] (2) Principal component analysis is an analytical method that can effectively eliminate multicollinearity in data processing;

[0090] For example, in this embodiment of the invention, principal component analysis is used to select features from the processed logging data to obtain 15 principal component features related to well leakage events, so as to eliminate multicollinearity of the data and improve the prediction accuracy of the subsequent prediction model.

[0091] Principal component analysis (PCA) is based on the idea of ​​dimensionality reduction of data. It uses mathematical methods to transform the original indicators, replacing a large number of original indicators with as few composite indicators as possible while preserving the information of the original indicators to the greatest extent possible. The resulting composite indicators are the principal components of the original indicators, thus improving the performance of the prediction model. For example, the PCA results of this embodiment are shown in Table 1:

[0092] Table 1. Principal Component Analysis Results

[0093]

[0094] (3) The logging data after principal component analysis are combined into a dataset, and the dataset is divided into a training set and a test set according to a predetermined ratio (e.g., 7:3) for subsequent classification and prediction of well leakage accidents.

[0095] In some specific embodiments, such as Figure 2 As shown, the fruit fly optimization SVM algorithm in step S2 specifically includes the following steps:

[0096] Step a: Randomly initialize the fruit fly colony positions: InitX_axis, InitY_axis; where X_axis and Y_axis are... _ axis represents the X-axis and Y-axis positions of the fruit fly colony;

[0097] Step b: Define the random direction and distance by which individual fruit flies use their sense of smell to search for food, i.e., define the position (X) of the individual fruit fly. i Y i )for:

[0098] X i =X _axis +Random Value

[0099] Y i =Y _axis +Random Value

[0100] In the formula, X i This represents the X-coordinate of the i-th fruit fly on the X-axis, and Y... i This represents the Y-coordinate of the i-th fruit fly, and RandomValue represents the foraging distance of the fruit fly.

[0101] Step c: Since the location of the food is unknown, the location of the individual fruit fly (X) is estimated.i Y i Dist between the origin and the point i And based on the distance Dist i Calculate the taste concentration judgment value S i ;

[0102] Among them, distance Flavor concentration judgment value

[0103] Step d: Determine the flavor concentration value S i Substituting the values ​​into the flavor concentration determination function, we obtain the flavor concentration (Smell) at the location of each fruit fly. i Smell i =Function(S i );

[0104] Step e: Based on the taste concentration at each individual fruit fly location, select the fruit fly individual with the highest taste concentration in the fruit fly population; that is, [bestSmell bestIndex] = max(Smell);

[0105] Step f: Retain the highest flavor concentration value, bestSmell, and its corresponding X and Y coordinates. At this point, the fruit fly swarm will fly to this location to forage.

[0106] Smellbest = bestSmell

[0107] X axis =X(bestIndex),

[0108] Y axis =Y(bestIndex),

[0109] In the formula, Smellbest represents the highest flavor concentration value retained, X (bestIndex) represents the X-axis coordinate corresponding to the highest flavor concentration value, and Y (bestIndex) represents the Y-axis coordinate corresponding to the highest flavor concentration value.

[0110] Step g: Enter iterative optimization, repeat steps b to e, and determine whether the current flavor concentration is better than the flavor concentration of the previous iteration. If so, proceed to step f.

[0111] In some specific embodiments, the fruit fly optimization SVM algorithm suffers from drawbacks such as slow convergence speed and susceptibility to local optima during the search process. Therefore, this invention proposes a fruit fly algorithm based on chaotic reverse learning to address these shortcomings. Specifically, step 2 utilizes chaotic mapping and reverse learning strategies to improve and optimize the fruit fly optimization SVM algorithm, including:

[0112] (1) Chaos is a common nonlinear phenomenon, and chaotic variables have the characteristic of ergodicity;

[0113] Therefore, in the initialization stage of the fruit fly population, this embodiment of the invention introduces a logistic mapping to obtain the mapping relationship between chaotic variables and the number of iterations of the SVM algorithm, so that the positions of the fruit flies are evenly distributed in the solution space, and substitutes them into the objective function, selecting the optimal solution of the objective function as the initial population position of the fruit flies; this embodiment of the invention uses the logistic mapping method to improve the impact of random initial population on FOA performance.

[0114] The mapping relationship between chaotic variables and the number of SVM algorithm iterations, i.e., the iterative formula of the improved fruit fly optimized SVM algorithm, is as follows:

[0115] Cx(k+1) i =uCx(k) i (1-Cx(k) i ),

[0116] In the formula, Cx i Let x(k+1) represent a chaotic variable, and C represent an arbitrary random constant. i This represents the i-th X-axis coordinate value at the (k+1)-th iteration; k represents the current iteration number, and u represents the control parameter.

[0117] Wherein, if the desired problem variable (i.e., the solution for the fruit fly position) satisfies x can be obtained by the inverse mapping of the chaotic variables in the following formula. i :

[0118]

[0119]

[0120] In the formula, x i σ represents the i-th X-axis coordinate value in each iteration, i.e., the i-th feasible solution in each iteration; i and They represent the variables x respectively i The lower and upper limits of the value range.

[0121] (2) An elite reverse learning strategy is introduced at the initial position stage of the fruit fly population. The individuals in the population are updated in reverse using the optimal solution information found during the search process, so as to reduce the homogeneity of the population and increase the probability of high-quality solutions. The specific operation is as follows:

[0122] Suppose that a feasible solution X exists in the d-dimensional search space. i =(x 1 x 2 , ..., x d If X is a valid solution, then X is a feasible solution. iThe inverse solution is Where, x d Let represent an individual feasible solution in the d-dimensional search space. This represents an individual reverse solution in a d-dimensional search space, where the superscript d indicates the total dimension of the search space, and j = 1, 2, ..., d;

[0123] Based on variable x i Obtain the minimum dynamic boundary lb of the j-dimensional search space. j and maximum dynamic boundary ub j ;in, This represents the i-th feasible solution in each iteration of the j-dimensional search space;

[0124] According to the minimum dynamic boundary lb j and the maximum dynamic boundary ub j The formula for obtaining the individual reverse solution is:

[0125]

[0126] In the formula, Let x represent the individual backward solution in the j-dimensional search space. j This represents an individual feasible solution in a j-dimensional search space, where the superscript j indicates the dimension of the search space, j = 1, 2, ..., d; j ∈[lb j ub j ];

[0127] Assume the elite individual solution is The reverse solution for elite individuals is: The formula for the reverse solution of elite individuals is:

[0128]

[0129] In the formula, This represents the inverse solution for elite individuals in the j-dimensional search space. Denotes the elite individual solutions in the j-dimensional search space. δ is a random number on [0, 1].

[0130] In this embodiment of the invention, chaotic mapping is used to make the initial position distribution of fruit flies more uniform, and then elite back-learning is introduced to increase the probability of getting close to a high-quality solution in the SVM algorithm.

[0131] In some specific embodiments, step S3: Establishing a well leakage accident prediction model based on the improved fruit fly optimized SVM algorithm, and training and optimizing the well leakage accident prediction model using a training set; including...

[0132] This invention constructs a well leakage accident prediction model based on the support vector machine (SVM) algorithm.

[0133] Since the selection of parameters has a significant impact on the classification accuracy and generalization ability of support vector machines (SVMs), parameter optimization is a key focus of SVM research. The fruit fly algorithm, inspired by the foraging behavior of fruit flies, is an optimization algorithm that finds the optimal solution to the optimization problem through cooperation among fruit flies. Then, an improved fruit fly-optimized SVM algorithm is used to establish a well leakage accident prediction model.

[0134] In this embodiment of the invention, the training set in the dataset is used to train the well leakage accident prediction model, and the parameters are tuned and the model is optimized to achieve higher prediction accuracy and stability.

[0135] In some specific embodiments, before using the trained and optimized well leakage accident prediction model to predict well leakage accidents in step S4, the trained and optimized well leakage accident prediction model is validated and evaluated using a test set.

[0136] The training and optimization of the well leakage accident prediction model were validated and evaluated using a test set, specifically including:

[0137] In this embodiment of the invention, a test dataset is used to validate and evaluate the trained and optimized well leakage accident prediction model. In order to comprehensively evaluate the performance of the model, evaluation methods such as accuracy, confusion matrix, precision, recall, F1 score and area under the receiver operating characteristic curve are used. Furthermore, based on the actual leakage results and the prediction results of the algorithm, the samples in the test set are divided into four categories: true positive (TP), false positive (FP), true negative (TN), and false negative (FN) to evaluate the predictive performance of the well leakage accident prediction model on new data.

[0138] The method described in this invention, through the above steps, can accurately predict well leakage events, improve the safety and efficiency of drilling operations, and provide strong support for the development and production of the oil drilling industry.

[0139] This invention also provides a well leakage prediction system, such as Figure 3 As shown, it includes:

[0140] The preprocessing unit is used to process the acquired well logging data to generate a dataset, which is then divided into a training set and a test set.

[0141] An improved unit is used to improve and optimize the Drosophila-optimized SVM algorithm by utilizing chaotic mapping and anti-learning strategies;

[0142] The training unit is used to establish a well leakage accident prediction model based on the improved fruit fly optimized SVM algorithm, and to train and optimize the well leakage accident prediction model using the training set.

[0143] The prediction unit is used to predict well leakage accidents using the trained and optimized well leakage accident prediction model based on the test set.

[0144] Regarding the system in the above embodiments, the specific manner in which each unit module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.

[0145] Based on the same inventive concept, embodiments of the present invention also provide an electronic device, the structure of which is as follows: Figure 4 As shown, it includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program or instructions to implement the aforementioned well leakage prediction method.

[0146] Based on the same inventive concept, embodiments of the present invention also provide a computer storage medium storing a computer program or instructions, which, when executed by a processor, implement the steps of the aforementioned well leakage prediction method.

[0147] Based on the same inventive concept, embodiments of the present invention also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps of the aforementioned well leakage prediction method.

[0148] Taking 13 wells in the southern edge of the Junggar Basin as an example, the well leakage prediction method based on the improved fruit fly optimized SVM algorithm provided in this invention is verified:

[0149] Based on logging data collected from 13 wells in the southern margin of the Junggar Basin, 600 sets of data records were collected from logging curve data and well completion comprehensive logging reports; among them, 300 sets were drilling data under normal conditions and 300 sets were drilling data when well leakage occurred.

[0150] PCA was used to reduce the dimensionality of the preprocessed logging data (i.e., the 600 preprocessed data records) to form the input parameters for the well leakage accident prediction model; 300 sets of drilling data under normal conditions and 300 sets of drilling data under well leakage conditions were divided into training set and test set in a 7:3 ratio to perform well leakage accident classification and prediction.

[0151] Classification prediction models (i.e. well leakage accident prediction models) of SVM optimized by IFOA, FOA, ACO and PSO algorithms were established respectively. The population size was set to 20, the maximum number of iterations was set to 100, and the range of penalty factor C and gamma was set to [0,1000]. According to the experiment, the support vector machine model performed best when the penalty factor C was 102 and the gamma was 0.02.

[0152] Among them, the fitness curves of the four algorithms for optimizing SVM well leakage classification prediction are as follows: Figure 5 As shown, the IFOA algorithm only requires 6 iterations to achieve the optimal fitness for classification accuracy; while the FOA, PSO, and ACO algorithms require 13, 30, and 43 iterations respectively to achieve their respective optimal fitness values, and none of them have a higher optimal fitness value than the IFOA algorithm. This indicates that IFOA can find the penalty parameter C and kernel parameter g of the SVM more quickly and accurately than other optimization algorithms.

[0153] Four algorithms were used to optimize the penalty parameter C and kernel parameter g of SVM, respectively, to construct a well leakage classification and prediction model (i.e., a well leakage accident prediction model). Comparative analysis of the four algorithms yielded the following results:

[0154] IFOA-SVM achieved the best prediction performance, with an accuracy of 96.8%, which is 8.12%, 11.8%, and 13.8% higher than FOA-SVM, PSO-SVM, and ACO-SVM models, respectively. The results show that combining the IFOA algorithm with the SVM algorithm not only speeds up the search for optimal parameters but also achieves higher classification prediction accuracy than other intelligent optimization algorithms, demonstrating significant optimization effects. The correctness of the prediction results of the four algorithms on the test set is as follows: Figure 6 As shown in the figure, 0 represents a correct prediction and 1 represents an incorrect prediction.

[0155] To evaluate the generalization performance of SVM in this embodiment of the invention, a comprehensive analysis was performed on accuracy, precision, recall, F1 score, confusion matrix, and ROC curve. Specifically, for the evaluation metrics of accuracy, precision, recall, and F1 score, the results of the four algorithm models were compared... Figure 7 As shown.

[0156] Figure 8A loss prediction confusion matrix based on the IFOA algorithm combined with SVM is presented, comparing the predicted categories with the categories accurately classified by the confusion matrix. In the confusion matrix, for data without leakage, the SVM prediction model achieves an accuracy of 0.95; for data with leakage, the accuracy is 0.89. This indicates that the SVM prediction model performs well in identifying well sections without leakage. However, for data with leakage, there may be some cases where the leakage impact is relatively low, resulting in slightly lower identification accuracy compared to cases without leakage.

[0157] To evaluate the generalization performance of the algorithm proposed in this embodiment of the invention, ROC curves were used to assess the expected generalization performance, and the results are as follows: Figure 9 As shown in the figure, the diagonal line corresponds to the random guessing model with an AUC value of 0.5. An AUC value of 1 represents the ideal model. The model's AUC is 0.94, which is greater than 0.5. Therefore, it can be proven that the proposed algorithm has strong generalization ability in practical applications.

[0158] This invention collects and prepares well logging data related to the drilling process, and then extracts features related to lost circulation events from the data. Next, it utilizes chaotic back-learning to improve the parameters of a support vector machine (SVM) model using a fruit fly algorithm, enhancing global search capabilities and avoiding local optima. The model is trained using a training dataset and validated using a test dataset. This invention achieves the goal of accurately predicting lost circulation events. Experimental results show that this invention can efficiently and quickly predict lost circulation events, adapts to complex data and adaptive parameter adjustments, while reducing dependence on initial values.

[0159] This invention improves the fruit fly optimization SVM algorithm by combining the characteristics of chaotic search and back learning. It can enhance the global search capability of the SVM algorithm, help find better SVM model parameters, and improve the prediction performance of the well leakage accident prediction model. Moreover, the fruit fly algorithm improved based on chaotic back learning can better handle the complex nonlinear data relationships in well leakage prediction, and improve the fitting ability and prediction accuracy of the well leakage accident prediction model.

[0160] Therefore, the present invention uses chaotic back learning to improve the fruit fly algorithm to optimize the support vector machine for predicting well leakage. This can enhance the global search capability, avoid local optima, reduce convergence time, adapt to complex data, adaptively adjust parameters, increase prediction stability, and reduce dependence on initial values. These advantages help improve the accuracy, stability and efficiency of well leakage prediction.

[0161] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method of predicting loss of circulation, characterized in that, The method comprises the following steps: data processing is performed on the collected logging data to generate a data set, and the data set is divided into a training set and a test set; the fruit fly optimization SVM algorithm is improved and optimized by using a chaotic mapping and a counter-learning strategy; an accident prediction model is established based on the improved fruit fly optimization SVM algorithm, and the accident prediction model is trained and optimized by using the training set; the trained and optimized accident prediction model is used to predict the accident.

2. The method of wellbore fluid loss prediction of claim 1, wherein, The method comprises the following steps: logging data is collected, and data preprocessing is performed on the logging data to obtain processed logging data; principal component analysis is used to select features of the processed logging data, and a plurality of principal component features related to the well leakage event are obtained to eliminate the multicollinearity of the data; the logging data after the principal component analysis is combined into a data set, and the data set is divided into a training set and a test set.

3. The method of predicting loss from a well of claim 1, wherein, The fruit fly optimization SVM algorithm comprises the following steps: Step a: randomly initializing the positions of the fruit fly population: InitX_axis and InitY_axis; wherein X_axis and Y_axis represent the X-axis and Y-axis positions of the fruit fly population, respectively; Step b: define the random direction and distance of the Drosophila individual searching for food using olfaction, i.e. define the Drosophila individual position (X i , Y i ) as: X i = X _axis + Random Value Y i = Y _axis + Random Value, wherein X i represents the coordinate value of the i-th fruit fly on the X-axis, Y i represents the coordinate value of the i-th fruit fly on the Y-axis, RandomValu e represents the foraging distance of the fruit fly; Step c: Estimate the location of individual fruit flies (X) i Y i Dist between the origin and the point i And based on the distance Dist i Calculate the taste concentration judgment value S i ; wherein the distance taste concentration determination value Step d: the taste concentration determination value S is determined i Substituting the taste concentration determination function, the taste concentration Smell of the fruit fly individual position is obtained i ; wherein Smell i = Function (S i ); Step e: based on the smell concentration of each fruit fly individual position, the fruit fly individual with the highest smell concentration in the fruit fly population is selected; that is, [bestSmell bestIndex]=max(Smell); Step f: the highest smell concentration value bestSmell and the corresponding X and Y axis coordinates are retained, and at this time the fruit fly population flies to the position for foraging: Smellbest=bestSmell, X _axis = X (bestIndex), Y _axis = Y (bestIndex), wherein Smellbest represents the retained highest smell concentration value, X(bestIndex) represents the X-axis coordinate corresponding to the highest smell concentration value, and Y(bestIndex) represents the Y-axis coordinate corresponding to the highest smell concentration value; Step g: entering the iterative optimization, repeatedly executing steps b to e, and judging whether the current smell concentration is better than the smell concentration of the previous iteration, and if so, executing step f.

4. The method of predicting loss from a well according to claim 1 or 3, wherein, The fruit fly optimization SVM algorithm is improved and optimized by using a chaotic mapping and a counter-learning strategy, comprising: In the initial stage of the fruit fly population, a logistic mapping is introduced to obtain a mapping relationship between chaotic variables and the number of iterations of the SVM algorithm, so that the fruit fly positions are uniformly distributed in the solution space, and the optimal solution of the objective function is selected as the initial population position of the fruit fly. In the initial stage of the fruit fly population, an elite reverse learning strategy is introduced, and the individuals in the population are updated in reverse through the optimal solution information searched in the search process, so as to reduce the singularity of the population and increase the probability of high-quality solutions.

5. The well leakage prediction method according to claim 4, wherein the mapping relationship between chaotic variables and the number of iterations of the SVM algorithm is an improved and optimized fruit fly optimization SVM algorithm iteration formula, which is specifically: Cx(k+1)i=uCx(k)i(1-Cx(k)i), ​ wherein Cx i represents a chaotic variable, CC represents an arbitrary random constant, x(k+1) i represents the i-th X-axis coordinate value at the k+1th iteration; k represents the current iteration number, and u represents a control parameter. wherein, if the sought problem variable satisfies then x is obtained by inverse mapping of the chaotic variable in the equation i : where x i represents the i-th X-axis coordinate value of each iteration, i.e., the i-th feasible solution of each iteration; σ i and respectively represent the lower limit and the upper limit of the value range of the variable x i .

6. A wellbore fluid loss prediction method according to claim 5, wherein, The elite reverse learning strategy is introduced in the initial position stage of fruit flies, and the optimal solution information searched in the search process is used to update the individuals in the population in reverse, including: Assume that there is a feasible solution X in a d-dimensional search space i = (x 1 , x 2 ,... x j ,..., x d ), then the reverse solution of the feasible solution X i is where x d represents an individual feasible solution of the d-dimensional search space, represents an individual reverse solution of the d-dimensional search space, and the superscript d represents the total dimension of the search space, j = 1, 2,..., d. based on the variable x i obtaining a minimum dynamic boundary lb j and a maximum dynamic boundary ub j of a j-dimensional search space; wherein, denotes the i-th feasible solution of each iteration in the j-dimensional search space; According to the minimum dynamic boundary lb j and the maximum dynamic boundary ub j , the individual inverse solution formula is obtained as: wherein xj represents an individual inverse solution of a j-dimensional search space j xj represents an individual feasible solution of a j-dimensional search space, where the superscript j denotes the search space dimension, j = 1, 2,..., d; x j ∈ [lb j , vb j ]; Assume that the elite individual solution is The elite individual reverse solution is The elite individual reverse solution formula is: wherein an elite individual solution of the j-dimensional search space, an elite individual solution of the j-dimensional search space, δ is a random number on [0, 1].

7. A well loss prediction system characterized by, Including: The preprocessing unit is used for data processing of the collected logging data to generate a data set, and the data set is divided into a training set and a test set; The improvement unit is used for improving and optimizing the fruit fly optimization SVM algorithm by using chaotic mapping and reverse learning strategy; The training unit is used for establishing a well leakage accident prediction model based on the improved and trained fruit fly optimization SVM algorithm, and training and optimizing the well leakage accident prediction model by using the training set; The prediction unit is used for predicting the well leakage accident by using the trained and optimized well leakage accident prediction model.

8. An electronic device, comprising: The computer readable storage medium stores computer programs or instructions, and the computer programs or instructions are executed by the processor to realize the steps of the well leakage prediction method in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer programs or instructions, and the computer programs or instructions are executed by the processor to realize the steps of the well leakage prediction method in any one of claims 1-6.

10. A computer program product comprising computer programs or instructions, characterized in that, The computer programs or instructions are executed by the processor to realize the steps of the well leakage prediction method in any one of claims 1-6.