Methods, devices, storage media, and processors for monitoring overflows during drilling processes.
By acquiring the temperature and pressure of the drilling fluid, and combining dielectric constant algorithm and genetic algorithm, the type of overflow fluid in the drilling fluid is identified, which solves the problem of false alarm and missed alarm in overflow monitoring of the dielectric constant method in the existing technology, and realizes accurate overflow monitoring in the drilling process.
Patent Information
- Application Number
- CN202510358635.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-03-25
AI Technical Summary
In the drilling process, the dielectric constant method is easily affected by environmental factors and human operation when monitoring overflow, which can lead to false alarms or missed alarms, making it difficult to achieve accurate overflow monitoring.
By acquiring the current temperature, pressure, and dielectric constant measurements of the drilling fluid, and combining a pre-determined drilling fluid dielectric constant algorithm and a genetic algorithm, the overflow phenomenon is determined, and the overflow fluid type, including gas-liquid, oil-liquid, and water-liquid mixtures, is identified using a mixed fluid dielectric constant algorithm.
It enables accurate overflow monitoring based on temperature, pressure, and measurement frequency, and can identify and determine the specific overflow mixture type, thus improving the accuracy and reliability of monitoring.
Smart Images

Figure CN120312138B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of drilling overflow monitoring, in particular to a method and device for overflow monitoring in a drilling process, a storage medium and a processor. BACKGROUND
[0002] Research and technology show that, compared with other methods, the dielectric constant method has high accuracy and strong timeliness in monitoring overflow. The principle of the dielectric constant method is that when overflow occurs, the fluid composition near the drill bit changes first, which directly reflects the change of the dielectric constant of the drilling fluid near the drill bit, and the method is suitable for oil invasion, gas invasion and water invasion. However, the dielectric constant of the drilling fluid itself is affected by environmental factors, human operation and other factors, and the existing method may also have abnormal fluctuations or differences in the dielectric constant under non-overflow conditions, which may easily lead to false positives or false negatives.
[0003] Therefore, how to realize overflow monitoring in the drilling process is a technical problem to be solved. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide a method and device for overflow monitoring in a drilling process, a storage medium and a processor, to solve the problem of how to realize overflow monitoring in the drilling process in the prior art.
[0005] To achieve the above-mentioned purpose, the first aspect of the present application provides a method for overflow monitoring in a drilling process, the method comprising:
[0006] obtaining a current temperature of the drilling fluid, a current pressure of the drilling fluid and a current drilling fluid dielectric constant measurement value of the drilling fluid;
[0007] determining a current drilling fluid dielectric constant theoretical value of the drilling fluid according to the current temperature, the current pressure and a preset measurement frequency based on a predetermined drilling fluid dielectric constant algorithm;
[0008] determining that the drilling fluid has an overflow phenomenon in a case where a difference between the current drilling fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value is greater than a preset deviation threshold;
[0009] obtaining an overflow fluid content of a fluid other than the drilling fluid in various mixed fluids based on a genetic algorithm and a mixed fluid dielectric constant algorithm corresponding to a plurality of predetermined mixed fluids according to the current temperature, the current pressure, the preset measurement frequency and the current drilling fluid dielectric constant measurement value, wherein the plurality of mixed fluids include gas-liquid mixed fluids, oil-liquid mixed fluids and water-liquid mixed fluids;
[0010] The plurality of mixed fluid dielectric constant theoretical values are compared with the current drilling fluid dielectric constant measurement value respectively to determine the overflow mixed fluid type corresponding to the overflow phenomenon.
[0011] The plurality of mixed fluid dielectric constant theoretical values are compared with the current drilling fluid dielectric constant measurement value respectively to determine the overflow mixed fluid type corresponding to the overflow phenomenon.
[0012] In the embodiment of the present application, based on the predetermined mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids, a plurality of mixed fluid dielectric constant theoretical values are determined according to the current temperature, the current pressure, the preset measurement frequency and the content of each overflow fluid, including: based on the predetermined gas-liquid mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids, a gas-liquid mixed fluid dielectric constant theoretical value is determined according to the current temperature, the current pressure, the preset measurement frequency and the content of the gas-liquid overflow fluid in the mixed fluid except the drilling fluid; based on the predetermined oil-liquid mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids, an oil-liquid mixed fluid dielectric constant theoretical value is determined according to the current temperature, the current pressure, the preset measurement frequency and the content of the oil-liquid overflow fluid in the mixed fluid except the drilling fluid; based on the predetermined water-liquid mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids, a water-liquid mixed fluid dielectric constant theoretical value is determined according to the current temperature, the current pressure, the preset measurement frequency and the content of the water-liquid overflow fluid in the mixed fluid except the drilling fluid.
[0013] In the embodiment of the present application, the plurality of mixed fluid dielectric constant theoretical values are compared with the current drilling fluid dielectric constant measurement value respectively to determine the overflow mixed fluid type corresponding to the overflow phenomenon, including: the deviations between the gas-liquid mixed fluid dielectric constant theoretical value, the oil-liquid mixed fluid dielectric constant theoretical value and the water-liquid mixed fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value are determined to obtain the gas-liquid mixed fluid dielectric constant deviation value, the oil-liquid mixed fluid dielectric constant deviation value and the water-liquid mixed fluid dielectric constant deviation value; the minimum of the gas-liquid mixed fluid dielectric constant deviation value, the oil-liquid mixed fluid dielectric constant deviation value and the water-liquid mixed fluid dielectric constant deviation value is determined to obtain the minimum mixed fluid dielectric constant error value; the mixed fluid type corresponding to the minimum mixed fluid dielectric constant error value is determined as the overflow mixed fluid type corresponding to the overflow phenomenon.
[0014] In the embodiment of the present application, the determination of the drilling fluid dielectric constant algorithm comprises: obtaining a training set and a test set, the training set and the test set comprising historical temperature of the drilling fluid, historical pressure of the drilling fluid, historical measurement frequency of the drilling fluid, and historical drilling fluid dielectric constant measurement value of the drilling fluid; determining, based on a symbolic regression algorithm, drilling fluid dielectric constant deviation corresponding to each candidate drilling fluid dielectric constant algorithm on the training set; and updating, based on a preset number of updates, the plurality of candidate drilling fluid dielectric constant algorithms according to the drilling fluid dielectric constant deviation to obtain the drilling fluid dielectric constant algorithm, wherein the drilling fluid dielectric constant deviation corresponding to the drilling fluid dielectric constant algorithm on the test set is less than a preset drilling fluid dielectric constant deviation.
[0015] In the embodiment of the present application, the determination of the mixed fluid dielectric constant algorithm comprises: obtaining a training set and a test set, the training set and the test set comprising historical temperature of the drilling fluid, historical pressure of the drilling fluid, historical measurement frequency of the drilling fluid, historical overflow fluid content corresponding to various mixed fluids of the drilling fluid, and historical drilling fluid dielectric constant measurement value of the drilling fluid; determining, based on a symbolic regression algorithm, mixed fluid dielectric constant deviation corresponding to each candidate mixed fluid dielectric constant algorithm on the training set; and updating, based on a preset number of updates, the plurality of candidate mixed fluid dielectric constant algorithms according to the mixed fluid dielectric constant deviation to obtain the mixed fluid dielectric constant algorithm, wherein the mixed fluid dielectric constant deviation corresponding to the mixed fluid dielectric constant algorithm on the test set is less than a preset mixed fluid dielectric constant deviation.
[0016] In the embodiment of the present application, based on the genetic algorithm and the pre-determined mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids, the overflow fluid content of the fluid other than the drilling fluid in the various mixed fluids is obtained according to the current temperature, the current pressure, the preset measurement frequency, and the current drilling fluid dielectric constant measurement value, wherein the plurality of mixed fluids comprise gas-liquid mixed fluid, oil-liquid mixed fluid, and water-liquid mixed fluid. The method comprises: determining, based on the genetic algorithm, fitness value of each candidate overflow fluid content according to the mixed fluid dielectric constant algorithm, the current temperature, the current pressure, the preset measurement frequency, and the current drilling fluid dielectric constant measurement value, wherein the fitness value is negatively correlated with deviation between candidate mixed fluid dielectric constant theoretical value obtained according to the mixed fluid dielectric constant algorithm, the current temperature, the current pressure, the preset measurement frequency, and the candidate overflow fluid content and the current drilling fluid dielectric constant measurement value; and updating, based on a preset number of updates, the plurality of candidate overflow fluid contents according to the fitness value to obtain the overflow fluid content, wherein the fitness value corresponding to the overflow fluid content is the maximum.
[0017] In the embodiment of the present application, the fitness value is determined according to the following formula:
[0018]
[0019] F (α i ) is the deviation value of the dielectric constant of the mixed fluid corresponding to the i th overflow fluid content, F (T, p, α i , f) is the dielectric constant algorithm of the mixed fluid corresponding to the plurality of mixed fluids, α i is the i th overflow fluid content, ε measured is the current dielectric constant measurement value of the drilling fluid, Fitness (α i ) is the fitness value corresponding to the i th overflow fluid content, T is the current temperature, p is the current pressure, and f is the preset measurement frequency.
[0020] The second aspect of the present application provides a device for overflow monitoring in a drilling process, comprising:
[0021] A data acquisition module is configured to acquire the current temperature of the drilling fluid, the current pressure of the drilling fluid, and the current dielectric constant measurement value of the drilling fluid.
[0022] A drilling fluid dielectric constant theoretical value determination module is configured to determine the current drilling fluid dielectric constant theoretical value of the drilling fluid based on a predetermined drilling fluid dielectric constant algorithm according to the current temperature, the current pressure, and the preset measurement frequency.
[0023] An overflow condition determination module is configured to determine that the drilling fluid has an overflow phenomenon when the difference between the current drilling fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value is greater than a preset deviation threshold.
[0024] An overflow fluid content determination module is configured to obtain the overflow fluid content of the fluid other than the drilling fluid in various mixed fluids based on a genetic algorithm and a predetermined mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids according to the current temperature, the current pressure, the preset measurement frequency, and the current drilling fluid dielectric constant measurement value, wherein the plurality of mixed fluids includes gas-liquid mixed fluid, oil-liquid mixed fluid, and water-liquid mixed fluid.
[0025] A mixed fluid dielectric constant theoretical value determination module is configured to determine a plurality of mixed fluid dielectric constant theoretical values based on a predetermined mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids according to the current temperature, the current pressure, the preset measurement frequency, and each overflow fluid content.
[0026] An overflow mixed fluid type determination module is configured to compare the plurality of mixed fluid dielectric constant theoretical values with the current drilling fluid dielectric constant measurement value to determine the overflow mixed fluid type corresponding to the overflow phenomenon.
[0027] The third aspect of the present application provides a processor configured to execute the method for overflow monitoring in a drilling process as described above.
[0028] The fourth aspect of the present application provides a machine readable storage medium, and the machine readable storage medium stores instructions for causing a machine to execute the method for overflow monitoring in a drilling process.
[0029] The technical solution has the advantages that the current drilling fluid dielectric constant theoretical value is obtained according to the current temperature, the current pressure and the preset measurement frequency. Whether overflow occurs is determined according to the deviation between the current drilling fluid dielectric constant measurement value and the current drilling fluid dielectric constant theoretical value. When the deviation between the current drilling fluid dielectric constant measurement value and the current drilling fluid dielectric constant theoretical value is greater than the preset deviation threshold, it is determined that overflow occurs, otherwise, it is determined that overflow does not occur. Therefore, the present application can determine whether other fluids are mixed into the drilling fluid to affect the dielectric constant according to the deviation between the current drilling fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value under the influence of only temperature, pressure and measurement frequency. When it is determined that overflow occurs, the current temperature, the current pressure, the preset measurement frequency and the current drilling fluid dielectric constant measurement value are used to obtain various overflow fluid contents based on the genetic algorithm and the mixed fluid dielectric constant algorithm corresponding to the plurality of mixed fluids that are predetermined. Therefore, the present application can determine a plurality of mixed fluid dielectric constant theoretical values according to the current temperature, the current pressure, the preset measurement frequency and the various overflow fluid contents, so that the accurate overflow mixed fluid type can be determined by comparing the plurality of mixed fluid dielectric constant theoretical values with the current drilling fluid dielectric constant measurement value, thereby realizing accurate monitoring of the drilling fluid overflow condition.
[0030] Other features and advantages of the embodiments of the present application will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0031] The accompanying drawings are included to provide a further understanding of the embodiments of the present application, and constitute a part of the specification, and are used to explain the embodiments of the present application together with the following specific embodiments, but do not constitute a limitation of the embodiments of the present application. In the drawings:
[0032] Figure 1 The flowchart schematically shows a method for overflow monitoring in a drilling process according to an embodiment of the present application;
[0033] Figure 2 The flowchart schematically shows a genetic algorithm according to an embodiment of the present application;
[0034] Figure 3 The flowchart schematically shows a method for determining a drilling fluid dielectric constant algorithm and a mixed fluid dielectric constant algorithm based on a symbolic regression algorithm according to an embodiment of the present application;
[0035] Figure 4Fig. 1 schematically shows a flowchart of a process for inverting overflow fluid content based on a genetic algorithm according to an embodiment of the present application;
[0036] Figure 5 Fig. 2 schematically shows a structure block diagram of an apparatus for overflow monitoring in a drilling process according to an embodiment of the present application. DETAILED DESCRIPTION
[0037] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the specific implementation manners described herein are merely used to explain and illustrate the embodiments of the present application and should not be used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort fall within the scope of protection of the present application.
[0038] It should be noted that the acquisition, transmission, storage, use, processing and the like of data in the technical solutions of the present application comply with relevant provisions of national laws and regulations. In the embodiments of the present application, some industry existing solutions such as software, components, models and the like can be mentioned, which should be considered as exemplary, and the purpose is merely to illustrate the feasibility in the implementation of the technical solutions of the present application, but does not mean that the applicant has or will necessarily use the solutions.
[0039] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are merely used to explain the relative positional relationship, movement condition and the like between components in a certain specific posture (as shown in the drawings), and if the specific posture changes, the directional indications also change accordingly.
[0040] In addition, if the embodiments of the present application involve descriptions such as "first", "second" and the like, the descriptions of "first", "second" and the like are merely for description purposes and should not be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features limited by "first", "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions of the various embodiments can be combined with each other, but must be based on the fact that a person of ordinary skill in the art can implement it, and when the combination of technical solutions appears to be contradictory or unimplementable, it should be considered that the combination of technical solutions does not exist and is not within the scope of protection claimed by the present application.
[0041] Figure 1 Fig. 1 schematically shows a flowchart of a process for inverting overflow fluid content based on a genetic algorithm according to an embodiment of the present application; Figure 1As shown, the embodiment of the present application provides a method for overflow monitoring in a drilling process. The method is described by taking a processor as an example. The method can include the following steps:
[0042] In step S101, a current temperature of drilling fluid, a current pressure of drilling fluid, and a current drilling fluid dielectric constant measurement value of drilling fluid are obtained.
[0043] In step S102, based on a predetermined drilling fluid dielectric constant algorithm, a current drilling fluid dielectric constant theoretical value of drilling fluid is determined according to the current temperature, the current pressure, and a preset measurement frequency.
[0044] In step S103, in a case where a difference between the current drilling fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value is greater than a preset deviation threshold, it is determined that overflow phenomenon occurs in the drilling fluid.
[0045] In step S104, based on a genetic algorithm and a predetermined mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids, overflow fluid content of fluids other than the drilling fluid in the various mixed fluids is obtained according to the current temperature, the current pressure, the preset measurement frequency, and the current drilling fluid dielectric constant measurement value, wherein the plurality of mixed fluids include gas-liquid mixed fluid, oil-liquid mixed fluid, and water-liquid mixed fluid.
[0046] In step S105, based on a predetermined mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids, a plurality of mixed fluid dielectric constant theoretical values are respectively determined according to the current temperature, the current pressure, the preset measurement frequency, and the overflow fluid content.
[0047] In step S106, the plurality of mixed fluid dielectric constant theoretical values are respectively compared with the current drilling fluid dielectric constant measurement value to determine an overflow mixed fluid type corresponding to the overflow phenomenon.
[0048] It can be understood that the current temperature is the temperature of the drilling fluid at a current moment. The current pressure is the pressure of the drilling fluid at the current moment. The preset measurement frequency is a preset measurement frequency of the drilling fluid dielectric constant sensor. The current drilling fluid dielectric constant measurement value is a field measurement value of the dielectric constant of the drilling fluid corresponding to the current temperature, the current pressure and the preset measurement frequency. The drilling fluid dielectric constant algorithm is a relationship between the current temperature, the current pressure, the preset measurement frequency and the current drilling fluid dielectric constant theoretical value of the drilling fluid. The current drilling fluid dielectric constant theoretical value is a calculated value of the dielectric constant of the drilling fluid calculated according to the drilling fluid dielectric constant algorithm. The preset deviation threshold is a preset deviation threshold of the current drilling fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value. The mixed fluid includes a gas-liquid mixed fluid, an oil-liquid mixed fluid and a water-liquid mixed fluid, wherein the gas-liquid mixed fluid refers to a mixed fluid of gas and drilling fluid, the oil-liquid mixed fluid refers to a mixed fluid of oil and drilling fluid, and the water-liquid mixed fluid refers to a mixed fluid of water and drilling fluid. The mixed fluid dielectric constant algorithm refers to a relationship between the current temperature, the current pressure, the preset measurement frequency, the overflow fluid content and the mixed fluid dielectric constant theoretical value. The overflow fluid content refers to the volume component ratio of the fluid other than the drilling fluid in various mixed fluids.
[0049] Specifically, the processor first acquires the current temperature of the drilling fluid, the current pressure of the drilling fluid and the current drilling fluid dielectric constant measurement value of the drilling fluid. Then, the processor obtains the current drilling fluid dielectric constant theoretical value of the drilling fluid according to the current temperature, the current pressure and the preset measurement frequency based on the predetermined drilling fluid dielectric constant algorithm. At the same time, the processor determines whether the overflow phenomenon occurs in the drilling fluid according to the deviation of the difference between the current drilling fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value and the preset deviation threshold. After that, the processor obtains the overflow fluid content of the fluid other than the drilling fluid in various mixed fluids according to the current temperature, the current pressure, the preset measurement frequency and the current drilling fluid dielectric constant measurement value based on the genetic algorithm and the predetermined mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids. Each overflow fluid content corresponds to an overflow mixed fluid type. Finally, the processor determines a plurality of mixed fluid dielectric constant theoretical values according to the current temperature, the current pressure, the preset measurement frequency and each overflow fluid content based on the predetermined mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids. The overflow mixed fluid type corresponds to the mixed fluid dielectric constant theoretical value, so that the processor compares the plurality of mixed fluid dielectric constant theoretical values with the current drilling fluid dielectric constant measurement value respectively, so as to determine the specific mixed fluid dielectric constant theoretical value, and further determine the overflow mixed fluid type corresponding to the mixed fluid dielectric constant theoretical value. At the same time, since each overflow fluid content corresponds to an overflow mixed fluid type, the overflow fluid content corresponding to the overflow fluid type is the overflow fluid content of the drilling fluid determined by the processor.
[0050] The technical solution has the advantages that the current drilling fluid dielectric constant theoretical value is obtained according to the current temperature, the current pressure and the preset measurement frequency. Whether overflow occurs is determined according to the deviation between the current drilling fluid dielectric constant measured value and the current drilling fluid dielectric constant theoretical value. When the deviation between the current drilling fluid dielectric constant measured value and the current drilling fluid dielectric constant theoretical value is greater than a preset deviation threshold, it is determined that overflow occurs, otherwise, it is determined that overflow does not occur. Therefore, the application can determine whether other fluids are mixed into the drilling fluid to affect the dielectric constant according to the deviation between the current drilling fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measured value under the influence of only the temperature, the pressure and the measurement frequency. When it is determined that overflow occurs, the current temperature, the current pressure, the preset measurement frequency and the current drilling fluid dielectric constant measured value are used to obtain various overflow fluid contents based on the genetic algorithm and the mixed fluid dielectric constant algorithm corresponding to the plurality of predetermined mixed fluids. Therefore, the application can determine a plurality of mixed fluid dielectric constant theoretical values according to the current temperature, the current pressure, the preset measurement frequency and the various overflow fluid contents, so as to determine the accurate overflow mixed fluid type by comparing the plurality of mixed fluid dielectric constant theoretical values with the current drilling fluid dielectric constant measured value, thereby realizing accurate monitoring of the drilling fluid overflow condition.
[0051] In the embodiment of the application, the plurality of mixed fluid dielectric constant theoretical values are determined according to the current temperature, the current pressure, the preset measurement frequency and the respective overflow fluid contents based on the mixed fluid dielectric constant algorithm corresponding to the plurality of predetermined mixed fluids, including: determining the gas-liquid mixed fluid dielectric constant theoretical value according to the current temperature, the current pressure, the preset measurement frequency and the gas-liquid overflow fluid content of the gas in the mixed fluid except the drilling fluid based on the gas-liquid mixed fluid dielectric constant algorithm corresponding to the predetermined gas-liquid mixed fluid; determining the oil-liquid mixed fluid dielectric constant theoretical value according to the current temperature, the current pressure, the preset measurement frequency and the oil-liquid overflow fluid content of the oil in the mixed fluid except the drilling fluid based on the oil-liquid mixed fluid dielectric constant algorithm corresponding to the predetermined oil-liquid mixed fluid; and determining the water-liquid mixed fluid dielectric constant theoretical value according to the current temperature, the current pressure, the preset measurement frequency and the water-liquid overflow fluid content of the water in the mixed fluid except the drilling fluid based on the water-liquid mixed fluid dielectric constant algorithm corresponding to the predetermined water-liquid mixed fluid.
[0052] It can be understood that the gas-liquid mixed fluid refers to a mixed fluid of gas and drilling fluid. The gas-liquid mixed fluid dielectric constant algorithm is a relationship between current temperature, current pressure, preset measurement frequency, gas-liquid overflow fluid content, and mixed fluid dielectric constant theoretical value. The gas-liquid overflow fluid content refers to a volume component ratio of gas in the mixed fluid except for drilling fluid. The gas-liquid mixed fluid dielectric constant theoretical value is a calculated value of the gas-liquid mixed fluid dielectric constant calculated according to the gas-liquid mixed fluid dielectric constant algorithm. The oil-liquid mixed fluid refers to a mixed fluid of oil and drilling fluid. The oil-liquid mixed fluid dielectric constant algorithm is a relationship between current temperature, current pressure, preset measurement frequency, oil-liquid overflow fluid content, and mixed fluid dielectric constant theoretical value. The oil-liquid overflow fluid content refers to a volume component ratio of oil in the mixed fluid except for drilling fluid. The oil-liquid mixed fluid dielectric constant theoretical value is a calculated value of the oil-liquid mixed fluid dielectric constant calculated according to the oil-liquid mixed fluid dielectric constant algorithm. The water-liquid mixed fluid refers to a mixed fluid of water and drilling fluid. The water-liquid mixed fluid dielectric constant algorithm is a relationship between current temperature, current pressure, preset measurement frequency, water-liquid overflow fluid content, and mixed fluid dielectric constant theoretical value. The water-liquid overflow fluid content refers to a volume component ratio of water in the mixed fluid except for drilling fluid. The water-liquid mixed fluid dielectric constant theoretical value is a calculated value of the water-liquid mixed fluid dielectric constant calculated according to the water-liquid mixed fluid dielectric constant algorithm.
[0053] Specifically, based on a pre-determined dielectric constant algorithm for a gas-liquid mixture, the processor can determine the theoretical value of the dielectric constant of the gas-liquid mixture by considering the current temperature, current pressure, preset measurement frequency, and the gas-liquid overflow fluid content (excluding drilling fluid) in the mixture. Here, the gas-liquid mixture dielectric constant algorithm is one of several dielectric constant algorithms for various mixtures, and the gas-liquid overflow fluid content is one of each overflow fluid content. Similarly, based on a pre-determined dielectric constant algorithm for an oil mixture, the processor can determine the theoretical value of the dielectric constant of the oil mixture by considering the current temperature, current pressure, preset measurement frequency, and the oil overflow fluid content (excluding drilling fluid) in the mixture. Here, the oil mixture dielectric constant algorithm is one of several dielectric constant algorithms for various mixtures, and the oil overflow fluid content is one of each overflow fluid content. Based on a pre-determined dielectric constant algorithm for a water-liquid mixture, and taking into account the current temperature, current pressure, preset measurement frequency, and the water overflow fluid content (excluding drilling fluid) in the mixture, the processor can determine the theoretical value of the dielectric constant of the water-liquid mixture. The water-liquid mixture dielectric constant algorithm is one among several algorithms for different mixtures, and the water overflow fluid content is one of the overflow fluid contents. Determining the theoretical dielectric constant values for gas-liquid mixtures, oil-liquid mixtures, and water-liquid mixtures allows the processor to identify the mixture with the smallest theoretical dielectric constant value relative to the current drilling fluid, thereby determining the overflow mixture type and overflow fluid content corresponding to the final smallest theoretical dielectric constant value.
[0054] In this embodiment, comparing the theoretical values of the dielectric constants of multiple mixed fluids with the current measured values of the dielectric constants of the drilling fluid to determine the overflow mixed fluid type corresponding to the overflow phenomenon includes: determining the deviations between the theoretical values of the dielectric constants of the gas-liquid mixed fluid, the oil-liquid mixed fluid, and the water-liquid mixed fluid and the current measured values of the dielectric constants of the drilling fluid, to obtain the dielectric constant deviation values of the gas-liquid mixed fluid, the oil-liquid mixed fluid, and the water-liquid mixed fluid; determining the smallest of the dielectric constant deviation values of the gas-liquid mixed fluid, the oil-liquid mixed fluid, and the water-liquid mixed fluid, to obtain the minimum dielectric constant error value of the mixed fluid; and determining the mixed fluid type corresponding to the minimum dielectric constant error value of the mixed fluid as the overflow mixed fluid type corresponding to the overflow phenomenon.
[0055] It can be understood that the theoretical value of the dielectric constant of a gas-liquid mixture is a calculated value obtained using the gas-liquid mixture dielectric constant algorithm. The theoretical value of the dielectric constant of an oil-liquid mixture is a calculated value obtained using the oil-liquid mixture dielectric constant algorithm. The theoretical value of the dielectric constant of a water-liquid mixture is a calculated value obtained using the water-liquid mixture dielectric constant algorithm. The deviation value of the dielectric constant of a gas-liquid mixture refers to the deviation between the theoretical value and the currently measured value of the dielectric constant of the drilling fluid. The deviation value of the dielectric constant of an oil-liquid mixture refers to the deviation between the theoretical value and the currently measured value of the dielectric constant of the drilling fluid. The deviation value of the dielectric constant of a water-liquid mixture refers to the deviation between the theoretical value and the currently measured value of the dielectric constant of the water-liquid mixture. The minimum dielectric constant error value of the mixture is the smallest among the deviation values of the dielectric constants of the gas-liquid mixture, oil-liquid mixture, and water-liquid mixture. The mixed fluid type is a mixture of gas and drilling fluid, oil and drilling fluid, or water and drilling fluid. The overflow mixed fluid type is one of the following: a mixture of gas and drilling fluid, an oil and drilling fluid, or water and drilling fluid.
[0056] Specifically, the processor determines the minimum dielectric constant error value of the mixed fluid, that is, the dielectric constant of the mixed fluid that deviates the least from the current measured value of the drilling fluid dielectric constant. The type of mixed fluid corresponding to the minimum dielectric constant error value is then determined as the overflow mixed fluid type corresponding to the overflow phenomenon, allowing the processor to determine the overflow mixed fluid type based on the minimum dielectric constant error value. For example, when the dielectric constant deviation of the gas-liquid mixed fluid is the minimum dielectric constant error value, the overflow mixed fluid type is a gas-drilling fluid mixture; when the dielectric constant deviation of the oil mixed fluid is the minimum dielectric constant error value, the overflow mixed fluid type is an oil-drilling fluid mixture; and when the dielectric constant deviation of the water-liquid mixed fluid is the minimum dielectric constant error value, the overflow mixed fluid type is a water-drilling fluid mixture.
[0057] In this embodiment, determining the drilling fluid dielectric constant algorithm includes: acquiring a training set and a test set, the training set and test set including the historical temperature of the drilling fluid, the historical pressure of the drilling fluid, the historical measurement frequency of the drilling fluid, and the historical measured value of the drilling fluid dielectric constant; determining the drilling fluid dielectric constant deviation corresponding to each candidate drilling fluid dielectric constant algorithm on the training set based on a symbolic regression algorithm; updating multiple candidate drilling fluid dielectric constant algorithms according to the drilling fluid dielectric constant deviation based on a preset number of updates to obtain the drilling fluid dielectric constant algorithm, wherein the drilling fluid dielectric constant deviation corresponding to the drilling fluid dielectric constant algorithm on the test set is less than the preset drilling fluid dielectric constant deviation.
[0058] It is understood that this application divides the collected drilling fluid dielectric constant measurement data under different combinations of current temperature, current pressure, and preset measurement frequency into a training set and a test set in a 9:1 ratio. The training set is used to train the drilling fluid dielectric constant algorithm, while the test set is used to verify whether the drilling fluid dielectric constant algorithm trained in the training set meets the requirements. Historical temperature refers to the temperature of the drilling fluid at any given historical moment. Historical pressure refers to the pressure of the drilling fluid at any given historical moment. Historical measurement frequency refers to the drilling fluid dielectric constant measurement frequency corresponding to historical temperature and historical pressure. Historical drilling fluid dielectric constant measurement values are the dielectric constant measurement values corresponding to historical temperature, historical pressure, and historical measurement frequency.
[0059] Specifically, the determination of the drilling fluid dielectric constant algorithm can be used to determine whether a drilling fluid overflow will occur. If the difference between the theoretical value of the current drilling fluid dielectric constant determined by the algorithm and the measured value exceeds a preset deviation threshold, a drilling fluid overflow can be identified. Therefore, based on the pre-determined drilling fluid dielectric constant algorithm, the processor can determine whether a drilling fluid overflow has occurred.
[0060] In this embodiment, determining the dielectric constant algorithm for the mixed fluid includes: acquiring a training set and a test set, the training set and test set including the historical temperature of the drilling fluid, the historical pressure of the drilling fluid, the historical measurement frequency of the drilling fluid, the historical overflow fluid content corresponding to various mixed fluids of the drilling fluid, and the historical measured value of the dielectric constant of the drilling fluid; determining the dielectric constant deviation of each candidate mixed fluid dielectric constant algorithm on the training set based on a symbolic regression algorithm; updating multiple candidate mixed fluid dielectric constant algorithms according to the dielectric constant deviation of the mixed fluid based on a preset number of updates to obtain the mixed fluid dielectric constant algorithm, wherein the dielectric constant deviation of the mixed fluid dielectric constant algorithm on the test set is less than the preset dielectric constant deviation of the mixed fluid.
[0061] It is understood that this application divides the collected drilling fluid dielectric constant measurement data under different combinations of current temperature, current pressure, overflow fluid content, and preset measurement frequency into a training set and a test set in a 9:1 ratio. The training set is used to train mixed fluid dielectric constant algorithms for various mixed fluids, while the test set is used to verify whether the mixed fluid dielectric constant algorithms trained in the training set meet the requirements. Historical temperature refers to the drilling fluid temperature at any given historical moment. Historical pressure refers to the drilling fluid pressure at any given historical moment. Historical measurement frequency refers to the drilling fluid dielectric constant measurement frequency corresponding to historical temperature and historical pressure. Historical drilling fluid dielectric constant measurement values are the dielectric constant measurement values corresponding to historical temperature, historical pressure, and historical measurement frequency. The candidate mixed fluid dielectric constant algorithm is a mixed fluid dielectric constant algorithm simulated by a symbolic regression algorithm, and it is used as one of the iterative populations for iteration. The preset update count is a pre-set number of update iterations.
[0062] Specifically, determining the dielectric constant algorithm for mixed fluids allows the processor to subsequently obtain the overflow fluid content of fluids other than drilling fluid in various mixed fluids and the theoretical values of multiple mixed fluid dielectric constants based on genetic algorithms and mixed fluid dielectric constant algorithms. This provides the prerequisite for the processor to subsequently determine the type and content of the overflow mixed fluid.
[0063] In this embodiment, based on a genetic algorithm and a pre-determined dielectric constant algorithm for multiple mixed fluids, the overflow fluid content of fluids other than drilling fluid in various mixed fluids is obtained according to the current temperature, current pressure, preset measurement frequency, and current drilling fluid dielectric constant measurement value. The multiple mixed fluids include gas-liquid mixed fluids, oil-liquid mixed fluids, and water-liquid mixed fluids. The process involves: determining the fitness value of each candidate overflow fluid content based on the genetic algorithm, the dielectric constant algorithm for mixed fluids, the current temperature, current pressure, preset measurement frequency, and current drilling fluid dielectric constant measurement value. The fitness value is negatively correlated with the deviation between the theoretical value of the candidate mixed fluid dielectric constant obtained from the dielectric constant algorithm for mixed fluids, the current temperature, current pressure, preset measurement frequency, and candidate overflow fluid content, and the current drilling fluid dielectric constant measurement value. Based on a preset number of updates, the multiple candidate overflow fluid contents are updated according to the fitness value to obtain the overflow fluid content, where the overflow fluid content corresponds to the highest fitness value.
[0064] It can be understood that mixed fluids include gas-liquid mixtures, oil-liquid mixtures, and water-liquid mixtures. Gas-liquid mixtures refer to mixtures of gas and drilling fluid, oil-liquid mixtures refer to mixtures of oil and drilling fluid, and water-liquid mixtures refer to mixtures of water and drilling fluid. The mixed fluid dielectric constant algorithm refers to the relationship between the current temperature, current pressure, preset measurement frequency, overflow fluid content, and the theoretical value of the mixed fluid dielectric constant. This includes algorithms for gas-liquid, oil-liquid, and water-liquid mixtures. The preset measurement frequency is the pre-planned number of measurements of the drilling fluid dielectric constant. The current temperature is the temperature of the drilling fluid at a given moment. The current pressure is the pressure of the drilling fluid at a given moment. The current measured value of the drilling fluid dielectric constant refers to the field measurement value of the dielectric constant of the drilling fluid corresponding to the current temperature and pressure. The fitness value is negatively correlated with the deviation between the theoretical value of the candidate mixed fluid dielectric constant and the current measured value of the drilling fluid dielectric constant. The preset update count is the pre-set number of update iterations. The candidate overflow fluid content is the overflow fluid content simulated by a genetic algorithm, and it is used as one of the iterative populations for iteration. The overflow fluid content is the volumetric composition ratio of fluids other than drilling fluid.
[0065] Specifically, the overflow fluid content is iteratively analyzed using a genetic algorithm to determine the overflow fluid content that best satisfies both the current drilling fluid dielectric constant measurement and the dielectric constant algorithm for the mixed fluid. The processor then uses this overflow fluid content as the overflow fluid content for the corresponding overflow mixed fluid type. The processor obtains the overflow fluid content for the corresponding overflow mixed fluid type through the iterative genetic algorithm, laying the foundation for subsequent selection of the overflow mixed fluid type and overflow fluid content.
[0066] In this embodiment, the fitness value is determined according to the following formula:
[0067]
[0068] Wherein, F(α) i F(T,p,α) represents the dielectric constant deviation of the mixed fluid corresponding to the i-th overflow fluid content. i f) represents the algorithm for the dielectric constant of various mixed fluids, where α is the dielectric constant of the mixed fluid. i Let ε be the content of the i-th overflow fluid. measured The measured value of the dielectric constant of the drilling fluid is Fitness(α). i ) represents the fitness value corresponding to the i-th overflow fluid content, T represents the current temperature, p represents the current pressure, and f represents the preset measurement frequency.
[0069] It can be understood that the dielectric constant deviation of the mixed fluid is the square of the difference between the theoretical value of the mixed fluid dielectric constant and the current theoretical value of the drilling fluid dielectric constant. The mixed fluid dielectric constant algorithm includes algorithms for gas-liquid mixed fluids, oil mixed fluids, and water mixed fluids. The fitness value is the reciprocal of the mixed fluid dielectric constant deviation value. The current temperature is the temperature of the drilling fluid at a given moment. The current pressure is the pressure of the drilling fluid at a given moment. The preset measurement frequency is the pre-planned number of measurements of the drilling fluid dielectric constant.
[0070] Specifically, the calculation of fitness provides a basis for the iteration of the genetic algorithm. The genetic algorithm selects the overflow fluid content with a high fitness value to add to the next population to continue the iteration. Therefore, the calculation of fitness enables the processor to complete the iteration of various overflow fluid contents based on fitness.
[0071] In one specific embodiment, a method for monitoring overflows during drilling is provided, which will be described in detail below.
[0072] This application first establishes drilling fluid dielectric constant algorithms and mixed fluid dielectric constant algorithms based on experimental data or historical measurement data, serving as physical models for the dielectric constant. Secondly, it acquires in real-time temperature, pressure, preset measurement frequency, and current drilling fluid dielectric constant measurements near the drill bit. Based on the drilling fluid dielectric constant algorithm, the measured temperature, pressure, and preset measurement frequency near the drill bit, it obtains the theoretical value of the current drilling fluid dielectric constant. The difference between the current theoretical value and the current measured value of the drilling fluid dielectric constant is compared to achieve early overflow detection. Finally, error minimization is used to identify the overflow fluid type and predict the overflow fluid content, specifically including the following steps:
[0073] Step 1: Collect experimental data or historical near-bit drilling fluid dielectric constant measurement data, including dielectric constant under different conditions such as current temperature, current pressure, overflow fluid content, and preset measurement frequency.
[0074] Step 2: Construct drilling fluid dielectric constant algorithms and mixed fluid dielectric constant algorithms based on symbolic regression. The drilling fluid dielectric constant algorithm is a function of temperature, pressure, and measurement frequency, and can be expressed as:
[0075] ε1=F1(T,p,f) (1)
[0076] In the formula, ε1 is the theoretical value of the dielectric constant of the drilling fluid; F1 is the algorithm for the dielectric constant of the drilling fluid; T is the current temperature, °C; p is the current pressure, MPa; and f is the preset measurement frequency.
[0077] The dielectric constant of the mixed fluid is a function of temperature, pressure, overflow fluid content, and measurement frequency, and can be expressed as:
[0078] ε2=F2(T,p,α,f) (2)
[0079] In the formula, ε2 is the theoretical value of the dielectric constant of the mixed fluid; F2 is the algorithm for calculating the dielectric constant of the mixed fluid, which is a different algorithm for calculating the dielectric constant of the mixed fluid corresponding to different overflow fluids; T is the current temperature, °C; p is the current pressure, MPa; α is the overflow fluid content, which is between 0 and 1; and f is the preset measurement frequency.
[0080] Step 3: Obtain the preset measurement frequency and the current temperature and pressure measured in real time near the drill bit at the current moment.
[0081] Step 4: Input the current temperature, current pressure, and preset measurement frequency obtained at the current moment into the calculation equation F1 to obtain the theoretical value of the dielectric constant of the drilling fluid under this condition. The absolute error of the dielectric constant between the theoretical value and the measured value of the dielectric constant of the drilling fluid is calculated, as shown in equation (3). When the absolute error of the dielectric constant is greater than the preset deviation threshold, it indicates that an overflow has occurred; otherwise, no overflow has occurred.
[0082]
[0083] In the formula, ε 1,measured ε is the current measured value of the dielectric constant of the drilling fluid. error This represents the absolute error of the dielectric constant. This is the theoretical value of the dielectric constant of the drilling fluid.
[0084] Step 5: Once an overflow is detected, the type of overflow fluid and the content of overflow fluid are identified by minimizing the error. For each type of overflow fluid, the following steps are performed:
[0085] (1) Based on the dielectric constant algorithm of the mixed fluid of drilling fluid and overflow fluid, the content of overflow fluid is obtained by using a genetic algorithm based on the current temperature, current pressure, preset measurement frequency and current measured value of the dielectric constant of drilling fluid.
[0086] (2) The current temperature, current pressure, preset measurement frequency and overflow fluid content obtained at the current moment are brought into the mixed fluid dielectric constant algorithm to obtain the absolute error between the theoretical value of the mixed fluid dielectric constant and the current measured value of the drilling fluid dielectric constant.
[0087] Step 6: Compare the absolute error between the theoretical value of the dielectric constant of the mixed fluid and the measured value of the dielectric constant of the drilling fluid under each overflow fluid content. Take the overflow fluid corresponding to the smallest absolute error as the overflow fluid type, and the corresponding overflow fluid content as the final overflow fluid content, as shown in equation (4). When no overflow is detected, proceed directly to step 7.
[0088] Label = min (ε error,oil ,ε error,gas ,ε error,water (4)
[0089] In the formula, Label represents the overflow mixed fluid type; ε error,oil ε represents the absolute error between the theoretical value of the dielectric constant of the mixed fluid and the measured value of the dielectric constant of the drilling fluid at the corresponding overflow fluid content when the overflow fluid is oil. error,gas ε represents the absolute error between the theoretical value of the dielectric constant of the mixed fluid and the current measured value of the dielectric constant of the drilling fluid when the overflow fluid is gas. error,water The absolute error between the theoretical value of the dielectric constant of the mixed fluid and the current measured value of the dielectric constant of the drilling fluid when the overflow fluid is water.
[0090] Step 7: Obtain the real-time temperature and pressure near the drill bit at the next moment, and repeat steps 4-6 to achieve early monitoring of overflow during the drilling process.
[0091] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0092] As attached Figure 2 The diagram illustrates the computation process of a genetic algorithm for overflow monitoring during drilling, according to an embodiment of this application. A genetic algorithm is an optimization algorithm that simulates the biological evolution process in nature. It belongs to the category of heuristic algorithms, possesses global search capabilities, and is commonly used for complex optimization problems. Its core idea is to simulate natural selection and genetic mechanisms, utilizing operations such as selection, crossover, and mutation to iteratively optimize candidate solutions, thereby finding the optimal solution to the problem. The steps are as follows:
[0093] Step 1: Key Parameter Settings. Set the population size, number of iterations, crossover probability, and mutation probability;
[0094] Step 2: Randomly initialize the population. Randomly generate individuals in the population; each individual is a solution, using a vector x = [x1, x2, ... x...]. m ] indicates that m is the dimension of the variable.
[0095] Step 3: Calculate fitness. For each individual x in the population... i Its fitness value can be calculated as follows:
[0096] Fitness(x i )=f(x i (5)
[0097] In the formula, Fitness(x) i ) for individual x i fitness value; f(x) i ) for individual x i The fitness calculation equation.
[0098] Step 4: If the number of iterations has not reached the preset number of iterations, proceed to steps 5-8; otherwise, proceed directly to step 9.
[0099] Step 5: Selection. Sort the fitness values of all individuals in the population and select the top k individuals with the highest fitness values as candidates for the next generation.
[0100] Step 6: Crossover. The crossover operation simulates gene exchange in biological heredity to generate new individuals. The specific steps are as follows: (1) Randomly select two individuals x1 and x2 from the candidate individuals; (2) Perform crossover on the two randomly selected individuals according to the preset crossover probability to generate the corresponding offspring, which can be represented as:
[0101]
[0102] In the formula, and These represent the generated offspring; β is a scaling factor, ranging from 0 to 1.
[0103] Step 7: Mutation. Mutation simulates gene mutation, introducing diversity and avoiding local optima. Specifically, it involves randomly adding a small perturbation to the offspring generated after crossover according to a preset mutation probability, thus generating new offspring. This can be represented as:
[0104]
[0105] In the formula, x i ′ For individual x i c The offspring generated after mutation; Δ is a small random number, usually sampled from a normal or uniform distribution.
[0106] Step 8: Update the population. Replace some individuals from the previous generation with the newly generated offspring to form a new population, and then proceed to step 3. The specific steps for updating the population are as follows: (1) Select the n best individuals from the previous generation based on their fitness values; (2) Combine these n best individuals with the newly generated offspring to form the next generation population.
[0107] Step 9: Sort the fitness values of all individuals in the current population, select the individual with the largest fitness value as the optimal solution, and end the iteration.
[0108] As attached Figure 3 This is a schematic diagram illustrating the process of establishing drilling fluid dielectric constant and mixed fluid dielectric constant algorithms based on symbolic regression for overflow monitoring during drilling, according to an embodiment of this application. The solution processes for the drilling fluid dielectric constant algorithm and the mixed fluid dielectric constant algorithm are the same. The following describes the process of solving the dielectric constant calculation equation based on the symbolic regression algorithm, using a drilling fluid and gas mixture as an example. The specific steps are as follows:
[0109] Step 1: Dielectric constant measurements of historical drilling fluid under different combinations of historical temperature, historical pressure, historical overflow fluid content, and historical measurement frequency are divided into training set and test set at a ratio of 9:1, and a root mean square error threshold is preset.
[0110] Step 2: Set the population size, number of iterations, crossover probability, mutation probability, and model complexity penalty coefficient;
[0111] Step 3: Define the input variables as historical temperature, historical pressure, historical measurement frequency, and historical overflow fluid content. The operators are addition, subtraction, multiplication, and division, and the operation functions are trigonometric functions, exponential functions, logarithmic functions, etc.
[0112] Step 4: Randomly generate dielectric constant calculation equations for a preset population size to form an initial population. Each dielectric constant calculation equation in the initial population is a function of historical temperature, historical pressure, historical measurement frequency, and historical overflow fluid content, as shown in equation (2).
[0113] Step 5: Calculate the root mean square error of the dielectric constant calculation equation for each population on the training set, which can be expressed as:
[0114]
[0115] In the formula, RMSE is the root mean square error; N is the number of dielectric constant measurements in the training set; y i This is the measured value of the dielectric constant; This is the calculated value of the dielectric constant.
[0116] Step 6: Calculate the fitness value of each dielectric constant calculation equation in the population on the training set, which can be expressed as:
[0117]
[0118] In the formula, Fitness(F 2,i ) represents the fitness value of the i-th dielectric constant calculation equation in the population; RMSE(F)2,i ) represents the root mean square error of the equation for calculating the dielectric constant of the i-th element in the population.
[0119] Step 7: If the number of iterations has not reached the preset number of iterations, proceed to step 8; otherwise, proceed directly to step 9.
[0120] Step 8: Perform selection, crossover, and mutation to generate a new dielectric constant calculation equation and update the current population, then proceed to step 5. This process is the same as the population update process in a genetic algorithm, and will not be described in detail here.
[0121] Step 9: Sort the fitness values of all dielectric constant calculation equations in the current population, and select the dielectric constant calculation equation with the largest fitness value as the optimal solution, thus obtaining the dielectric constant algorithm for gas-liquid mixtures.
[0122] Step 10: Calculate the root mean square error of the gas-liquid mixture dielectric constant algorithm on the test set.
[0123] Step 11: Observe whether the root mean square error (RMSE) of the gas-liquid mixture dielectric constant algorithm on the test set is less than the preset RMSE threshold. If it is less than the preset RMSE threshold, stop the calculation. This gas-liquid mixture dielectric constant algorithm is the final gas-liquid mixture dielectric constant algorithm. Otherwise, adjust the crossover probability, mutation probability, and model complexity penalty coefficient, and proceed to step 3.
[0124] As attached Figure 4 This is a schematic diagram illustrating a process for retrieving overflow fluid content based on a genetic algorithm for overflow monitoring during drilling, according to an embodiment of this application. Similarly, taking gas overflow fluid content retrieval as an example, the retrieval process for oil and water overflow fluid content is the same as for gas, and the specific steps are as follows:
[0125] Step 1: Set the population size, number of iterations, crossover probability, and mutation probability;
[0126] Step 2: Randomly generate the gas overflow fluid content of a preset population size to form an initial population, where the value of each gas content in the population is between 0 and 1;
[0127] Step 3: Calculate the fitness value of each gas overflow fluid content in the population, which can be expressed as:
[0128] F(α gas,i )=[F2(T,p,α gas,i ,f)-ε 2,measured ] 2 +max(-α gas,i ,0)+max(α gas,i -1,0) (11)
[0130]
[0131] In the formula, α gas,i ε represents the content of the i-th gas overflow fluid; 2,measured This represents the current measured value of the drilling fluid dielectric constant; Fitness(α) gas,i ) represents the fitness value corresponding to the i-th overflow fluid content, T represents the current temperature, p represents the current pressure, and f represents the preset measurement frequency.
[0132] Step 4: If the number of iterations has not reached the preset number of iterations, proceed to step 5; otherwise, proceed directly to step 6.
[0133] Step 5: Perform selection, crossover, and mutation to generate new gas concentrations and update the current population, then proceed to step 3. This process is the same as the population update process in a genetic algorithm, and will not be described in detail here.
[0134] Step 6: Sort the fitness values of all gas contents in the current population, and select the gas contents with the highest fitness value as the gas overflow fluid contents.
[0135] Step 7: End the calculation.
[0136] This application provides a processor configured to perform the above-described method for overflow monitoring during drilling.
[0137] Figure 5 This schematic diagram illustrates a structural block diagram of a device for monitoring overflows during drilling, as shown in one embodiment of this application. Figure 5 As shown in the figure, this application provides a device 500 for monitoring overflows during drilling, which may include:
[0138] The data acquisition module 510 is used to acquire the current temperature, current pressure, and current dielectric constant of the drilling fluid.
[0139] The drilling fluid dielectric constant theoretical value determination module 520 is used to determine the current drilling fluid dielectric constant theoretical value based on a pre-determined drilling fluid dielectric constant algorithm, according to the current temperature, current pressure and preset measurement frequency.
[0140] The overflow condition judgment module 530 is used to determine that the drilling fluid has overflowed when the difference between the theoretical value of the current drilling fluid dielectric constant and the measured value of the current drilling fluid dielectric constant is greater than a preset deviation threshold.
[0141] The overflow fluid content determination module 540 is used to determine the overflow fluid content of fluids other than drilling fluid in various mixed fluids based on a genetic algorithm and a pre-determined mixed fluid dielectric constant algorithm corresponding to multiple mixed fluids. According to the current temperature, current pressure, preset measurement frequency and current drilling fluid dielectric constant measurement value, the multiple mixed fluids include gas-liquid mixed fluids, oil-liquid mixed fluids and water-liquid mixed fluids.
[0142] The module 550 for determining the theoretical value of the dielectric constant of mixed fluids is used to determine multiple theoretical values of the dielectric constant of mixed fluids based on a pre-determined algorithm for the dielectric constant of multiple mixed fluids, according to the current temperature, current pressure, preset measurement frequency, and the content of each overflow fluid.
[0143] The overflow mixed fluid type determination module 560 is used to compare the theoretical values of the dielectric constants of multiple mixed fluids with the current measured values of the dielectric constants of the drilling fluid to determine the overflow mixed fluid type corresponding to the overflow phenomenon.
[0144] The aforementioned device 500 for monitoring overflow during the drilling process obtains the theoretical value of the current drilling fluid dielectric constant based on the current temperature, current pressure, and a preset measurement frequency. It determines whether an overflow has occurred based on the deviation between the measured value and the theoretical value of the current drilling fluid dielectric constant. If the deviation exceeds a preset deviation threshold, an overflow is determined to have occurred; otherwise, no overflow is determined. This allows the device to determine whether other fluids have mixed into the drilling fluid and affected the dielectric constant based solely on the deviation between the theoretical and measured values of the current drilling fluid dielectric constant, influenced only by temperature, pressure, and measurement frequency. When an overflow is detected, based on a genetic algorithm and a pre-determined algorithm for the dielectric constant of multiple mixed fluids, the content of various overflow fluids is obtained according to the current temperature, current pressure, preset measurement frequency, and current drilling fluid dielectric constant measurement value. This allows the present application to determine multiple theoretical values of the dielectric constant of mixed fluids based on the current temperature, current pressure, preset measurement frequency, and the content of various overflow fluids. By comparing the theoretical values of the dielectric constants of multiple mixed fluids with the current drilling fluid dielectric constant measurement value, the accurate type of overflow mixed fluid can be determined, thereby achieving precise monitoring of drilling fluid overflow.
[0145] In one embodiment, the mixed fluid dielectric constant theoretical value determination module 550 is further configured to: determine the theoretical value of the gas-liquid mixed fluid dielectric constant based on a pre-determined gas-liquid mixed fluid dielectric constant algorithm, according to the current temperature, current pressure, preset measurement frequency, and the gas-liquid overflow fluid content of the mixed fluid excluding drilling fluid; determine the theoretical value of the oil-liquid mixed fluid dielectric constant based on a pre-determined oil-liquid mixed fluid dielectric constant algorithm, according to the current temperature, current pressure, preset measurement frequency, and the oil-liquid overflow fluid content of the mixed fluid excluding drilling fluid; and determine the theoretical value of the water-liquid mixed fluid dielectric constant based on a pre-determined water-liquid mixed fluid dielectric constant algorithm, according to the current temperature, current pressure, preset measurement frequency, and the water-liquid overflow fluid content of the mixed fluid excluding drilling fluid.
[0146] In one embodiment, the overflow mixed fluid type determination module 560 is further configured to: determine the deviations between the theoretical values of the dielectric constants of the gas-liquid mixed fluid, the oil mixed fluid, and the water mixed fluid and the current measured value of the dielectric constant of the drilling fluid, respectively, to obtain the dielectric constant deviation values of the gas-liquid mixed fluid, the oil mixed fluid, and the water mixed fluid; determine the smallest of the dielectric constant deviation values of the gas-liquid mixed fluid, the oil mixed fluid, and the water mixed fluid, to obtain the minimum mixed fluid dielectric constant error value; and determine the mixed fluid type corresponding to the minimum mixed fluid dielectric constant error value as the overflow mixed fluid type corresponding to the overflow phenomenon.
[0147] In one embodiment, the apparatus for monitoring overflows during drilling further includes a drilling fluid dielectric constant algorithm determination module, which is used to:
[0148] A training set and a test set are obtained, which include historical drilling fluid temperature, historical drilling fluid pressure, historical drilling fluid measurement frequency, and historical drilling fluid dielectric constant measurement values. Based on the symbolic regression algorithm, the drilling fluid dielectric constant deviation corresponding to each candidate drilling fluid dielectric constant algorithm on the training set is determined. Based on a preset number of updates, multiple candidate drilling fluid dielectric constant algorithms are updated according to the drilling fluid dielectric constant deviation to obtain the drilling fluid dielectric constant algorithm. The drilling fluid dielectric constant deviation corresponding to the drilling fluid dielectric constant algorithm on the test set is less than the preset drilling fluid dielectric constant deviation.
[0149] In one embodiment, the apparatus for overflow monitoring during drilling further includes a mixed fluid dielectric constant algorithm determination module, which is configured to: acquire a training set and a test set, the training set and the test set including the historical temperature of the drilling fluid, the historical pressure of the drilling fluid, the historical measurement frequency of the drilling fluid, the historical overflow fluid content corresponding to various mixed fluids of the drilling fluid, and the historical measured value of the dielectric constant of the drilling fluid; determine the mixed fluid dielectric constant deviation corresponding to each candidate mixed fluid dielectric constant algorithm on the training set based on a symbolic regression algorithm; and update multiple candidate mixed fluid dielectric constant algorithms according to the mixed fluid dielectric constant deviation based on a preset number of updates to obtain a mixed fluid dielectric constant algorithm, wherein the mixed fluid dielectric constant deviation corresponding to the mixed fluid dielectric constant algorithm on the test set is less than the preset mixed fluid dielectric constant deviation.
[0150] In one embodiment, the overflow fluid content determination module 540 is further configured to: determine the fitness value of each candidate overflow fluid content based on a genetic algorithm, according to the mixed fluid dielectric constant algorithm, the current temperature, the current pressure, the preset measurement frequency, and the current measured value of the drilling fluid dielectric constant, wherein the fitness value is negatively correlated with the deviation between the theoretical value of the candidate mixed fluid dielectric constant obtained according to the mixed fluid dielectric constant algorithm, the current temperature, the current pressure, the preset measurement frequency, and the candidate overflow fluid content and the current measured value of the drilling fluid dielectric constant; and update the multiple candidate overflow fluid contents according to the fitness value based on a preset number of updates to obtain the overflow fluid content, wherein the overflow fluid content corresponds to the largest fitness value.
[0151] In one embodiment, the apparatus for monitoring overflows during drilling further includes a fitness value determination module, which determines the fitness value according to the following formula:
[0152]
[0153] Wherein, F(α) i F(T,p,α) represents the dielectric constant deviation of the mixed fluid corresponding to the i-th overflow fluid content. i f) represents the algorithm for the dielectric constant of various mixed fluids, where α is the dielectric constant of the mixed fluid. i Let ε be the content of the i-th overflow fluid. measured The measured value of the dielectric constant of the drilling fluid is Fitness(α). i ) represents the fitness value corresponding to the i-th overflow fluid content, T represents the current temperature, p represents the current pressure, and f represents the preset measurement frequency.
[0154] This application also provides a machine-readable storage medium storing instructions for causing a machine to perform the above-described method for overflow monitoring during drilling.
[0155] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0156] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0157] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0158] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0159] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0160] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0161] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0162] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0163] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for overflow monitoring in a drilling process, characterized by, The method comprises: obtaining a current temperature of a drilling fluid, a current pressure of the drilling fluid, and a current drilling fluid dielectric constant measurement value of the drilling fluid; determining a current drilling fluid dielectric constant theoretical value of the drilling fluid based on a predetermined drilling fluid dielectric constant algorithm according to the current temperature, the current pressure, and a preset measurement frequency; in a case where a difference between the current drilling fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value is greater than a preset deviation threshold, determining that the drilling fluid has a flowing phenomenon; based on a genetic algorithm and a predetermined mixed fluid dielectric constant algorithm corresponding to a plurality of mixed fluids, obtaining a flowing fluid content of a fluid other than the drilling fluid in each of the mixed fluids according to the current temperature, the current pressure, the preset measurement frequency, and the current drilling fluid dielectric constant measurement value, wherein the plurality of mixed fluids include a gas-liquid mixed fluid, an oil-liquid mixed fluid, and a water-liquid mixed fluid; based on a predetermined mixed fluid dielectric constant algorithm corresponding to the plurality of mixed fluids, determining a plurality of mixed fluid dielectric constant theoretical values respectively according to the current temperature, the current pressure, the preset measurement frequency, and each of the flowing fluid contents; comparing the plurality of mixed fluid dielectric constant theoretical values respectively with the current drilling fluid dielectric constant measurement value to determine a flowing mixed fluid type corresponding to the flowing phenomenon.
2. The method of claim 1, wherein, The determining a plurality of mixed fluid dielectric constant theoretical values respectively according to the current temperature, the current pressure, the preset measurement frequency, and each of the flowing fluid contents based on a predetermined mixed fluid dielectric constant algorithm corresponding to the plurality of mixed fluids comprises: based on a predetermined gas-liquid mixed fluid dielectric constant algorithm corresponding to the gas-liquid mixed fluid, determining a gas-liquid mixed fluid dielectric constant theoretical value according to the current temperature, the current pressure, the preset measurement frequency, and a gas-liquid flowing fluid content of gas other than the drilling fluid in the mixed fluid; based on a predetermined oil-liquid mixed fluid dielectric constant algorithm corresponding to the oil-liquid mixed fluid, determining an oil-liquid mixed fluid dielectric constant theoretical value according to the current temperature, the current pressure, the preset measurement frequency, and an oil-liquid flowing fluid content of oil other than the drilling fluid in the mixed fluid; based on a predetermined water-liquid mixed fluid dielectric constant algorithm corresponding to the water-liquid mixed fluid, determining a water-liquid mixed fluid dielectric constant theoretical value according to the current temperature, the current pressure, the preset measurement frequency, and a water-liquid flowing fluid content of water other than the drilling fluid in the mixed fluid.
3. The method of claim 2, wherein, The comparing the plurality of mixed fluid dielectric constant theoretical values respectively with the current drilling fluid dielectric constant measurement value to determine a flowing mixed fluid type corresponding to the flowing phenomenon comprises: determining a deviation between the gas-liquid mixed fluid dielectric constant theoretical value, the oil-liquid mixed fluid dielectric constant theoretical value, and the water-liquid mixed fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value to obtain a gas-liquid mixed fluid dielectric constant deviation value, an oil-liquid mixed fluid dielectric constant deviation value, and a water-liquid mixed fluid dielectric constant deviation value; determining a minimum value among the dielectric constant deviation of the gas-liquid mixed fluid, the dielectric constant deviation of the oil-liquid mixed fluid, and the dielectric constant deviation of the water-liquid mixed fluid to obtain a minimum mixed fluid dielectric constant error value; determining a mixed fluid type corresponding to the minimum mixed fluid dielectric constant error value as a overflow mixed fluid type corresponding to the overflow phenomenon.
4. The method of claim 1, wherein, The determination of the drilling fluid dielectric constant algorithm includes: obtaining a training set and a test set, the training set and the test set including historical temperature of the drilling fluid, historical pressure of the drilling fluid, historical measurement frequency of the drilling fluid, and historical drilling fluid dielectric constant measurement value of the drilling fluid; determining, based on a symbolic regression algorithm, a drilling fluid dielectric constant deviation corresponding to each candidate drilling fluid dielectric constant algorithm on the training set; updating, based on a preset number of updates, a plurality of the candidate drilling fluid dielectric constant algorithms according to the drilling fluid dielectric constant deviation to obtain a drilling fluid dielectric constant algorithm, wherein the drilling fluid dielectric constant deviation corresponding to the drilling fluid dielectric constant algorithm on the test set is less than a preset drilling fluid dielectric constant deviation.
5. The method of claim 1, wherein, The determination of the drilling fluid dielectric constant algorithm includes: obtaining a training set and a test set, the training set and the test set including historical temperature of the drilling fluid, historical pressure of the drilling fluid, historical measurement frequency of the drilling fluid, and historical drilling fluid dielectric constant measurement value of the drilling fluid; determining, based on a symbolic regression algorithm, a drilling fluid dielectric constant deviation corresponding to each candidate drilling fluid dielectric constant algorithm on the training set; updating, based on a preset number of updates, a plurality of the candidate drilling fluid dielectric constant algorithms according to the drilling fluid dielectric constant deviation to obtain a drilling fluid dielectric constant algorithm, wherein the drilling fluid dielectric constant deviation corresponding to the drilling fluid dielectric constant algorithm on the test set is less than a preset drilling fluid dielectric constant deviation.
6. The method of claim 1, wherein, The determination of the drilling fluid dielectric constant algorithm includes: obtaining a training set and a test set, the training set and the test set including historical temperature of the drilling fluid, historical pressure of the drilling fluid, historical measurement frequency of the drilling fluid, and historical drilling fluid dielectric constant measurement value of the drilling fluid; determining, based on a symbolic regression algorithm, a drilling fluid dielectric constant deviation corresponding to each candidate drilling fluid dielectric constant algorithm on the training set; updating, based on a preset number of updates, a plurality of the candidate drilling fluid dielectric constant algorithms according to the drilling fluid dielectric constant deviation to obtain a drilling fluid dielectric constant algorithm, wherein the drilling fluid dielectric constant deviation corresponding to the drilling fluid dielectric constant algorithm on the test set is less than a preset drilling fluid dielectric constant deviation. The determination of the drilling fluid dielectric constant algorithm includes: obtaining a training set and a test set, the training set and the test set including historical temperature of the drilling fluid, historical pressure of the drilling fluid, historical measurement frequency of the drilling fluid, and historical drilling fluid dielectric constant measurement value of the drilling fluid; determining, based on a symbolic regression algorithm, a drilling fluid dielectric constant deviation corresponding to each candidate drilling fluid dielectric constant algorithm on the training set; updating, based on a preset number of updates, a plurality of the candidate drilling fluid dielectric constant algorithms according to the drilling fluid dielectric constant deviation to obtain a drilling fluid dielectric constant algorithm, wherein the drilling fluid dielectric constant deviation corresponding to the drilling fluid dielectric constant algorithm on the test set is less than a preset drilling fluid dielectric constant deviation. The determination of the drilling fluid dielectric constant algorithm includes: obtaining a training set and a test set, the training set and the test set including historical temperature of the drilling fluid, historical pressure of the drilling fluid, historical measurement frequency of the drilling fluid, and historical drilling fluid dielectric constant measurement value of the drilling fluid; determining, based on a symbolic regression algorithm, a drilling fluid dielectric constant deviation corresponding to each candidate drilling fluid dielectric constant algorithm on the training set; updating, based on a preset number of updates, a plurality of the candidate drilling fluid dielectric constant algorithms according to the drilling fluid dielectric constant deviation to obtain a drilling fluid dielectric constant algorithm, wherein the drilling fluid dielectric constant deviation corresponding to the drilling fluid dielectric constant algorithm on the test set is less than a preset drilling fluid dielectric constant deviation. Based on a preset number of updates, the plurality of candidate overflow fluid contents are updated according to the fitness values to obtain an overflow fluid content, wherein the overflow fluid content corresponds to the maximum fitness value.
7. The method of claim 6, wherein, The fitness value is determined according to the following formula: F(a i ) = [F(T, p, a i , f) - e measured ] 2 + max(-a i , 0) + max(a i - 1, 0) wherein F (a i ) is a dielectric constant deviation value of the i-th overflow fluid content corresponding to the mixed fluid, F (T, p, a i , f) is a mixed fluid dielectric constant algorithm corresponding to the plurality of mixed fluids, a i is the i-th overflow fluid content, ε measured is the current drilling fluid dielectric constant measurement value, Fitness (a i ) is a fitness value corresponding to the i-th overflow fluid content, T is the current temperature, p is the current pressure, and f is the preset measurement frequency.
8. A processor, comprising: The machine readable storage medium has instructions stored thereon for causing a machine to perform the method for overflow monitoring in a drilling process according to any one of claims 1 to 7.
9. An apparatus for overflow monitoring in a drilling process, characterized by Comprise: A data acquisition module for acquiring a current temperature of a drilling fluid, a current pressure of the drilling fluid, and a current drilling fluid dielectric constant measurement value of the drilling fluid; A drilling fluid dielectric constant theoretical value determination module for determining a current drilling fluid dielectric constant theoretical value of the drilling fluid based on a predetermined drilling fluid dielectric constant algorithm according to the current temperature, the current pressure, and a preset measurement frequency; An overflow condition judgment module for determining that the drilling fluid has an overflow phenomenon when a difference between the current drilling fluid dielectric constant theoretical value and the current drilling fluid dielectric constant measurement value is greater than a preset deviation threshold value; An overflow fluid content determination module for obtaining an overflow fluid content in each of a plurality of mixed fluids based on a genetic algorithm and a predetermined mixed fluid dielectric constant algorithm corresponding to the plurality of mixed fluids according to the current temperature, the current pressure, the preset measurement frequency, and the current drilling fluid dielectric constant measurement value, wherein the plurality of mixed fluids include gas-liquid mixed fluids, oil-liquid mixed fluids, and water-liquid mixed fluids; A mixed fluid dielectric constant theoretical value determination module for determining a plurality of mixed fluid dielectric constant theoretical values based on a predetermined mixed fluid dielectric constant algorithm corresponding to the plurality of mixed fluids according to the current temperature, the current pressure, the preset measurement frequency, and each of the overflow fluid contents, respectively; An overflow mixed fluid type determination module for comparing the plurality of mixed fluid dielectric constant theoretical values with the current drilling fluid dielectric constant measurement value, respectively, to determine an overflow fluid type corresponding to the overflow phenomenon.
10. A machine-readable storage medium, characterized in that, The machine readable storage medium has instructions stored thereon for causing a machine to perform the method for overflow monitoring in a drilling process according to any one of claims 1 to 7.
Citation Information
Patent Citations
System and method for monitoring overflow state of shaft
CN118361227A
Method and equipment for optimizing hydraulic parameters of deepwater managed pressure drilling in real time
US11203922B1