Machine learning assisted in-situ monitoring method and device for working fluid system
By using machine learning-assisted methods, combined with ultrasonic signal and model analysis, the components and concentrations of the well fluid system are identified, solving the problem of inaccurate monitoring in existing technologies. This enables real-time monitoring and timely remediation of the well fluid system, improving the safety and economic efficiency of drilling operations.
Patent Information
- Application Number
- CN202511553471.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-10-29
AI Technical Summary
Existing technologies cannot monitor the properties of each component of the well fluid system in real time and accurately, which makes it impossible to take remedial measures in a timely manner, affecting the safety, efficiency and economic benefits of drilling operations.
A machine learning-assisted approach was adopted, combining ultrasonic signals and machine learning models, to analyze the signal characteristics of the well fluid system, identify components, and determine concentrations and viscosities. This included analysis using random forest models, support vector machines, and neural network models.
It enables real-time and accurate performance monitoring of the well fluid system, allowing for timely remedial measures to ensure the safety, efficiency, and economic benefits of drilling operations.
Smart Images

Figure CN121027340A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of testing or analyzing materials by measuring the chemical or physical properties of the materials, and in particular, to a machine learning assisted in-situ monitoring method and device for well fluid systems. BACKGROUND
[0002] Well fluid system refers to all fluids pumped into the wellbore (i.e., drilled holes) for circulation in oil and gas drilling operations. The well fluid system is crucial for the exploration and development of oil and gas, and the performance (such as concentration, viscosity, etc.) of each component contained in the well fluid system is directly related to the safety, efficiency and economic benefits of the oil and gas production process.
[0003] However, the existing technology has limited monitoring methods for the performance of the well fluid, and cannot monitor the performance of each component contained in the well fluid system in real time and accurately, so it cannot ensure that timely remedial measures are taken when the performance of the well fluid system is not conducive to drilling operations, thereby ensuring the safety, efficiency and economic benefits of the production process. SUMMARY
[0004] The present application proposes a machine learning assisted in-situ monitoring method and device for well fluid systems, which combines the ultrasonic signals of the target well fluid system and the machine learning model to analyze the signal characteristics of the ultrasonic signals of the target well fluid system, and obtains the various components contained in the target well fluid system and the concentration and viscosity of each component, thereby achieving real-time and relatively accurate monitoring of the performance of the well fluid system, so that timely remedial measures can be taken when the performance of the well fluid system is not conducive to drilling operations, thereby ensuring the safety, efficiency and economic benefits of the production process.
[0005] In order to achieve the above purpose, the present application adopts the following technical solutions: In a first aspect, the present application provides a machine learning assisted in-situ monitoring method for a well fluid system, comprising: processing an ultrasonic signal of a target well fluid system to determine signal features of the ultrasonic signal; wherein the signal features of the ultrasonic signal include time domain features, frequency domain features, and statistical features; determining, according to the signal features of the ultrasonic signal and a first signal feature analysis model, a plurality of components contained in the target well fluid system; the first signal feature analysis model is trained based on a classifier model; determining, based on the signal features of the ultrasonic signal, the plurality of components in the target well fluid system, and a second signal feature analysis model, a concentration of each component in the plurality of components of the target well fluid system; the second signal feature analysis model is trained based on a classifier model; and determining, based on the signal features of the ultrasonic signal, the plurality of components in the target well fluid system, and a third signal feature analysis model, a viscosity of each component in the plurality of components of the target well fluid system; the third signal feature analysis model is trained based on a classifier model or a neural network model.
[0006] In an implementation form of the first aspect, the determining the plurality of components contained in the target well fluid system comprises: inputting the signal features of the ultrasonic signal into the first signal feature analysis model, the first signal feature analysis model analyzes the signal features of the ultrasonic signal, and outputs the plurality of components contained in the target well fluid system and the signal features of the ultrasonic signal corresponding to each component in the plurality of components; wherein the first signal feature analysis model is trained based on a random forest model.
[0007] In an implementation form of the first aspect, the determining the concentration of each component in the plurality of components of the target well fluid system comprises: for each component in the plurality of components, inputting the component and the signal features of the ultrasonic signal corresponding to the component into the second signal feature analysis model, the second signal feature analysis model analyzes the component and the signal features of the ultrasonic signal corresponding to the component, and outputs the concentration of the component; the second signal feature analysis model is trained based on a support vector machine.
[0008] In an implementation form of the first aspect, the determining the viscosity of each component in the plurality of components of the target well fluid system comprises: for each component in the plurality of components, inputting the component and the signal features of the ultrasonic signal corresponding to the component into the third signal feature analysis model, the third signal feature analysis model analyzes the component and the signal features of the ultrasonic signal corresponding to the component, and outputs the viscosity of the component; the third signal feature analysis model is trained based on a classifier model.
[0009] In an implementation form of the first aspect, the classifier model based on which the third signal feature analysis model is based on is an XGBoost model, a random forest model, a LightGBM model, or a decision tree.
[0010] In an implementation form of the first aspect, determining the viscosity of each component of the plurality of components of the target drilling well fluid system comprises: inputting the plurality of components and the signal features of the ultrasonic signal into a third signal feature analysis model, the third signal feature analysis model analyzing the plurality of components and the signal features of the ultrasonic signal, and outputting the viscosity of each component of the plurality of components of the target drilling well fluid system; the third signal feature analysis model is trained based on a neural network model.
[0011] In a second aspect, the present application provides a machine learning assisted well fluid system in-situ monitoring device for implementing the method provided in the first aspect, comprising a signal feature determination module, a component identification module, a concentration determination module, and a viscosity determination module. The signal feature determination module is configured to process the ultrasonic signal of the target drilling well fluid system and determine the signal features of the ultrasonic signal; wherein the signal features of the ultrasonic signal comprise time domain features, frequency domain features, and statistical features. The component identification module is configured to determine the plurality of components contained in the target drilling well fluid system according to the signal features of the ultrasonic signal and a first signal feature analysis model based on a classifier model; the first signal feature analysis model is trained based on the classifier model. The concentration determination module is configured to determine the concentration of each component of the plurality of components of the target drilling well fluid system based on the signal features of the ultrasonic signal, the plurality of components in the target drilling well fluid system, and a second signal feature analysis model; the second signal feature analysis model is trained based on the classifier model. The viscosity determination module is configured to determine the viscosity of each component of the plurality of components of the target drilling well fluid system based on the signal features of the ultrasonic signal, the plurality of components in the target drilling well fluid system, and a third signal feature analysis model; the third signal feature analysis model is trained based on the classifier model or a neural network model.
[0012] In an implementation form of the first aspect and the second aspect, the time domain features comprise peak amplitude, rise time, pulse width, and echo attenuation rate; the frequency domain features comprise main frequency, bandwidth, and spectral centroid; and the statistical features comprise root mean square value, peak factor, skewness, and kurtosis.
[0013] In a third aspect, the present application provides an electronic device comprising a processor and a memory coupled to the processor; the memory is configured to store computer instructions, and when the electronic device is running, the processor executes the computer instructions stored in the memory to enable the electronic device to perform the method as described in the first aspect or any implementation form thereof.
[0014] In a fourth aspect, the present application provides a computer-readable storage medium, including computer program instructions, when the computer program instructions are executed by a computer, causing the computer to perform the method in the first aspect or any of the implementation forms thereof.
[0015] In a fifth aspect, the present application provides a computer program product, including computer program instructions, when the computer program instructions are executed on a computer, causing the computer to perform the method in the first aspect or any of the implementation forms thereof.
[0016] The technical effects of the second aspect to the fifth aspect and the possible implementation forms thereof correspond to the description of the technical effects of the first aspect and the possible implementation forms thereof, which will not be described here.
[0017] Compared with the prior art, the present application has the following beneficial effects.
[0018] The machine learning assisted in-hole fluid system in-situ monitoring method provided by the present application first analyzes the ultrasonic signal of the target drilling in-hole fluid system to obtain the signal characteristics of the ultrasonic signal, and then obtains the multiple components contained in the in-hole fluid system through the signal characteristics and the first signal characteristic analysis model, and analyzes the signal characteristics of the ultrasonic signal and the multiple components by using the second signal characteristic analysis model and the third signal characteristic analysis model respectively to obtain the concentration and viscosity of each component in the multiple components contained in the target drilling in-hole fluid system, thereby realizing real-time and relatively accurate monitoring of the performance of the in-hole fluid system, so as to ensure that timely remedial measures are taken in the case that the performance of the in-hole fluid system is not conducive to drilling operations, thereby ensuring the safety, operation efficiency and economic benefit of the exploitation process. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 is one of the machine learning assisted in-hole fluid system in-situ monitoring method provided by the embodiments of the present application; Figure 2 is an importance ranking diagram of the signal characteristics of the ultrasonic signal provided by the embodiments of the present application; Figure 3 is another machine learning assisted in-hole fluid system in-situ monitoring method provided by the embodiments of the present application; Figure 4 is an accuracy diagram of the three classifier models for in-hole fluid component identification provided by the embodiments of the present application; Figure 5 is a third machine learning assisted in-hole fluid system in-situ monitoring method provided by the embodiments of the present application; Figure 6is a schematic diagram of prediction accuracy of four machine learning regression models provided by the embodiment of the application on the concentration of guar gum-based fracturing fluid; Figure 7 is a fourth schematic diagram of a machine learning-assisted in-hole fluid system in-situ monitoring method provided by the embodiment of the application; Figure 8 is a fifth schematic diagram of a machine learning-assisted in-hole fluid system in-situ monitoring method provided by the embodiment of the application; Figure 9 is a schematic diagram of prediction accuracy of four machine learning regression models provided by the embodiment of the application on the viscosity of guar gum-based fracturing fluid; Figure 10 is a first schematic diagram of prediction accuracy of a CNN model provided by the embodiment of the application on the viscosity of guar gum-based fracturing fluid; Figure 11 is a schematic diagram of attention of a CNN model provided by the embodiment of the application on an ultrasonic signal; Figure 12 is a second schematic diagram of prediction accuracy of a CNN model provided by the embodiment of the application on the viscosity of guar gum-based fracturing fluid; Figure 13 is a schematic diagram of a machine learning-assisted in-hole fluid system in-situ monitoring device provided by the embodiment of the application. DETAILED DESCRIPTION
[0020] In the specification and claims of the present application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of the objects.
[0021] In the embodiment of the present application, "and / or" represents the relationship between the objects, for example, A and / or B can represent the following three cases: A exists alone, B exists alone, and A and B exist together.
[0022] In the embodiment of the present application, the words such as "exemplary" or "for example" are used to represent as an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiment of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words such as "exemplary" or "for example" are intended to present the relevant concept in a specific manner.
[0023] In the description of the present application, unless otherwise specified, "a plurality of" means two or more. For example, a plurality of components means two or more components.
[0024] The method and device provided by the embodiment of the present application relate to in-hole fluid system monitoring, and can be used for real-time monitoring of the concentration and viscosity of each component contained in the in-hole fluid system.
[0025] It can be understood that the well fluid system includes drilling fluid, fracturing fluid and other functional liquid. In the process of participating in oil and gas exploration and development, the well fluid can carry and suspend cuttings to prevent hole plugging, can stabilize the well wall to avoid collapse, and also has the functions of cooling, lubricating the drill bit, controlling the formation pressure and improving the permeability of the production layer. The performance of the well fluid (such as concentration, viscosity, etc.) will directly affect the safety, efficiency and economic benefit of the oil and gas production process.
[0026] In actual application scenarios, the composition and performance parameters (such as component ratio, concentration, viscosity and stability, etc.) of the well fluid will change constantly. For example, when the concentration of some chemical components decreases, the cuttings carrying capacity of the well fluid will weaken; the change of viscosity will affect the circulation efficiency and pressure transmission; if some additive components fail, it may also cause the decrease of well wall stability. Once these performance indicators appear abnormal, it is easy to cause well wall instability, blowout, increased drill bit wear, decreased operation efficiency and other problems in a short time. Therefore, real-time and accurate in-situ monitoring of the composition and physicochemical properties of the well fluid is of great significance to ensure the safety and continuity of the oil and gas production process.
[0027] Therefore, real-time monitoring of the performance of the well fluid during drilling operation can take timely remedial measures when the performance of the well fluid is not conducive to drilling operation, thereby ensuring the safety, efficiency and economic benefit of the production process.
[0028] At present, the in-situ monitoring of the well fluid mainly uses contact sensors to obtain macro physicochemical parameters such as temperature, pressure, pH, conductivity and turbidity. For example, some schemes arrange temperature sensors inside the liquid outlet pipe to monitor the temperature of the well fluid; some technologies use turbidity meters and conductivity detectors to measure turbidity, conductivity and total organic carbon. However, this kind of method has obvious shortcomings: on the one hand, the contact sensor is easy to wear and contaminate in the long-term use process, resulting in signal attenuation, precision decline and insufficient reliability; on the other hand, the monitoring parameter range is limited, only the temperature, pH and other conventional properties of the well fluid can be obtained, and it is difficult to realize the recognition and quantification of the changes of different chemical components and their concentrations. At present, if the components and concentrations of the well fluid need to be analyzed, the sample usually needs to be taken out and sent to the laboratory for testing by using large-scale detection instruments such as liquid chromatograph and mass spectrometer. This not only consumes time and effort, but also has high cost, and the detection result is lagging behind, which is difficult to meet the demand of real-time monitoring on site.
[0029] To solve the problem in the background art that the prior art has limited monitoring methods for the performance of the well fluid, cannot monitor the performance of each component contained in the well fluid system in real time and accurately, thus cannot ensure timely remedial measures are taken in the case that the performance of the well fluid system is not conducive to drilling operations, and thus cannot ensure the safety, operation efficiency and economic benefits of the mining process, the embodiments of the present application provide a machine learning assisted in-situ monitoring method and device for a well fluid system, which can analyze the signal characteristics of the ultrasonic signal of the target well fluid system for drilling by combining the ultrasonic signal of the target well fluid system for drilling and a machine learning model, and obtain the multiple components contained in the target well fluid system for drilling and the concentration and viscosity of each component, thereby realizing real-time and relatively accurate monitoring of the performance of the well fluid system, so as to ensure that timely remedial measures are taken in the case that the performance of the well fluid system is not conducive to drilling operations, and thus ensure the safety, operation efficiency and economic benefits of the mining process.
[0030] For example, the machine learning assisted in-situ monitoring device for a well fluid system provided by the embodiments of the present application can be executed by an electronic device with processing function, for example, the electronic device can be a computer, a server, etc. Taking the computer as an example, the hardware part of the computer can include a processor, a memory, a network interface, a user interface, a communication bus, etc.
[0031] The processor is configured to control the electronic device to perform related processing and calculation tasks, for example, processing the ultrasonic signal, determining the multiple components contained in the well fluid system, determining the concentration and viscosity of each component in the multiple components, etc. The processor can include a central processing unit (CPU) or other processors, and the processor can be single-core or multi-core, for example, the processor can include multiple CPUs.
[0032] The memory is configured to store computer instructions and related data, for example, store the ultrasonic signal, the signal characteristics of the ultrasonic signal, the multiple components, and the concentration and viscosity of each component, etc. The memory can be a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM), a flash memory, or an optical storage, a magnetic disk storage medium or other magnetic storage device, or any other medium capable of storing program codes or data accessible by a computer. Optionally, the memory can be integrated in the processor, and the memory can also be independent of the processor.
[0033] The network interface is used for communication between the computer and other devices or communication networks, and can be a transceiver with transceiving function. Optionally, the network interface can include a standard wired interface, a wireless interface (such as a WI-FI interface, a Bluetooth interface, a 5G interface), etc.
[0034] The communication bus is used to realize the connection and communication between different components, for example, the above-mentioned processor, memory, network interface and user interface can be interconnected through the communication bus.
[0035] The user interface can include a display screen, an input unit (such as a keyboard), and optionally, the user interface can also include a standard wired interface, a wireless interface.
[0036] Those skilled in the art can understand that the above computer can also include more or fewer components, or combine certain components, or different component arrangements, which are not limited in the embodiments of the present application.
[0037] As shown in Figure 1 The machine learning assisted in-situ monitoring method for drilling fluid system provided by the embodiments of the present application includes S101-S104. S101, processing the ultrasonic signal of the target drilling fluid system to determine the signal characteristics of the ultrasonic signal. In the embodiments of the present application, the ultrasonic signal of the target drilling fluid system is obtained by using an ultrasonic time-domain device (UTDR); in some embodiments, the ultrasonic signal is automatically collected, and the shortest collection interval time is 2s; the collection table is stored in the format of CSV, and records the time, voltage, sampling frequency and other information of the waveform; the embodiments of the present application do not make specific requirements on the ultrasonic signal collection method. The signal characteristics of the ultrasonic signal include time domain characteristics, frequency domain characteristics and statistical characteristics; the time domain characteristics include peak amplitude, rise time, pulse width and echo attenuation rate, etc., the frequency domain characteristics include main frequency, bandwidth and spectral centroid, etc., and the statistical characteristics include root mean square value, peak factor, skewness and kurtosis, etc. It can be understood that, in the above time domain features, the peak amplitude refers to the maximum amplitude value of the ultrasonic signal, reflecting the energy intensity of the ultrasonic signal; the rise time refers to the time taken for the ultrasonic signal to rise from 10% of the intensity of the peak signal to 90% of the intensity of the peak signal, reflecting the steepness of the ultrasonic signal; the pulse width refers to the time length of the ultrasonic signal exceeding 50% of the intensity of the peak signal, reflecting the persistence of the energy of the ultrasonic signal; the echo attenuation rate refers to the amplitude attenuation rate of the first peak and the second peak (i.e. the echo) of the ultrasonic signal, which is related to the viscosity and density of the propagation medium (i.e. the well fluid system); The above frequency domain features refer to performing a Fast Fourier Transform (FFT) on the ultrasonic signal to convert the ultrasonic signal from a time domain signal to a frequency domain signal; the dominant frequency refers to the frequency corresponding to the point with the largest amplitude in the frequency spectrum of the ultrasonic signal, reflecting the most dominant frequency of the ultrasonic signal; the bandwidth refers to the width of the frequency corresponding to the amplitude greater than -3db in the frequency spectrum of the ultrasonic signal; the spectral centroid refers to the frequency obtained by energy-weighted averaging of the ultrasonic signal within a certain frequency range, indicating the center position of the frequency spectrum of the ultrasonic signal; The above statistical features are the distribution of the amplitude values of the ultrasonic signal, describing the overall shape and randomness of the ultrasonic signal; the root mean square value refers to the square root of the average value obtained by summing the squares of all amplitude values of the ultrasonic signal within a certain time, used to measure the average energy of the ultrasonic signal; the crest factor is a dimensionless parameter for measuring the degree of sharp peaks of the waveform of the ultrasonic signal, defined as the ratio of the peak value of the signal to its root mean square value; the skewness is used to measure the degree of asymmetry of the probability distribution of the amplitude of the ultrasonic signal, and a skewness of 0 indicates that the ultrasonic signal is symmetrically distributed; the kurtosis is used to measure the "peak" degree of the probability distribution of the amplitude of the ultrasonic signal, and a high kurtosis value indicates that the amplitude distribution of the ultrasonic signal is sharper than a Gaussian distribution; For the classifier model, the importance ranking of the above signal features of the ultrasonic signal is as follows: Figure 2As shown, the sequence is Echo Attenuation, Root Mean Square, Crest Factor, Spectral Centroid, Kurtosis, Temperature, Peak Amplitude, Skewness, Bandwidth, Dorninant Frequency, and Concentration; It should be noted that, since processing the ultrasonic signal to obtain the signal features of the ultrasonic signal is a commonly used technical means in the technical field, the specific process of the above ultrasonic signal processing will not be described further in the embodiments of the present application. S102, determining the multiple components contained in the target drilling well entry fluid system according to the signal features of the ultrasonic signal and the first signal feature analysis model; The first signal feature analysis model is trained based on a classifier model; Optionally, the multiple components can include pure water, guar gum, xanthan gum, crosslinking agent, and drilling fluid. In one implementation manner, the first signal feature analysis model is trained based on a random forest model. Figure 1 As shown in the figure, the sequence is Echo Attenuation, Root Mean Square, Crest Factor, Spectral Centroid, Kurtosis, Temperature, Peak Amplitude, Skewness, Bandwidth, Dorninant Frequency, and Concentration. Figure 3 The S102 includes S1021. S1021, inputting the signal features of the ultrasonic signal into the first signal feature analysis model, the first signal feature analysis model analyzing the signal features of the ultrasonic signal, and outputting the multiple components contained in the target drilling well entry fluid system and the signal features of the ultrasonic signal corresponding to each component in the multiple components. Therefore, the input content of the first signal feature analysis model is the signal features of the ultrasonic signal of the target drilling well entry fluid system, and the output content of the first signal feature analysis model is the multiple components contained in the target drilling well entry fluid system and the signal features of the ultrasonic signal corresponding to each component in the multiple components. In the embodiments of the present application, the first signal feature analysis model is trained based on a random forest model; specifically, the random forest model is trained using a first training data set to obtain the first signal feature analysis model; the first training data set can include multiple ultrasonic signals of multiple drilling well entry fluid systems, multiple components contained in the drilling well entry fluid systems corresponding to the multiple ultrasonic signals, the concentration and viscosity of each component in the multiple components, and the signal features of the ultrasonic signal corresponding to each component in the multiple components; since the training process of the random forest model is commonly known in the technical field, the training process of the random forest model will not be described in the embodiments of the present application. The following takes the various components of the well fluid system as an example, including pure water, guar gum, xanthan gum, crosslinking agent, and drilling fluid, to give the process of selecting the random forest model as the base model of the first signal feature analysis model in the embodiments of the application; Step 1, constructing an ultrasonic signal database of various components of the well fluid system; The ultrasonic signal database contains 5 components of the well fluid system: pure water, guar gum, xanthan gum, crosslinking agent, and drilling fluid. Under 7 temperature conditions of 10°C, 15°C, 20°C, 25°C, 30°C, 35°C, and 40°C, and 6 concentration conditions of 0.2%, 0.4%, 0.6%, 0.8%, 1.0%, and 1.2%, a plurality of ultrasonic signals obtained by continuously collecting 100 data under each condition; the ultrasonic signal database contains 4200 ultrasonic signals of each single component; Step 2, then processing the above 4200 ultrasonic signals, analyzing the time domain features (such as wave peak, rise time, pulse width, echo attenuation rate), frequency domain features (main frequency, bandwidth, spectral centroid), and statistical features (root mean square value, peak factor, skewness, kurtosis) of the ultrasonic signals, and arranging the time domain features, frequency domain features, statistical features, and component names of the 4200 ultrasonic signals to obtain an ultrasonic signal feature database; Step 3, taking the ultrasonic signal features of the well fluid system as input and the well fluid components as output, constructing three classifier models: random forest model, decision tree, and gradient boosting decision tree; Step 4, using the ultrasonic signal feature database obtained in step 2 to train the three classifier models constructed in step 3 to obtain the trained random forest model, decision tree, and gradient boosting decision tree; Step 5, randomly extracting the time domain features, frequency domain features, statistical features, and component names of a plurality of ultrasonic signals from the ultrasonic signal feature database obtained in step 2, and testing the above trained random forest model, decision tree, and gradient boosting decision tree respectively; Specifically, as shown in Figure 4 The accuracy rate of the three classifier models for identifying the well fluid components (corresponding to the area under the ROC curve, AUC) is shown in Table 1. Figure 4The accuracy scores are as follows: Random Forest model 0.88, Gradient Boosting Decision Tree 0.85, and Decision Tree 0.73. Understandably, the Random Forest model performs best among all metrics, with an F1-score of 0.87, indicating that the model has high accuracy and good balance in distinguishing components. In addition, the Precision and Recall values of the Random Forest model are close, indicating that the output results of the Random Forest model on positive and negative samples are very balanced, with fewer false positives and false negatives, and it can effectively identify component waveforms and distinguish non-component waveforms. S103. Based on the signal characteristics of ultrasonic signals, multiple components in the target drilling fluid system, and the second signal characteristic analysis model, determine the concentration of each component in the multiple components of the target drilling fluid system; The aforementioned second signal feature analysis model is obtained based on a classifier model trained. For example, in combination Figure 3 ,like Figure 5 As shown, S103 above includes S1031; S1031. For each component in the multiple components, the signal features corresponding to the component in the signal features of the component and the ultrasound signal are input into the second signal feature analysis model. The second signal feature analysis model analyzes the signal features corresponding to the component in the signal features of the component and the ultrasound signal and outputs the concentration of the component. As can be seen from the above, the input of the above second signal feature analysis model is the signal feature corresponding to the component in the signal features of the component and the ultrasound signal, and the output of the above second signal feature analysis model is the concentration of the component; In this embodiment, the second signal feature analysis model is obtained based on support vector machine training. Specifically, the second training dataset is used to train the support vector machine to obtain the second signal feature analysis model. The second training dataset may include multiple components contained in the drilling fluid system, the ultrasonic characteristics of each component, and the concentration of each component. Since the training process of the support vector machine is common knowledge in this technical field, this embodiment will not elaborate on the training process of the support vector machine. The following example uses a guar gum-based fracturing fluid to illustrate the process of selecting a support vector machine as the base model for the second signal feature analysis model in this application. Step 1: Construct a database of ultrasonic signals for guar gum-based fracturing fluids; The above-mentioned guanidine gel-based fracturing fluid ultrasonic signal database comprises 1400 ultrasonic signals obtained by continuously collecting 200 ultrasonic signals for each of the 7 concentrations of 0.002 g / L, 0.005 g / L, 0.01 g / L, 0.02 g / L, 0.1 g / L, 0.2 g / L and 0.3 g / L of the guanidine gel-based fracturing fluid; Step 2, the above-mentioned 1400 ultrasonic signals are processed, the time domain characteristics, frequency domain characteristics and statistical characteristics of the ultrasonic signals are analyzed, and the time domain characteristics, frequency domain characteristics, statistical characteristics and concentrations of the 1400 ultrasonic signals are sorted to obtain a guanidine gel-based fracturing fluid ultrasonic signal feature database; Step 3, taking the ultrasonic signal features of the guanidine gel-based fracturing fluid of the well fluid system as the input and the concentration of the guanidine gel-based fracturing fluid as the output, four machine learning regression models of support vector machine (SVM), random forest model (RF), decision tree (DT) and eXtreme gradient boosting tree (XGBoost) are constructed; Step 4, the four machine learning regression models constructed in step 3 are trained using the guanidine gel-based fracturing fluid ultrasonic signal feature database obtained in step 2 to obtain the four trained machine learning regression models; Step 5, a plurality of ultrasonic signal features and concentrations are randomly extracted from the guanidine gel-based fracturing fluid ultrasonic signal feature database obtained in step 2, and the four trained machine learning regression models are tested respectively; Specifically, the prediction performance of the four trained machine learning regression models is evaluated by using the coefficient of determination (R²) and the root mean squared error (RMSE); the four trained machine learning regression models all show good prediction performance in the task of predicting the concentration of the guanidine gel-based fracturing fluid; among them, as shown in the table, the support vector machine has the optimal prediction performance, with the highest R² value of 0.824 and the lowest RMSE value of 0.367; indicating that the model has high fitting degree and prediction accuracy; Figure 6 It should be noted that the guanidine gel-based fracturing fluid of the above-mentioned 7 concentrations is prepared by the same method except that the concentration of guanidine gel is different; all are prepared by adding 0.3% volume mass fraction of crosslinking agent after constant temperature stirring in 80°C ultrapure water for 4h; the coefficient of determination R 2 reflects the goodness of the model fitting, and its range is from 0 to 1, R 2 The closer to 1, the higher the model's explanatory power for the variables and the better the model fit; the root mean square error (RMSE) measures the standard deviation between the predicted value and the true value. The smaller the RMSE value, the higher the model's prediction accuracy. S104. Based on the signal characteristics of ultrasonic signals, multiple components in the target drilling fluid system, and the third signal characteristic analysis model, determine the viscosity of each component in the target drilling fluid system. The third signal feature analysis model is obtained by training a classifier model or a neural network model. In one implementation, combined with Figure 5 ,like Figure 7 As shown, S104 includes S1041; S1041. For each component in the multiple components, the signal features corresponding to the component in the signal features of the component and the ultrasonic signal are input into the third signal feature analysis model. The third signal feature analysis model analyzes the signal features corresponding to the component in the signal features of the component and the ultrasonic signal and outputs the viscosity of the component. The aforementioned third signal feature analysis model is trained based on a classifier model; optionally, the classifier model on which the aforementioned third signal feature analysis model is based is an XGBoost model, a random forest model, a LightGBM model, or a decision tree. In another implementation method, combined with Figure 5 ,like Figure 8 As shown, S104 includes S1042; S1042. Input the signal characteristics of multiple components and ultrasonic signals into the third signal characteristic analysis model. The third signal characteristic analysis model analyzes the signal characteristics of multiple components and ultrasonic signals and outputs the viscosity of each component in the target drilling fluid system. The aforementioned third signal feature analysis model is obtained by training a neural network model (CNN); Specifically, a third signal feature analysis model is obtained by training an XGBoost model, a random forest model, a LightGBM model, a decision tree model, or a neural network model using a third training dataset. The third training dataset may include multiple components contained in the drilling fluid system, the ultrasonic characteristics of each component, and the viscosity of each component. Since the training process of the above model is common knowledge in this technical field, the embodiments of this application will not elaborate on the training process of the above model. The following example uses a guar gum-based fracturing fluid to illustrate the process of selecting XGBoost, Random Forest, LightGBM, Decision Tree, or Neural Network (CNN) models as the base models for the third signal feature analysis model in this application. Step 1, constructing a fracturing fluid ultrasonic signal database; The fracturing fluid ultrasonic signal database contains 15 concentrations selected at a concentration interval of 0.02 g / L in the concentration range of 0.3 g / L to 0.6 g / L, and 100 stable ultrasonic signals of guanidine-based fracturing fluid are collected at each concentration. A total of 1500 ultrasonic signals and 1500 viscosity corresponding to each signal are obtained by continuously collecting 20 viscosity data by a rotational viscometer; Step 2, then the above 1500 ultrasonic signals are processed, the time domain characteristics, frequency domain characteristics and statistical characteristics of the ultrasonic signals are analyzed, and the fracturing fluid ultrasonic signal characteristic database is obtained by arranging the 1500 ultrasonic signals, the time domain characteristics, frequency domain characteristics, statistical characteristics and viscosity of the 1500 ultrasonic signals; Step 3, constructing XGBoost model, random forest model, LightGBM model, decision tree and neural network model (CNN) a total of 5 kinds of machine learning regression models; wherein, the input of XGBoost model, random forest model, LightGBM model, decision tree is the signal characteristics of the ultrasonic signal of the guanidine-based fracturing fluid of the well fluid system, and the output is the viscosity of the guanidine-based fracturing fluid, and the input of the neural network model (CNN) is the ultrasonic signal of the guanidine-based fracturing fluid of the well fluid system, and the output is the viscosity of the guanidine-based fracturing fluid; Step 4, using the fracturing fluid ultrasonic signal characteristic database obtained in step 2 to train the 5 kinds of models constructed in step 3, to obtain the 5 kinds of models after training; Step 5, randomly extracting a plurality of ultrasonic signal characteristics and viscosity from the fracturing fluid ultrasonic signal characteristic database obtained in step 2, and testing the above 5 kinds of trained models respectively; The test results are shown in Figure 9 and Figure 10 The above 5 kinds of models all show excellent prediction accuracy on the viscosity prediction task, and the R 2 are XGBoost 0.87, random forest 0.91, LightGBM 0.89, decision tree 0.90, and CNN 0.97 respectively; the CNN model has the highest fitting degree and the highest prediction accuracy; Further, in order to verify the reliability of the high prediction accuracy of the third signal characteristic analysis model (hereinafter referred to as CNN model) trained based on the CNN model in the embodiment of the application, the CNN model is analyzed by Grad-CAM (Gradient-weighted Class Activation Mapping); this analysis method is an advanced explainable technology, which can generate a model attention heat map to explain the part concerned by the model; Specifically, asFigure 11 As shown, Figure 11 The blue line represents the ultrasound signal waveform (corresponding to...). Figure 11 In the OriginalSignal model, the background color represents attention, with blue to red indicating increasing attention intensity. The analysis results show that the excellent predictive performance of the CNN model is based on a deep understanding of ultrasonic signals. The convolutional layers of the CNN model can effectively learn the features of ultrasonic signals, and the CNN model focuses on the trough signals of ultrasonic signals. Therefore, it can be seen that the third signal feature analysis model trained using the CNN model as the base model can meet the requirements for predicting the viscosity of each component in the multiple components contained in the well fluid system. In one application scenario, a CNN model can achieve stable, continuous, and accurate prediction of the viscosity of guar gum-based fracturing fluid; in this embodiment, the guar gum concentration in the guar gum-based fracturing fluid is 0.3 g / L; Figure 12 As shown, Figure 12 In this context, Predicted represents the predicted value, and True represents the actual value. Figure 12 It can be seen that, by combining the high-frequency automatic acquisition software SBQ.exe for ultrasonic signals and the CNN model, the prediction accuracy of the CNN model has always remained above 90%. Therefore, it can be determined that the CNN model can achieve high-frequency automatic monitoring of guanidine fracturing fluid at 30 points / min.
[0038] In summary, the machine learning-assisted in-situ monitoring method for well fluid systems provided in this application first analyzes the ultrasonic signals of the target drilling well fluid system to obtain the signal characteristics of the ultrasonic signals. Then, the various components contained in the well fluid system are obtained through the signal characteristics and a first signal characteristic analysis model. The signal characteristics and the various components of the ultrasonic signals are then analyzed using a second signal characteristic analysis model and a third signal characteristic analysis model to obtain the concentration and viscosity of each component in the target drilling well fluid system. This enables real-time and relatively accurate monitoring of the performance of the well fluid system, thereby ensuring timely remedial measures can be taken when the performance of the well fluid system is unfavorable to drilling operations, thus guaranteeing the safety, operational efficiency, and economic benefits of the extraction process.
[0039] Accordingly, embodiments of this application provide a machine learning-assisted in-situ monitoring device for well fluid systems, such as... Figure 13 As shown, it includes a signal feature determination module 501, a component identification module 502, a concentration determination module 503, and a viscosity determination module 504.
[0040] The signal feature determination module 501 is configured to process an ultrasonic signal of a target drilling well drilling fluid system, and determine a signal feature of the ultrasonic signal. The signal feature of the ultrasonic signal includes a time domain feature, a frequency domain feature, and a statistical feature. For example, the signal feature determination module 501 is configured to implement S101 of the method.
[0041] The component identification module 502 is configured to determine a plurality of components contained in the target drilling well drilling fluid system according to the signal feature of the ultrasonic signal and a first signal feature analysis model based on a classifier model. The first signal feature analysis model is trained based on the classifier model. For example, the component identification module 502 is configured to implement S102 of the method.
[0042] The concentration determination module 503 is configured to determine a concentration of each component in the plurality of components of the target drilling well drilling fluid system based on the signal feature of the ultrasonic signal, the plurality of components in the target drilling well drilling fluid system, and a second signal feature analysis model. The second signal feature analysis model is trained based on the classifier model. For example, the concentration determination module 503 is configured to implement S103 of the method.
[0043] The viscosity determination module 504 is configured to determine a viscosity of each component in the plurality of components of the target drilling well drilling fluid system based on the signal feature of the ultrasonic signal, the plurality of components in the target drilling well drilling fluid system, and a third signal feature analysis model. The third signal feature analysis model is trained based on the classifier model or a neural network model. For example, the viscosity determination module 504 is configured to implement S104 of the method.
[0044] The modules of the machine learning assisted drilling fluid system in-situ monitoring device described above can also be used to perform other steps in the method embodiments described above. All related contents involved in the method embodiments described above can be cited to the function description of the corresponding functional modules, and will not be repeated here.
[0045] The embodiments of the present application also provide an electronic device, which includes a processor and a memory coupled to the processor. The memory is configured to store computer instructions. When the electronic device is running, the processor executes the computer instructions stored in the memory, so that the electronic device performs the method described in the above embodiments. The processor can implement the signal feature determination module 501, the component identification module 502, the concentration determination module 503, and the viscosity determination module 504. The memory can also be used to store the ultrasonic signal, the signal feature of the ultrasonic signal, the plurality of components, and the concentration and viscosity of each component.
[0046] The embodiment of the present application further provides a computer readable storage medium, which comprises a computer program, and when the computer program is run on a computer, a method described in the above embodiment is executed.
[0047] The embodiment of the present application further provides a computer program product, which comprises computer program instructions, and when the computer program instructions are run on a computer, a method described in the above embodiment is executed.
[0048] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts of each of the embodiments can be referred to each other, and each of the embodiments mainly describes the difference from other embodiments.
[0049] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A machine learning-assisted in-situ monitoring method for well fluid systems, characterized in that, include: The ultrasonic signal of the target drilling fluid system is processed to determine the signal characteristics of the ultrasonic signal; wherein, the signal characteristics of the ultrasonic signal include time domain characteristics, frequency domain characteristics and statistical characteristics; Based on the signal characteristics of the ultrasonic signal and the first signal characteristic analysis model, the various components contained in the target drilling fluid system are determined; the first signal characteristic analysis model is obtained based on a classifier model training. Based on the signal characteristics of the ultrasonic signal, the multiple components in the target drilling fluid system, and the second signal feature analysis model, the concentration of each component in the target drilling fluid system is determined; the second signal feature analysis model is obtained by training a classifier model. Based on the signal characteristics of the ultrasonic signal, the multiple components in the target drilling fluid system, and the third signal feature analysis model, the viscosity of each component in the target drilling fluid system is determined; the third signal feature analysis model is obtained by training a classifier model or a neural network model.
2. The method as described in claim 1, characterized in that, The determination of the various components contained in the target drilling fluid system includes: The signal features of the ultrasonic signal are input into the first signal feature analysis model. The first signal feature analysis model analyzes the signal features of the ultrasonic signal and outputs the multiple components contained in the target drilling fluid system, as well as the signal features of the ultrasonic signal corresponding to each of the multiple components. The first signal feature analysis model is trained based on a random forest model.
3. The method as described in claim 1 or 2, characterized in that, Determining the concentration of each component in the target drilling fluid system includes: For each of the multiple components, the signal features corresponding to the component in the signal features of the ultrasound signal are input into a second signal feature analysis model. The second signal feature analysis model analyzes the signal features corresponding to the component in the signal features of the component and the ultrasound signal, and outputs the concentration of the component. The second signal feature analysis model is trained based on a support vector machine.
4. The method as described in claim 1 or 2, characterized in that, Determining the viscosity of each component in the target drilling fluid system includes: For each of the multiple components, the signal features corresponding to the component in the signal features of the ultrasonic signal are input into a third signal feature analysis model. The third signal feature analysis model analyzes the signal features corresponding to the component in the signal features of the component and the ultrasonic signal, and outputs the viscosity of the component. The third signal feature analysis model is trained based on a classifier model.
5. The method as described in claim 4, characterized in that, The classifier model on which the third signal feature analysis model is based is the XGBoost model, the random forest model, the LightGBM model, or the decision tree model.
6. The method as described in claim 1 or 2, characterized in that, Determining the viscosity of each component in the target drilling fluid system includes: The signal characteristics of the multiple components and the ultrasonic signal are input into a third signal feature analysis model. The third signal feature analysis model analyzes the signal characteristics of the multiple components and the ultrasonic signal and outputs the viscosity of each component in the target drilling fluid system. The third signal feature analysis model is trained based on a neural network model.
7. The method as described in claim 1, characterized in that, The time-domain characteristics include peak amplitude, rise time, pulse width, and callback attenuation rate; The frequency domain features include the dominant frequency, bandwidth, and spectral centroid. The statistical characteristics include root mean square value, peak factor, skewness, and kurtosis.
8. A machine learning-assisted in-situ monitoring device for well fluid systems, used to implement the method as described in claim 1, characterized in that, It includes a signal feature determination module, a component identification module, a concentration determination module, and a viscosity determination module; The signal feature determination module is used to process the ultrasonic signal of the target drilling fluid system and determine the signal features of the ultrasonic signal; wherein, the signal features of the ultrasonic signal include time domain features, frequency domain features and statistical features; The component identification module is used to determine the multiple components contained in the target drilling fluid system based on the signal characteristics of the ultrasonic signal and a first signal feature analysis model based on a classifier model; the first signal feature analysis model is obtained by training a classifier model. The concentration determination module is used to determine the concentration of each component in the target drilling fluid system based on the signal characteristics of the ultrasonic signal, the multiple components in the target drilling fluid system, and a second signal feature analysis model; the second signal feature analysis model is obtained by training a classifier model. The viscosity determination module is used to determine the viscosity of each component in the target drilling fluid system based on the signal characteristics of the ultrasonic signal, the multiple components in the target drilling fluid system, and a third signal feature analysis model; the third signal feature analysis model is obtained by training a classifier model or a neural network model.
9. An electronic device, characterized in that, The device includes a processor and a memory coupled to the processor; the memory is used to store computer instructions, and when the electronic device is running, the processor executes the computer instructions stored in the memory to cause the electronic device to perform the method as described in claim 1.
10. A computer-readable storage medium, characterized in that, It includes computer program instructions that, when executed by a computer, cause the computer to perform the method as described in claim 1.
Citation Information
Patent Citations
Method for quickly analyzing components of drilling liquid by using ultrasonic molecular beams
CN101845951A
Multi-component solid-liquid mixture component concentration ultrasonic detection system and method
CN107907591A
Single ultrasonic mud liquid level measuring system and method based on machine learning
CN119442891A
Liquid information detection method and system based on ultrasonic technology
CN120294142A
Oil-water component analysis measuring device based on ultrasonic method
CN211697652U