Shaft scaling prediction method and system based on transfer function and machine learning

By combining transfer functions and machine learning methods, the problems of multi-model coupling and parameter adaptation in wellbore scaling prediction were solved, enabling dynamic and accurate prediction of wellbore scaling and improving the continuity and economy of oil and gas field development.

CN121920261APending Publication Date: 2026-04-24SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHWEST PETROLEUM UNIV
Filing Date
2025-11-26
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing wellbore scaling prediction technologies struggle to achieve deep coupling of multiple models and parameters, as well as precise thermodynamic correction. They cannot accurately reflect scaling conditions at different wellbore depths and production stages, and lack dynamic iteration and spatial adaptability, thus failing to meet the technical requirements of oil and gas fields for precise wellbore scaling control.

Method used

A method based on transfer function and machine learning is adopted. By acquiring various basic parameters for predicting wellbore scaling, and combining the seepage coupling transfer function, the dynamic transfer function bag external scaling algorithm, and the chemical thermodynamic transfer function correction algorithm, the correlation between fluid seepage state and scaling trend is established. Dynamic iterative calculation is performed, and a mapping model between scaling amount and wellbore spatial location is established through machine learning model to output dynamic scaling prediction curve.

Benefits of technology

It enables dynamic and accurate prediction of wellbore scaling, improves the thermodynamic accuracy and spatial adaptability of the prediction results, and supports efficient exploitation and safety assurance of oil and gas fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121920261A_ABST
    Figure CN121920261A_ABST
Patent Text Reader

Abstract

The invention discloses a shaft scaling prediction method and system based on a transfer function and machine learning. The method comprises the steps that scaling prediction basic parameters such as fluid pressure, temperature, flow velocity and ion concentration in an oil and gas shaft are obtained and imported into an oil and gas shaft scaling dynamic analysis platform; calling a seepage coupling transfer function scaling prediction model to process seepage related parameters, and establishing a correlation between a fluid seepage state and a scaling initial trend; starting a dynamic transfer function out-of-bag scaling algorithm to dynamically iterate different depth parameters, and outputting a preliminary scaling amount; correcting a preliminary result through a chemical thermodynamic transfer function correction algorithm in combination with parameters such as temperature; and a machine learning model is adopted to train a corrected result and a shaft position parameter, a mapping model is established, a dynamic scaling prediction curve is output, and the platform carries out visualization processing on the curve. The system is matched with the method to realize parameter acquisition, processing, calculation, correction, modeling and display, and the scaling prediction accuracy and the dynamic adaptability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wellbore scaling technology in oil and gas extraction, and particularly to a method and system for predicting wellbore scaling based on transfer function and machine learning. Background Technology

[0002] During oil and gas extraction, the fluid composition within the wellbore is complex and dynamically affected by various parameters such as pressure, temperature, and flow velocity. Scale ions in the fluid easily deposit on the wellbore wall, forming scale. Wellbore scaling leads to a reduction in the wellbore's inner diameter and an increase in fluid flow resistance, not only reducing oil and gas extraction efficiency but also potentially causing wellbore blockage, equipment wear, and other problems, increasing extraction costs and safety risks. To ensure the continuity and economy of oil and gas extraction, accurate prediction of wellbore scaling is necessary to enable proactive scale prevention and removal measures. Currently, the industry has an increasingly urgent need for wellbore scaling prediction, requiring a method and system that integrates multiple parameters and combines the advantages of multiple algorithms to achieve dynamic and accurate prediction, providing technical support for the efficient development of oil and gas fields.

[0003] Existing wellbore scaling prediction technologies have two significant drawbacks: First, existing technologies struggle to achieve deep coupling of multiple models and parameters, as well as precise thermodynamic correction. Most rely solely on seepage models or scaling algorithms for prediction, failing to adequately integrate fluid seepage characteristics, dynamic scaling processes, and thermodynamic equilibrium. This makes prediction results susceptible to interference from non-equilibrium factors, hindering accurate reflection of scaling conditions at different wellbore depths and development stages. Second, existing algorithms lack dynamic iteration and spatial adaptation capabilities. When addressing parameter differences at different wellbore depths, they fail to perform layered iterative calculations for dynamic changes in parameters such as ion concentration and residence time, nor do they incorporate personalized adjustments based on spatial parameters like wellbore wall roughness and inner diameter. Consequently, they struggle to output dynamic scaling prediction results with spatial resolution, failing to meet the technical requirements of oil and gas fields for precise wellbore scaling control. Summary of the Invention

[0004] To overcome the shortcomings and deficiencies of existing technologies, this invention provides a method and system for predicting wellbore scaling based on transfer functions and machine learning.

[0005] The technical solution adopted in this invention is a wellbore scaling prediction method based on transfer function and machine learning, comprising the following steps: S1, acquiring basic parameters for wellbore scaling prediction, including fluid pressure, temperature, flow rate, ion concentration, wellbore inner diameter, pipe wall roughness, fluid viscosity, fluid density, scaling ion saturation, and residence time, and importing the basic parameters into an oil and gas wellbore scaling dynamic analysis platform; S2, calling the seepage coupling transfer function scaling prediction model through the oil and gas wellbore scaling dynamic analysis platform, coupling the pressure, flow rate, viscosity, and density parameters related to fluid seepage characteristics in the basic parameters acquired in S1, and establishing the correlation between fluid seepage state and initial scaling trend; S3, based on the correlation obtained in S2, starting the dynamic transfer function external scaling algorithm, and analyzing the ion concentration at different depths in the wellbore, temperature, flow rate, ion concentration, and residence time. S4. The preliminary scaling amount prediction results at different depths are output by dynamically iteratively calculating the residence time and pipe wall roughness parameters. S5. The preliminary scaling amount prediction results output by S3 are input into the chemical thermodynamic transfer function correction algorithm. Combined with the temperature, scaling ion saturation, and wellbore inner diameter parameters in S1, the preliminary scaling amount prediction results are thermodynamically balanced to eliminate the interference of non-equilibrium factors on the prediction results. S6. The scaling amount prediction results after correction by S4 are trained with the corresponding wellbore position parameters using a machine learning model to establish a mapping model between scaling amount and wellbore spatial position and fluid parameters, and dynamic scaling prediction curves at different wellbore positions are output. S7. The dynamic scaling prediction curves output by S5 are visualized through the oil and gas wellbore scaling dynamic analysis platform to show the scaling distribution law and change trend of different sections of the wellbore in different production cycles.

[0006] Furthermore, the expression for the seepage coupling transfer function scaling prediction model is as follows: ,in, This is the scaling tendency function under the effect of seepage coupling. For fluid pressure, For fluid velocity, For fluid viscosity, For fluid density, This represents the concentration of scale ions. For wellbore depth, The permeability function varies with pressure and viscosity. For pressure gradient, The velocity-density coupling coefficient is... This is the correction factor for seepage resistance.

[0007] Furthermore, the expression for the dynamic transfer function external fouling algorithm is as follows: ,in, This represents the initial scale buildup on the outside of the bag. For wellbore depth, Total stay time For integration variables, for time Concentration of scale ions at depth for Wellbore wall roughness at depth The diffusion coefficient is... for time Fluid velocity at depth This is the depth-dependent scaling rate coefficient. is the concentration change response coefficient.

[0008] Furthermore, the expression for the chemical thermodynamic transfer function correction algorithm is: ,in, This is the corrected amount of scale. For fluid temperature, For scale ion saturation, The inner diameter of the wellbore. This is the initial amount of scaling. This is a temperature-dependent thermodynamic coefficient. for Scaling ion balance saturation at temperature This is the correction factor for the wellbore inner diameter. For reference temperature, is the saturation temperature gradient response coefficient.

[0009] Furthermore, the model expression used for parameter correlation in the oil and gas wellbore scaling dynamic analysis platform is as follows: ,in, For the platform parameter correlation matrix, These are the weighting coefficients. For the wellbore circumference angle, This is a seepage-coupled scaling tendency function. To correct the amount of scale, This represents the initial amount of scaling.

[0010] Furthermore, the loss function expression during the training process of the machine learning model is as follows: middle, This represents the model loss value. For model parameters, For the sample size, For the first Predicted scale amount for each sample For the first The actual amount of scaling on each sample The regularization coefficient is . To predict the gradient of scaling amount, The number of input parameters, For the first One input parameter.

[0011] Further, step S3 includes the following sub-steps: S31, extracting the ion concentration, residence time, and pipe wall roughness parameters at different depths in the wellbore obtained in S1 from the oil and gas wellbore scaling dynamic analysis platform, and dividing the parameters into layers according to a wellbore depth interval of 0.5m to form a depth-parameter corresponding dataset; S32, inputting the layered dataset into the input layer of the dynamic transfer function bag external scaling algorithm, and performing time series decomposition on the ion concentration parameters of each depth layer to obtain ion concentration change components at different time scales; S33, substituting the decomposed ion concentration change components and the residence time and pipe wall roughness parameters at the corresponding depths into the iterative formula of the dynamic transfer function bag external scaling algorithm, setting the iteration step size to 0.1s, and performing 300 iterations to obtain intermediate scaling amount data at different depths; S34, performing mean filtering on the intermediate scaling amount data obtained from the 300 iterations to remove abnormal fluctuation values ​​generated during the iteration process, and outputting the preliminary scaling amount prediction results at different depths.

[0012] Further, step S4 includes the following sub-steps: S41, selecting temperature, scale ion saturation, and wellbore inner diameter parameters from the basic parameters obtained in S1, and matching them with the preliminary scale amount prediction results output in S3 to ensure that each preliminary scale amount data corresponds to a unique temperature, scale ion saturation, and wellbore inner diameter parameter; S42, importing the matched data into the chemical thermodynamic transfer function correction algorithm, calling the algorithm's built-in thermodynamic parameter database, and obtaining the equilibrium saturation of scale ions and the basic thermodynamic parameters of temperature-related thermodynamic coefficients at the current temperature; S43, substituting the preliminary scale amount data, the matched temperature, scale ion saturation, wellbore inner diameter parameters, and the obtained basic thermodynamic parameters into the calculation formula of the chemical thermodynamic transfer function correction algorithm, performing thermodynamic balance calculations, and obtaining the correction coefficients corresponding to each data point; S44, multiplying the preliminary scale amount data by the corresponding correction coefficients to obtain the corrected scale amount prediction result, and simultaneously recording the changes in different parameters during the correction process to form a correction process data document.

[0013] Further, S5 includes the following sub-steps: S51, combining the scale prediction result corrected in S4 with the corresponding wellbore depth, fluid pressure, temperature, and flow velocity parameters to construct a training sample set for the machine learning model, and dividing the sample set into a training set and a validation set in a 7:3 ratio; S52, selecting a neural network model based on improved transfer function as the training model, setting the number of nodes in the input layer to 8, the number of hidden layers to 3 with 64, 32, and 16 nodes respectively, and the number of nodes in the output layer to 1; S53, training the model using the training set, setting the learning rate to 0.001, and the training rounds to 500 rounds, calculating the model prediction error using the validation set after each round of training, and stopping training when the rate of change of the validation error is less than 0.0001 for 10 consecutive rounds; S54, applying the trained model to the entire sample set, outputting the scale prediction value corresponding to each sample, and combining the wellbore position parameters corresponding to the sample to draw dynamic scale prediction curves at different positions in the wellbore using a linear interpolation method.

[0014] A wellbore scaling prediction system based on transfer function and machine learning is disclosed. This system, applied to a wellbore scaling prediction method based on transfer function and machine learning, includes: a multi-dimensional wellbore parameter acquisition unit, connected to pressure sensors, temperature sensors, flow velocity sensors, ion concentration detectors, and a wellbore topography scanner within the oil and gas wellbore, for acquiring fluid pressure, temperature, flow velocity, ion concentration, wellbore inner diameter, and pipe wall roughness parameters, and converting the acquired parameters into digital signals for transmission to a parameter preprocessing and storage unit; a parameter preprocessing and storage unit, connected to the multi-dimensional wellbore parameter acquisition unit, receiving the transmitted digital signals, denoising the signals, and storing them in a built-in database according to parameter type, while establishing an association index between parameters and acquisition time and wellbore depth to provide data support for subsequent model calculations; and a seepage coupling-dynamic scaling calculation unit, connected to both the parameter preprocessing and storage unit and the oil and gas wellbore scaling dynamic analysis platform, which retrieves fluid seepage-related parameters from the parameter preprocessing and storage unit and performs calculations using a built-in seepage coupling transfer function scaling prediction model and a dynamic transfer function external scaling algorithm. The system calculates and outputs preliminary scaling prediction results to the thermodynamic correction unit. The thermodynamic correction unit, connected to the seepage coupling-dynamic scaling calculation unit and the parameter preprocessing and storage unit, receives the preliminary scaling prediction results, calls the temperature and scaling ion saturation parameters from the parameter preprocessing and storage unit, corrects the preliminary scaling amount using a chemical thermodynamic transfer function correction algorithm, and outputs the corrected scaling amount data to the machine learning modeling unit. The machine learning modeling and prediction unit, connected to the thermodynamic correction unit and the parameter preprocessing and storage unit, obtains the corrected scaling amount data and corresponding wellbore location parameters, establishes a mapping relationship between scaling amount and parameters using a trained machine learning model, and outputs a dynamic scaling prediction curve to the result visualization and display unit. The result visualization and display unit, connected to the machine learning modeling and prediction unit and the oil and gas wellbore scaling dynamic analysis platform, receives the dynamic scaling prediction curve data, and uses the platform's built-in visualization module, with a 3D wellbore model as the carrier, to display the scaling distribution patterns and trends in different sections of the wellbore during different production cycles. It also supports users in querying and exporting the prediction results.

[0015] Beneficial Effects: This invention proposes a wellbore scaling prediction method and system based on transfer functions and machine learning. At the methodological level, key parameters such as wellbore pressure and temperature are comprehensively collected and integrated. A seepage-coupled transfer function scaling prediction model is invoked to improve the correlation accuracy between fluid seepage characteristics and scaling trends. A dynamic transfer function-based external scaling algorithm is combined to dynamically iterate and calculate parameters at different wellbore depths, improving adaptability to spatiotemporal changes in parameters. A chemical-thermodynamic transfer function correction algorithm is then used to eliminate interference from non-equilibrium factors, improving the thermodynamic accuracy of the prediction results. Finally, a machine learning model is used to establish a mapping relationship between scaling amount and parameters, outputting a dynamic prediction curve. This overcomes the problems of insufficient coupling between multiple models and parameters and lack of thermodynamic correction, while also addressing the shortcomings of weak dynamic iteration and spatial adaptability of the algorithm. At the system level, the various units work collaboratively, improving the coherence and efficiency of the entire process from parameter acquisition to processing, calculation, correction, modeling, and display. This provides dynamic and accurate scaling prediction support for oil and gas fields, effectively improving the continuity and economic guarantee level of the extraction process. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method steps of the present invention;

[0017] Figure 2 This is a diagram showing the system unit composition of the present invention. Detailed Implementation

[0018] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] like Figure 1 As shown, a wellbore scaling prediction method based on transfer function and machine learning includes the following steps:

[0020] S1. Obtain basic parameters for predicting wellbore scaling, including fluid pressure, temperature, flow rate, ion concentration, wellbore inner diameter, pipe wall roughness, fluid viscosity, fluid density, scaling ion saturation, and residence time, and import these basic parameters into the oil and gas wellbore scaling dynamic analysis platform.

[0021] Specifically, step S1 involves collecting and importing basic parameters for predicting scaling in oil and gas wellbores, providing complete and accurate data support for all subsequent prediction stages. The quality of its implementation directly affects the accuracy of the subsequent prediction results. During implementation, pressure sensors, temperature sensors, electromagnetic flowmeters, ion chromatographs, laser diameter gauges, and surface roughness meters deployed within the wellbore are used to collect parameters such as fluid pressure, temperature, flow rate, ion concentration, wellbore inner diameter, and pipe wall roughness. Simultaneously, fluid viscosity and density are collected using viscometers and densitometers, scaling ion saturation is collected using a saturation detector, and the fluid residence time within the wellbore is recorded using a timer. The pressure acquisition range is set to 0-100 MPa, the acquisition frequency is 1 time / minute, and the temperature acquisition range is... The temperature range is set to 20-150℃, the sampling frequency is 1 time / minute, the flow velocity sampling range is set to 0.1-5 m / s, the sampling frequency is 1 time / 2 minutes, the ion concentration sampling accuracy is controlled within 0.01 mol / L, the wellbore inner diameter measurement accuracy is controlled within ±0.1 mm, the pipe wall roughness measurement accuracy is controlled within ±0.01 μm, the fluid viscosity measurement accuracy is controlled within ±0.001 mPa・s, the fluid density measurement accuracy is controlled within ±0.1 kg / m³, the scale ion saturation measurement accuracy is controlled within ±1%, and the residence time recording accuracy is controlled within ±1 second. After all parameters are collected, the parameters are converted into standard digital signals through the data transmission module, named according to the format "parameter name-sampling time-wellbore depth", and imported in batches into the database of the oil and gas wellbore scaling dynamic analysis platform. The platform automatically verifies the integrity of the imported parameters. If any parameters are missing or abnormal, a prompt signal is issued in a timely manner to ensure that the imported basic parameters are complete and error-free.

[0022] S2. By calling the seepage coupling transfer function scale prediction model through the oil and gas wellbore scaling dynamic analysis platform, the pressure, flow rate, viscosity and density parameters related to fluid seepage characteristics in the basic parameters obtained in S1 are coupled and processed to establish the correlation between fluid seepage state and initial scaling trend.

[0023] Specifically, step S2 is a crucial step in establishing the correlation between fluid seepage characteristics and the initial scaling trend. By calling and calculating the seepage coupling transfer function scaling prediction model, the dispersed seepage-related parameters are transformed into correlations with scaling prediction significance, laying the foundation for subsequent preliminary scaling calculations. During implementation, firstly, in the model call interface of the oil and gas wellbore scaling dynamic analysis platform, the "seepage coupling transfer function scaling prediction model" is selected, and the fluid pressure, velocity, viscosity, and density parameters collected in step S1 are retrieved from the platform database. The platform automatically divides the parameters into several data groups according to the wellbore depth, with a depth interval set to 0.5m. Each data group includes the average parameter value for 10 consecutive minutes at the corresponding depth to reduce the impact of instantaneous fluctuations on the calculation results. During the model calculation, the pressure and flow velocity in each set of parameters are first coupled and analyzed to establish the correspondence between pressure gradient and flow velocity changes. Then, the viscosity and density parameters are substituted into the seepage resistance calculation module to correct the correlation coefficient between pressure gradient and flow velocity changes. Finally, the seepage characteristic parameters (pressure gradient, flow velocity, and seepage resistance) are mapped to an initial scaling trend index through a transfer function. This index ranges from 0 to 1, with a value closer to 1 indicating a stronger initial scaling trend. After the calculation is completed, the platform generates a "wellbore depth - initial scaling trend index" correspondence table and displays it initially in the form of a line graph. Operators can view the differences in initial scaling trends at different depths through the platform interface. At the same time, the platform automatically stores this correlation data in an intermediate database, providing data input for the dynamic iterative calculation in step S3.

[0024] S3. Based on the correlation obtained in S2, the dynamic transfer function bag external scaling algorithm is started to dynamically iterate and calculate the ion concentration, residence time and pipe wall roughness parameters at different depths in the wellbore, and output the preliminary scaling amount prediction results at different depths.

[0025] Specifically, step S3, based on the seepage-scaling correlation established in step S2, uses a dynamic transfer function-based external scaling algorithm to calculate the initial scaling amount at different depths in the wellbore. This reflects the impact of dynamic parameter changes on scaling amount and avoids prediction bias caused by traditional static calculations. During implementation, the correlation data output from step S2 is first retrieved from the intermediate database of the oil and gas wellbore scaling dynamic analysis platform. Simultaneously, the ion concentration, residence time, and pipe wall roughness parameters collected in step S1 at different depths in the wellbore are retrieved from the basic database. Specifically, the ion concentration parameter extracts continuous monitoring data for one hour at 0.5m depth intervals, resulting in 360 data points. The residence time is calculated in segments within the wellbore, with each segment representing a 100m depth. The average residence time of the fluid within each segment is calculated. The pipe wall roughness parameter extracts measured values ​​at 1m depth intervals to ensure that the parameters cover the entire depth range of the wellbore. After the algorithm starts, it first decomposes the ion concentration data into trend, periodic, and random terms according to the time series, separating the long-term variation pattern and short-term fluctuations of ion concentration. Then, it substitutes the decomposed ion concentration data, residence time at the corresponding depth, and pipe wall roughness parameters into the input layer of the dynamic transfer function, setting the iteration step size to 0.1 seconds and the number of iterations to 300. During each iteration, the algorithm dynamically adjusts the weight coefficients of the transfer function based on the calculation results of the previous step to reflect the influence of parameter changes over time on the amount of scaling. After the iterative calculation is completed, the algorithm performs statistical analysis on the results of the 300 iterations, removes outliers that deviate from the average value by more than 3 standard deviations, and takes the average value of the remaining results as the preliminary scaling amount at the corresponding depth. Finally, it generates a data list of "wellbore depth - preliminary scaling amount", with the data accuracy controlled within ±0.01 kg / m². This list is automatically transmitted to the platform's correction module to prepare for the thermodynamic correction in step S4.

[0026] S4. Input the preliminary scale amount prediction result output by S3 into the chemical thermodynamic transfer function correction algorithm. Combine the temperature, scale ion saturation and wellbore inner diameter parameters in S1 to perform thermodynamic balance correction on the preliminary scale amount prediction result and eliminate the interference of non-equilibrium factors on the prediction result.

[0027] Specifically, step S4 involves thermodynamically correcting the preliminary scaling amount output from step S3. A chemical thermodynamic transfer function correction algorithm is used to eliminate the interference of non-equilibrium fluid factors on the scaling amount, ensuring that the prediction results conform to thermodynamic equilibrium laws and improving the accuracy of scaling amount prediction. During implementation, the "wellbore depth - preliminary scaling amount" data list output from step S3 is first retrieved from the correction module of the oil and gas wellbore scaling dynamic analysis platform. Simultaneously, the temperature, scaling ion saturation, and wellbore inner diameter parameters collected in step S1 are retrieved from the basic database. Specifically, the temperature parameter is extracted as an average value over 30 consecutive minutes at 0.5m depth intervals; the scaling ion saturation parameter is extracted as an instantaneous value corresponding to the calculation time of the preliminary scaling amount at 0.5m depth intervals; and the wellbore inner diameter parameter is extracted as a measured value at 1m depth intervals, ensuring that each preliminary scaling amount data is matched with the corresponding thermodynamic parameters. During the algorithm's operation, the built-in thermodynamic database is first queried based on temperature parameters to obtain basic data such as the equilibrium saturation of scale ions and temperature-related thermodynamic coefficients at that temperature. Then, the preliminary scale amount, scale ion saturation, wellbore inner diameter parameters, and basic thermodynamic data are substituted into the chemical thermodynamic transfer function to calculate the non-equilibrium correction coefficient. This coefficient is dynamically adjusted based on the difference between the actual and equilibrium scale ion saturation and the influence of the wellbore inner diameter on the fluid flow state. When the actual saturation is higher than the equilibrium saturation, the correction coefficient is greater than 1; when the actual saturation is lower than the equilibrium saturation, the correction coefficient is less than 1. After the correction calculation is completed, the preliminary scale amount is multiplied by the corresponding correction coefficient to obtain the corrected scale amount data, with data accuracy controlled within ±0.005 kg / m². Simultaneously, the platform generates a comparison table of scale amounts before and after correction, allowing operators to visually view the correction effect. The corrected scale amount data is automatically stored in the modeling database, providing input data for the machine learning modeling in step S5.

[0028] S5. A machine learning model is used to train the scale prediction results after S4 correction and the corresponding wellbore location parameters to establish a mapping model between scale and wellbore spatial location and fluid parameters, and output dynamic scale prediction curves for different wellbore locations.

[0029] Specifically, step S5 trains the scale amount data corrected in step S4 using a machine learning model to establish a mapping relationship between scale amount and wellbore spatial location and fluid parameters. The fitting ability of machine learning is used to improve the dynamics and accuracy of scale prediction, achieving continuous prediction of scale conditions across the entire wellbore depth. In implementation, the corrected scale amount data output from step S4 is first retrieved from the modeling database of the oil and gas wellbore scale dynamic analysis platform. Simultaneously, corresponding wellbore depth, fluid pressure, temperature, flow rate, ion concentration, pipe wall roughness, and wellbore inner diameter parameters are retrieved from the basic database. These data are combined in an "input parameter - output parameter" format, where the input parameters include seven items: wellbore depth, fluid pressure, temperature, flow rate, ion concentration, pipe wall roughness, and wellbore inner diameter. The output parameter is the corrected scale amount, resulting in 1000 sets of sample data. The sample data is divided into a training set (700 sets) and a validation set (300 sets) in a 7:3 ratio. The training set is used for model parameter optimization, and the validation set is used for model performance verification. An improved neural network was chosen as the machine learning model. The model structure was set as follows: 7 nodes in the input layer (corresponding to 7 input parameters), 3 hidden layers (64 nodes in the first layer, 32 nodes in the second layer, and 16 nodes in the third layer), and 1 node in the output layer (corresponding to the scale amount). During model training, the learning rate was set to 0.001, and the training epochs were 500. The mean squared error was used as the loss function. After each training epoch, the prediction error of the model was calculated using a validation set. Training was stopped when the rate of change of the validation error was less than 0.0001 for 10 consecutive epochs to ensure that the model reached a stable state. After training, all 1000 sets of sample data were input into the model, and the predicted scale amount for each set of samples was output. Combined with the wellbore depth parameters corresponding to the samples, a linear interpolation method was used to supplement the prediction data between depth intervals. Finally, a dynamic scale prediction curve covering the entire depth range of the wellbore (from the wellhead to the bottom of the well) was generated. The horizontal axis of the curve represents the wellbore depth, and the vertical axis represents the scale amount. The data point interval was 0.1m. This curve was automatically transmitted to the platform's visualization module.

[0030] S6. The dynamic scaling prediction curve output by S5 is visualized through the oil and gas wellbore scaling dynamic analysis platform to show the scaling distribution pattern and trend of different sections of the wellbore in different mining cycles.

[0031] Specifically, step S6 involves visualizing and displaying the dynamic scaling prediction curve output from step S5. This transforms the abstract prediction data into intuitive graphical results, allowing operators to quickly grasp the scaling distribution patterns and trends in different sections of the wellbore. This provides a clear decision-making basis for subsequent scaling prevention and removal measures. During implementation, the dynamic scaling prediction curve data output from step S5 is first retrieved from the visualization module of the oil and gas wellbore scaling dynamic analysis platform. Simultaneously, the actual structural parameters of the wellbore (such as total wellbore depth, casing specifications, and production layer location) are retrieved from the basic database. The platform automatically constructs a three-dimensional wellbore model based on these parameters, with a model scale of 1:100, clearly displaying the segmented structure and key locations of the wellbore. During the visualization process, the platform overlays the dynamic scaling prediction curve with the 3D wellbore model, setting a color gradient according to the amount of scaling: blue for scaling less than 0.1 kg / m², yellow for 0.1-0.5 kg / m², orange for 0.5-1.0 kg / m², and red for scaling greater than 1.0 kg / m². The color difference intuitively reflects the severity of scaling at different depths. At the same time, the platform supports dynamic display in the time dimension, allowing users to select prediction curve data for different mining cycles (such as 1 month, 3 months, 6 months, 1 year), and display the trend of scaling changes with mining time through animation. The animation playback speed is adjustable, with the default being the playback of data changes for one mining cycle per second. In addition, the platform also provides a data query function. Operators can click on any location on the 3D wellbore model to display the specific depth, scale amount, and corresponding fluid parameters (pressure, temperature, flow rate) at that location. The visualization results can be saved as images or videos, or directly exported to the report generation module for compiling wellbore scale prediction reports, providing oil and gas field development and management departments with complete and intuitive scale prediction results.

[0032] Preferably, the expression for the seepage coupling transfer function scaling prediction model is: ,in, This is the scaling tendency function under the effect of seepage coupling. For fluid pressure, For fluid velocity, For fluid viscosity, For fluid density, This represents the concentration of scale ions. For wellbore depth, The permeability function varies with pressure and viscosity. For pressure gradient, The velocity-density coupling coefficient is... This is the correction factor for seepage resistance.

[0033] Specifically, the seepage coupling transfer function scaling prediction model achieves a precise correlation between fluid seepage characteristics and scaling trends, providing a reliable basis for subsequent seepage level analysis. During implementation, the specific range and accuracy requirements of the model's input parameters are first clarified. Fluid pressure must be controlled within the range of 0-100 MPa, with a data acquisition accuracy of ±0.1 MPa; fluid velocity is set to 0.1-5 m / s, with a measurement accuracy of ±0.01 m / s; fluid viscosity ranges from 0.1-10 mPa·s, with a measurement accuracy of ±0.001 mPa·s; fluid density is taken as 500-1500 kg / m³, with a measurement accuracy of ±0.1 kg / m³; and scaling ion concentration must be accurate to 0.01 mol / L. The wellbore depth is divided into calculation units at 0.5 m intervals, with each unit corresponding to a set of parameter data. During model calculation, the wellbore permeability under different pressures and viscosities is first calculated using a permeability function. The calculated permeability results must be controlled within the range of 0.1-1000 mD. Next, the correlation between pressure gradient and flow velocity is established, with the pressure gradient calculation step size set to 0.01 MPa / m. Then, a flow velocity-density coupling coefficient is introduced, dynamically adjusted based on actual measured values ​​of flow velocity and density, with a value range of 0.001-0.1. The seepage resistance correction coefficient is fixed at 0.85 to correct for the resistance effect during fluid flow. The model calculation outputs the scaling trend function value under seepage coupling, ranging from 0 to 1. Each increase of 0.1 represents a 10% increase in scaling trend. The calculation results must correspond one-to-one with the wellbore depth, and the storage precision retains 4 decimal places, providing quantitative data support for establishing the correlation in step S2.

[0034] Preferably, the expression for the dynamic transfer function external fouling algorithm is: ,in, This represents the initial scale buildup on the outside of the bag. For wellbore depth, Total stay time For integration variables, for time Concentration of scale ions at depth for Wellbore wall roughness at depth The diffusion coefficient is... for time Fluid velocity at depth This is the depth-dependent scaling rate coefficient. is the concentration change response coefficient.

[0035] Specifically, the dynamic transfer function-based external scaling algorithm obtains the preliminary scaling amount at different depths in the wellbore through dynamic iterative calculation, reflecting the impact of spatiotemporal parameter variations on scaling amount. During implementation, the standards for collecting and processing the algorithm's input parameters are first determined. The wellbore depth is divided into calculation segments at 0.5m intervals, and the total residence time is set to 1-365 days based on the mining cycle, with a time measurement accuracy of ±1 hour. Scaling ion concentration is collected hourly, and at least 24 sets of data need to be accumulated at a single depth to ensure the integrity of the time series. The wellbore wall roughness measurement accuracy is ±0.01μm, measured every 1m depth. The diffusion coefficient is fixed at 1×10⁻ based on the fluid type. 9 m² / s; fluid velocity changes are recorded at 0.1 m / s intervals. After the algorithm starts, the ion concentration time series is first decomposed. During the decomposition process, the trend term extraction window is set to 24 hours, the periodic term identification accuracy is controlled within ±1 hour, and the random term filtering threshold is set to 0.001 mol / L. Then, the depth-related scaling rate coefficient is substituted, which increases by 0.01 for every 100 m of wellbore depth, with a value range of 0.01-0.5; the concentration change response coefficient is fixed at 0.02. During iterative calculation, the step size is set to 0.1 seconds, and the total number of iterations is 300. After each iteration, the transfer function weight is automatically adjusted, and the weight adjustment range does not exceed 5% of the previous value. After the calculation is completed, outlier removal is performed on the results, with the removal threshold set to the average value ±3 times the standard deviation. The final output of the preliminary scaling amount is controlled within ±0.01 kg / m², and the data is stored in depth order to provide accurate data for the prediction results output in step S3.

[0036] Preferably, the expression for the chemical thermodynamic transfer function correction algorithm is: ,in, This is the corrected amount of scale. For fluid temperature, For scale ion saturation, The inner diameter of the wellbore. This is the initial amount of scaling. This is a temperature-dependent thermodynamic coefficient. for Scaling ion balance saturation at temperature This is the correction factor for the wellbore inner diameter. For reference temperature, is the saturation temperature gradient response coefficient.

[0037] Specifically, the chemical thermodynamic transfer function correction algorithm eliminates non-equilibrium interference through thermodynamic calculations, improving the accuracy of the initial scaling amount. During implementation, the standards for obtaining the required parameters are first defined: fluid temperature measurement range 20-150℃, accuracy ±0.1℃, collected every 0.5m depth; scaling ion saturation measurement accuracy ±1%, synchronized with the initial scaling amount calculation; wellbore inner diameter measurement accuracy ±0.1mm, recorded every 1m depth; reference temperature fixed at 25℃. During algorithm calculation, the built-in thermodynamic database is first queried to obtain the scaling ion equilibrium saturation at the corresponding temperature, with a query accuracy of ±0.5%; the temperature-related thermodynamic coefficient increases by 0.05 for every 10℃ increase in temperature, ranging from 0.1 to 1.0; the wellbore inner diameter correction coefficient is calculated based on the actual inner diameter value, decreasing by 0.02 for every 0.1m increase in inner diameter, ranging from 0.5 to 1.2; the saturation temperature gradient response coefficient is fixed at 0.03. During the correction calculation, the basic correction ratio is first calculated based on the difference between the actual saturation and the equilibrium saturation. For every 10% increase in the difference, the correction ratio increases by 5%. Then, a secondary adjustment is made by combining the inner diameter correction coefficient and the temperature gradient response coefficient, with the adjustment range controlled within ±10%. The final output of the corrected scaling amount is accurate to ±0.005 kg / m². At the same time, the changes in each parameter during the correction process are recorded, with the changes recorded to three decimal places, providing a reliable basis for the result correction in step S4 and ensuring that the predicted results conform to the thermodynamic equilibrium law.

[0038] Preferably, the model expression used for parameter correlation in the dynamic analysis platform for scaling in oil and gas wellbore is: ,in, For the platform parameter correlation matrix, These are the weighting coefficients. For the wellbore circumference angle, This is a seepage-coupled scaling tendency function. To correct the amount of scale, This represents the initial amount of scaling.

[0039] Specifically, the parameter correlation model of the oil and gas wellbore scaling dynamic analysis platform integrates multi-model data to establish comprehensive parameter correlation relationships, providing a unified data foundation for subsequent platform processing. During implementation, the multi-source data standards for model input are first determined: the seepage-coupled scaling trend function value must retain four decimal places, with a depth-corresponding accuracy of ±0.0001; the corrected scaling amount accuracy is ±0.005 kg / m²; the initial scaling amount depth gradient calculation step size is 0.1 m, with a gradient accuracy of ±0.001 kg / (m³). During model calculation, weighting coefficients are first set: the seepage-coupled scaling trend function weight ω1 is set to 0.3, the corrected scaling amount weight ω2 is set to 0.5, and the initial scaling amount depth gradient weight ω3 is set to 0.2, with a total weight of 1.0; the wellbore circumferential angle is divided into 0-2π radians, with an integration step size of 0.1 radians and an integration accuracy of ±0.001. During the calculation process, circumferential integration is performed on each input data, covering the entire wellbore cross-section to ensure the data reflects the entire wellbore circumference. The final output parameter correlation matrix has the same dimension as the number of wellbore depth segments, and the matrix elements retain 4 decimal places. Each element corresponds to a set of depth-parameter correlation data. This matrix is ​​stored in the platform database, providing a unified data interface for parameter calling, data integration and subsequent module operations within the platform, ensuring smooth data connection between each stage.

[0040] Preferably, the loss function expression during the training process of the machine learning model is: middle, This represents the model loss value. For model parameters, For the sample size, For the first Predicted scale amount for each sample For the first The actual amount of scaling on each sample The regularization coefficient is . To predict the gradient of scaling amount, The number of input parameters, For the first One input parameter.

[0041] Specifically, the loss function of a machine learning model optimizes model parameters and improves prediction accuracy through loss calculation. In implementation, the required samples and parameter standards for loss function calculation are first determined. The number of samples N is set to 1000 sets, with 700 sets for training and 300 sets for validation. The completeness of the sample data must reach 100%. The accuracy of comparing the predicted and actual scale amounts is ±0.005 kg / m². The regularization coefficients λ1 and λ2 are set to 0.01 and 0.005 respectively. The number of input parameters M is 8, including key parameters such as pressure and temperature, with a parameter normalization range of 0-1. In loss calculation, the squared error between the predicted and actual values ​​is first calculated, with a single sample error precision of ±0.00001 (kg / m²)². Then, the average error of all samples is taken, with a mean calculation precision of ±0.000001 (kg / m²)². Next, the L2 norm of the predicted scale gradient is calculated, with a gradient calculation step size of 0.01 and a norm precision of ±0.001. Finally, the sum of squares of the products of the partial derivatives of each input parameter and the parameter is calculated, with partial derivative precision of ±0.0001 and sum of squares precision of ±0.001. When calculating the total loss value, the results of each part are superimposed according to their weights: squared error accounts for 70%, gradient norm accounts for 20%, and parameter partial derivatives account for 10%. The final loss value is retained to 6 decimal places. The model parameters are optimized by iteratively reducing the loss value. Optimization stops when the rate of change of the loss value is less than 0.0001 for 10 consecutive rounds, providing an efficient parameter optimization basis for the machine learning modeling in step S5.

[0042] Preferably, step S3 includes the following sub-steps: S31, extracting the ion concentration, residence time, and pipe wall roughness parameters at different depths in the wellbore obtained in S1 from the oil and gas wellbore scaling dynamic analysis platform, and dividing the parameters into layers according to a wellbore depth interval of 0.5m to form a depth-parameter corresponding dataset; S32, inputting the layered dataset into the input layer of the dynamic transfer function bag external scaling algorithm, and performing time series decomposition on the ion concentration parameters of each depth layer to obtain ion concentration change components at different time scales; S33, substituting the decomposed ion concentration change components and the residence time and pipe wall roughness parameters at the corresponding depths into the iterative formula of the dynamic transfer function bag external scaling algorithm, setting the iteration step size to 0.1s, and performing 300 iterations to obtain intermediate scaling amount data at different depths; S34, performing mean filtering on the intermediate scaling amount data obtained from the 300 iterations to remove abnormal fluctuation values ​​generated during the iteration process, and outputting the preliminary scaling amount prediction results at different depths.

[0043] Specifically, step S3 involves parameter processing and preliminary scaling calculation through four sub-steps, S31 to S34. In S31, the wellbore ion concentration, residence time, and pipe wall roughness parameters collected in step S1 are extracted from the oil and gas wellbore scaling dynamic analysis platform. These parameters are then divided into 0.5m wellbore depth intervals to form a depth-parameter correspondence dataset, ensuring that each depth unit has complete parameter support. The divided dataset must cover the entire wellbore depth, with a depth error controlled within ±0.01m. In S32, the layered dataset is input into the algorithm's input layer. The ion concentration parameters for each depth layer undergo time-series decomposition. This decomposition process must separate the variation components at different time scales, with the time scale division accuracy controlled within ±1 hour to ensure accurate capture of ion concentration fluctuations over time. S33 substitutes the decomposed ion concentration change component, the residence time at the corresponding depth, and the pipe wall roughness parameter into the algorithm iteration formula, sets the iteration step size to 0.1 seconds and the number of iterations to 300, and the parameter calculation error after each iteration must be less than 0.001. The calculation accuracy is improved through multiple iterations. S34 performs mean filtering on the intermediate scale amount data of 300 iterations, sets the filtering window to 5 data points, removes abnormal fluctuation values ​​that deviate from the average value by more than 3 times the standard deviation, and finally outputs the preliminary scale amount prediction results at each depth position with an accuracy controlled within ±0.01 kg / m², providing accurate initial data for the thermodynamic correction in step S4.

[0044] Preferably, step S4 includes the following sub-steps: S41, selecting temperature, scale ion saturation, and wellbore inner diameter parameters from the basic parameters obtained in S1, and matching them with the preliminary scale amount prediction results output in S3 to ensure that each preliminary scale amount data corresponds to a unique temperature, scale ion saturation, and wellbore inner diameter parameter; S42, importing the matched data into the chemical thermodynamic transfer function correction algorithm, calling the algorithm's built-in thermodynamic parameter database, and obtaining the equilibrium saturation of scale ions and the basic thermodynamic parameters of temperature-related thermodynamic coefficients at the current temperature; S43, substituting the preliminary scale amount data, the matched temperature, scale ion saturation, wellbore inner diameter parameters, and the obtained basic thermodynamic parameters into the calculation formula of the chemical thermodynamic transfer function correction algorithm, performing thermodynamic balance calculations, and obtaining the correction coefficients corresponding to each data point; S44, multiplying the preliminary scale amount data by the corresponding correction coefficients to obtain the corrected scale amount prediction result, and simultaneously recording the changes in different parameters during the correction process to form a correction process data document.

[0045] Specifically, step S4 completes the initial scaling amount correction through four sub-steps, S41 to S44. S41 filters temperature, scaling ion saturation, and wellbore inner diameter parameters from the basic parameters of step S1 and matches them with the initial scaling amount prediction results output in S3. The matching process must ensure that each initial scaling amount data corresponds to a unique set of thermodynamic parameters, and the matching accuracy must reach 100% to avoid parameter mismatch affecting the correction results. S42 imports the matched data into the correction algorithm, calling the algorithm's built-in thermodynamic parameter database. The database stores basic data such as scaling ion equilibrium saturation and temperature-related thermodynamic coefficients at different temperatures. The data query accuracy is controlled within ±0.5% to ensure the accuracy and reliability of the obtained thermodynamic parameters. S43... The quantitative data, matched thermodynamic parameters, and queried basic thermodynamic parameters are substituted into the correction algorithm formula to perform thermodynamic equilibrium calculation. During the calculation, the temperature influence coefficient adjustment step size is set to 0.01, and the saturation correction ratio calculation error is less than 0.001. Finally, the correction coefficients corresponding to each data are obtained. S44 multiplies the preliminary scaling data with the corresponding correction coefficients to obtain the corrected scaling prediction result, with the accuracy improved to ±0.005 kg / m². At the same time, the changes of each parameter during the correction process are recorded, and the change recording accuracy is retained to 3 decimal places. The resulting correction process data document must include the complete parameter change trajectory to provide a basis for subsequent result traceability.

[0046] Preferably, step S5 includes the following sub-steps: S51, combining the scale prediction result corrected in S4 with the corresponding wellbore depth, fluid pressure, temperature, and flow velocity parameters to construct a training sample set for the machine learning model, and dividing the sample set into a training set and a validation set in a 7:3 ratio; S52, selecting a neural network model based on improved transfer function as the training model, setting the number of nodes in the input layer to 8 (corresponding to 8 input parameters), setting 3 hidden layers with 64, 32, and 16 nodes in each layer respectively, and setting the number of nodes in the output layer to 1 (corresponding to the scale prediction value); S53, training the model using the training set, setting the learning rate to 0.001, and the training rounds to 500 rounds. After each round of training, the model prediction error is calculated using the validation set. Training stops when the rate of change of the validation error is less than 0.0001 for 10 consecutive rounds; S54, applying the trained model to the entire sample set, outputting the scale prediction value corresponding to each sample, and combining the wellbore position parameters corresponding to the sample to draw dynamic scale prediction curves at different positions in the wellbore using a linear interpolation method.

[0047] Specifically, step S5 establishes a mapping model and outputs a dynamic scaling prediction curve through four sub-steps, S51 to S54. S51 combines the scale prediction result corrected in S4 with the corresponding wellbore depth, fluid pressure, temperature, and flow velocity parameters to construct a training sample set for the machine learning model. This set is divided into a training set and a validation set in a 7:3 ratio. Random sampling is required during sample partitioning to ensure consistent parameter distribution between the two sets of samples, with sampling error controlled within ±5%. S52 selects a neural network model based on an improved transfer function, setting the input layer to 8 nodes (corresponding to 8 input parameters), the hidden layers to 3 layers with 64, 32, and 16 nodes respectively, and the output layer to 1 node (corresponding to the predicted scale value). The model structure must ensure efficient parameter transfer, with the initialization error of the parameter weights for each layer being less than [missing value]. 0.01; S53 uses the training set to train the model, setting a learning rate of 0.001 and 500 training rounds. After each training round, the model prediction error is calculated using the validation set. The error calculation adopts the mean square error method. Training is stopped when the rate of change of the validation error is less than 0.0001 for 10 consecutive rounds to ensure that the model reaches a stable training state; S54 applies the trained model to the entire sample set, outputs the predicted value of scale amount for each sample, and combines the wellbore location parameters corresponding to the sample to draw a dynamic scale prediction curve using a linear interpolation method. The interpolation interval is set to 0.1m, and the curve drawing accuracy is controlled within ±0.001kg / m², clearly presenting the scale distribution trend at each location in the wellbore.

[0048] The seepage coupling transfer function scaling prediction model is a model in this invention that correlates fluid seepage characteristics with initial scaling trends. Its essence is to transform dispersed seepage parameters into scaling trend indicators with predictive significance through a transfer function. In the implementation process, the fluid pressure (0-100MPa, accuracy ±0.1MPa), flow velocity (0.1-5m / s, accuracy ±0.01m / s), viscosity (0.1-10mPa・s, accuracy ±0.001mPa・s), and density (500-1500kg / m³, accuracy ±0.1kg / m³) parameters collected in step S1 are first retrieved from the oil and gas wellbore scaling dynamic analysis platform. These parameters are then grouped at 0.5m wellbore depth intervals, and the average value of the parameters for each group is taken over 10 consecutive minutes. Next, the wellbore permeability (0.1-1000mD) under different pressures and viscosities is calculated using the permeability function. The correlation between pressure gradient and flow velocity is constructed, and the flow velocity-density coupling coefficient (0.001-0.1) and the seepage resistance correction coefficient (0.85) are introduced. These parameters are then mapped to the initial scaling trend index with values ​​of 0-1 using the transfer function. This model establishes a quantitative correlation between fluid seepage state and scaling trend, providing data support at the seepage level for subsequent predictions. It overcomes the shortcomings of traditional models that ignore the impact of seepage characteristics on scaling, improves the integrity of the underlying logic of scaling prediction, and ensures that subsequent calculations are based on the real fluid flow state, laying the foundation for accurate prediction.

[0049] The dynamic transfer function-based external scaling algorithm is the algorithm used in this invention to calculate the initial scaling amount at different depths in the wellbore. Essentially, it captures the influence of spatiotemporal changes in parameters on the scaling amount through dynamic iteration, avoiding static calculation bias. In implementation, the seepage-scaling correlation data from step S2 and the ion concentration (accuracy 0.01 mol / L), residence time (accuracy ±1 second), and pipe wall roughness (accuracy ±0.01 μm) parameters from step S1 are first retrieved from the platform. Ion concentration data for 24 hours (360 data points) are extracted at 0.5 m depth intervals, residence time is calculated in 100 m segments, and roughness is extracted at 1 m intervals. Then, the ion concentration time series is decomposed (trend term window 24 hours, period term accuracy ±1 hour), substituted into the dynamic transfer function, and an iteration step size of 0.1 seconds and 300 iterations are set, with the weight coefficient adjusted in each iteration (amplitude ≤5%). Finally, outliers (deviations from the mean by 3 times the standard deviation) are removed, and the mean is taken as the initial scaling amount (accuracy ±0.01 kg / m²). This algorithm outputs the preliminary scale amount at each depth, reflecting the impact of dynamic parameter changes on scale formation. It solves the problem that traditional static calculation algorithms cannot adapt to the spatiotemporal fluctuations of wellbore parameters, improves the dynamism and accuracy of scale amount calculation, and provides initial data that closely reflects actual working conditions for subsequent correction.

[0050] The chemical thermodynamic transfer function correction algorithm is the algorithm in this invention for eliminating non-equilibrium interference and optimizing the initial scaling amount. Essentially, it corrects the accuracy of the initial prediction results based on thermodynamic equilibrium laws. In the implementation process, the initial scaling amount data from step S3 is first retrieved along with the temperature (20-150℃, accuracy ±0.1℃), scaling ion saturation (accuracy ±1%), and wellbore inner diameter (accuracy ±0.1mm) parameters from step S1, ensuring a one-to-one match (100% accuracy). Then, the built-in thermodynamic database is queried to obtain the equilibrium saturation (accuracy ±0.5%) and temperature-related thermodynamic coefficient (0.1-1.0) at the corresponding temperature. These are combined with the wellbore inner diameter correction coefficient (0.5-1.2) and the saturation temperature gradient response coefficient (0.03), and substituted into the algorithm to calculate the non-equilibrium correction coefficient (dynamically adjusted according to the saturation difference, with the coefficient increasing by 5% for every 10% increase in the difference). Finally, the initial scaling amount is multiplied by the correction coefficient to obtain a correction result with an accuracy of ±0.005 kg / m². This algorithm eliminates the interference of fluid non-equilibrium state on the amount of scaling, improves the thermodynamic accuracy of the prediction results, makes up for the lack of thermodynamic verification in traditional prediction, makes the prediction results conform to the law of material balance, significantly reduces the prediction bias caused by non-equilibrium state, and provides high-quality data for machine learning modeling.

[0051] The oil and gas wellbore scaling dynamic analysis platform is the carrier integrating data acquisition, model calculation, and result display in this invention. Essentially, it provides a unified data interaction and computational support environment for each stage. In implementation, the platform connects to pressure sensors, temperature sensors, and other devices through multiple interfaces to complete parameter acquisition (pressure once / minute, temperature once / minute) and digital signal conversion, storing the data in a database in a "parameter-time-depth" format. It has built-in model / algorithm modules for seepage coupling, dynamic scaling, and thermodynamic correction, supporting parameter retrieval (response time ≤ 1 second), iterative calculation (300 iterations ≤ 5 minutes), and result storage. It provides a 3D wellbore model (1:100 scale) and color gradient display (scaling amount blue-yellow-orange-red corresponding to 0-0.1-0.5-1.0 kg / m²), supporting dynamic playback over time (1 month to 1 year cycle) and data query (click to display depth, scaling amount, and fluid parameters). The platform enables seamless operation of the entire scaling prediction process, integrating data, models, and display functions. It solves the problems of scattered data and disconnected modules in traditional prediction, providing operators with an intuitive operating interface and decision-making basis, ensuring efficient collaboration among various technical links, and ultimately achieving dynamic and accurate prediction of wellbore scaling, providing visualized and traceable technical support for scale prevention and removal in oil and gas fields.

[0052] like Figure 2As shown, a wellbore scaling prediction system based on transfer function and machine learning is presented. This system is applied to a wellbore scaling prediction method based on transfer function and machine learning, and includes: a multi-dimensional wellbore parameter acquisition unit, which is connected to pressure sensors, temperature sensors, flow rate sensors, ion concentration detectors, and wellbore topography scanners within the oil and gas wellbore. This unit acquires parameters such as fluid pressure, temperature, flow rate, ion concentration, wellbore inner diameter, and pipe wall roughness, and converts the acquired parameters into digital signals for transmission to a parameter preprocessing and storage unit; a parameter preprocessing and storage unit, connected to the multi-dimensional wellbore parameter acquisition unit, receives the transmitted digital signals, performs noise reduction processing, and stores the signals according to parameter type in a built-in database. It also establishes an association index between parameters and acquisition time and wellbore depth to provide data support for subsequent model calculations; and a seepage coupling-dynamic scaling calculation unit, connected to both the parameter preprocessing and storage unit and the oil and gas wellbore scaling dynamic analysis platform. This unit retrieves fluid seepage-related parameters from the parameter preprocessing and storage unit and calculates the scaling using a built-in seepage coupling transfer function scaling prediction model and a dynamic transfer function external scaling algorithm. The system performs calculations and outputs preliminary scaling prediction results to the thermodynamic correction unit. The thermodynamic correction unit, connected to the seepage coupling-dynamic scaling calculation unit and the parameter preprocessing and storage unit, receives the preliminary scaling prediction results, calls the temperature and scaling ion saturation parameters from the parameter preprocessing and storage unit, corrects the preliminary scaling amount using a chemical thermodynamic transfer function correction algorithm, and outputs the corrected scaling data to the machine learning modeling unit. The machine learning modeling and prediction unit, connected to the thermodynamic correction unit and the parameter preprocessing and storage unit, obtains the corrected scaling data and corresponding wellbore location parameters, establishes a mapping relationship between scaling amount and parameters using a trained machine learning model, and outputs a dynamic scaling prediction curve to the result visualization and display unit. The result visualization and display unit, connected to the machine learning modeling and prediction unit and the oil and gas wellbore scaling dynamic analysis platform, receives the dynamic scaling prediction curve data, and uses the platform's built-in visualization module, with a 3D wellbore model as the carrier, to display the scaling distribution patterns and trends in different sections of the wellbore during different mining cycles. It also supports users in querying and exporting the prediction results.

[0053] A wellbore scaling prediction method and system based on transfer function and machine learning is proposed. First, key parameters such as wellbore pressure, temperature, and ion concentration are comprehensively collected to provide a complete data foundation for subsequent calculations. Then, a seepage-coupled transfer function scaling prediction model is invoked to enhance the correlation between fluid seepage characteristics and scaling trends, addressing the problem of insufficient multi-model coupling in traditional techniques. Next, a dynamic transfer function-based out-of-bag scaling algorithm is used to perform layered dynamic iterative calculations on parameters at different wellbore depths, improving the response speed and adaptability to spatiotemporal changes in parameters and compensating for the weak dynamics of traditional algorithms. Finally, a chemical-thermodynamic transfer function correction algorithm is used to eliminate non-equilibrium interference, and a precise mapping between parameters and scaling amount is established by combining the machine learning model, significantly improving the thermodynamic accuracy and overall precision of the prediction results, solving the problems of insufficient effective correction and large prediction deviations in traditional techniques.

[0054] At the system level, this prediction system achieves overall efficiency improvement through the coordinated operation of various functional units, further enhancing its ability to overcome the shortcomings of the background technology: the multi-dimensional wellbore parameter acquisition unit precisely connects with various sensors to improve the comprehensiveness and real-time nature of parameter acquisition, avoiding the problem of one-sided data acquisition in traditional systems; the parameter preprocessing and storage unit establishes parameter association indexes to improve data retrieval efficiency and provide efficient support for subsequent calculations; the seepage coupling-dynamic scaling calculation unit, thermodynamic correction unit, and machine learning modeling unit work together in sequence to improve the coherence of multi-model calculations and the accuracy of correction and modeling, solving the defects of disconnected modules and low processing efficiency in traditional systems; the result visualization and display unit presents the prediction results in a 3D model, improving the readability and ease of application of the results, ultimately providing dynamic and accurate scaling prevention and control basis for oil and gas fields, and effectively improving the exploitation guarantee capability.

[0055] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," "link," and "fix" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0056] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various equivalent changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A wellbore scaling prediction method based on transfer function and machine learning, characterized in that, Includes the following steps: S1. Obtain basic parameters for wellbore scaling prediction, including fluid pressure, temperature, flow rate, ion concentration, wellbore inner diameter, pipe wall roughness, fluid viscosity, fluid density, scaling ion saturation, and residence time, and import these parameters into the oil and gas wellbore scaling dynamic analysis platform. S2. Using the oil and gas wellbore scaling dynamic analysis platform, call the seepage coupling transfer function scaling prediction model to couple the pressure, flow rate, viscosity, and density parameters related to fluid seepage characteristics obtained in S1, establishing a correlation between fluid seepage state and initial scaling trend. S3. Based on the correlation obtained in S2, start the dynamic transfer function bag-side scaling algorithm to dynamically iteratively calculate the ion concentration, residence time, and pipe wall roughness parameters at different depths in the wellbore, and input... S3. Preliminary scaling prediction results at different depths are generated; S4. The preliminary scaling prediction results output from S3 are input into the chemical thermodynamic transfer function correction algorithm. Combined with the temperature, scaling ion saturation, and wellbore inner diameter parameters from S1, the preliminary scaling prediction results are thermodynamically balanced to eliminate the interference of non-equilibrium factors on the prediction results; S5. A machine learning model is used to train the scale prediction results corrected in S4 with the corresponding wellbore position parameters to establish a mapping model between scaling amount and wellbore spatial position and fluid parameters, outputting dynamic scaling prediction curves for different wellbore positions; S6. The dynamic scaling prediction curves output from S5 are visualized through the oil and gas wellbore scaling dynamic analysis platform to show the scaling distribution patterns and trends in different sections of the wellbore during different production cycles.

2. The wellbore scaling prediction method based on transfer function and machine learning according to claim 1, characterized in that, The expression for the seepage coupling transfer function scaling prediction model is as follows: ,in, This is the scaling tendency function under the effect of seepage coupling. For fluid pressure, For fluid velocity, For fluid viscosity, For fluid density, This represents the concentration of scale ions. For wellbore depth, The permeability function varies with pressure and viscosity. For pressure gradient, The velocity-density coupling coefficient is... This is the correction factor for seepage resistance.

3. The wellbore scaling prediction method based on transfer function and machine learning according to claim 2, characterized in that, The expression for the dynamic transfer function external fouling algorithm is: ,in, This represents the initial scale buildup on the outside of the bag. For wellbore depth, Total stay time For integration variables, for time Concentration of scale ions at depth for Wellbore wall roughness at depth The diffusion coefficient is... for time Fluid velocity at depth This is the depth-dependent scaling rate coefficient. is the concentration change response coefficient.

4. The wellbore scaling prediction method based on transfer function and machine learning according to claim 3, characterized in that, The expression for the chemical thermodynamic transfer function correction algorithm is: ,in, This is the corrected amount of scale. For fluid temperature, For scale ion saturation, The inner diameter of the wellbore. This is the initial amount of scaling. This is a temperature-dependent thermodynamic coefficient. for Scaling ion balance saturation at temperature This is the correction factor for the wellbore inner diameter. For reference temperature, is the saturation temperature gradient response coefficient.

5. The wellbore scaling prediction method based on transfer function and machine learning according to claim 4, characterized in that, The model expression used for parameter correlation in the dynamic analysis platform for scaling in oil and gas wellbores is as follows: ,in, For the platform parameter correlation matrix, These are the weighting coefficients. For the wellbore circumference angle, This is a seepage-coupled scaling tendency function. To correct the amount of scale, This represents the initial amount of scaling.

6. The wellbore scaling prediction method based on transfer function and machine learning according to claim 5, characterized in that, The loss function expression during the training process of the machine learning model is as follows: middle, This represents the model loss value. For model parameters, For the sample size, For the first Predicted scale amount for each sample For the first The actual amount of scaling on each sample The regularization coefficient is . To predict the gradient of scaling amount, The number of input parameters, For the first One input parameter.

7. The wellbore scaling prediction method based on transfer function and machine learning according to claim 6, characterized in that, S3 includes the following steps: S31, extracting ion concentration, residence time, and pipe wall roughness parameters at different depths in the wellbore obtained in S1 from the oil and gas wellbore scaling dynamic analysis platform, and dividing the parameters into layers according to a wellbore depth interval of 0.5m to form a depth-parameter corresponding dataset; S32, inputting the layered dataset into the input layer of the dynamic transfer function bag external scaling algorithm, and performing time series decomposition on the ion concentration parameters of each depth layer to obtain ion concentration change components at different time scales; S33, substituting the decomposed ion concentration change components and the residence time and pipe wall roughness parameters at the corresponding depths into the iterative formula of the dynamic transfer function bag external scaling algorithm, setting the iteration step size to 0.1s, and performing 300 iterations to obtain intermediate scaling amount data at different depths; S34, performing mean filtering on the intermediate scaling amount data obtained from the 300 iterations to remove abnormal fluctuation values ​​generated during the iteration process, and outputting the preliminary scaling amount prediction results at different depths.

8. The wellbore scaling prediction method based on transfer function and machine learning according to claim 7, characterized in that, S4 includes the following sub-steps: S41. Select temperature, scale ion saturation, and wellbore inner diameter parameters from the basic parameters obtained in S1, and match them with the preliminary scale amount prediction results output in S3 to ensure that each preliminary scale amount data corresponds to a unique temperature, scale ion saturation, and wellbore inner diameter parameter; S42. Import the matched data into the chemical thermodynamic transfer function correction algorithm, call the built-in thermodynamic parameter database of the algorithm, and obtain the equilibrium saturation of scale ions and the basic thermodynamic parameters of temperature-related thermodynamic coefficients at the current temperature; S43. Substitute the preliminary scale amount data, the matched temperature, scale ion saturation, wellbore inner diameter parameters, and the obtained basic thermodynamic parameters into the calculation formula of the chemical thermodynamic transfer function correction algorithm to perform thermodynamic balance calculation and obtain the correction coefficient corresponding to each data; S44. Multiply the preliminary scale amount data by the corresponding correction coefficient to obtain the corrected scale amount prediction result, and record the changes of different parameters during the correction process to form a correction process data document.

9. A wellbore scaling prediction method based on transfer function and machine learning according to claim 8, characterized in that, S5 includes the following steps: S51, combine the scale prediction result corrected in S4 with the corresponding wellbore depth, fluid pressure, temperature, and flow velocity parameters to construct a training sample set for the machine learning model, and divide the sample set into a training set and a validation set in a 7:3 ratio; S52, select a neural network model based on the improved transfer function as the training model, set the number of nodes in the input layer to 8, the number of hidden layers to 3 with 64, 32, and 16 nodes respectively, and the number of nodes in the output layer to 1; S53, train the model using the training set, set the learning rate to 0.001, and the training rounds to 500. After each round of training, use the validation set to calculate the model prediction error. Stop training when the rate of change of the validation error is less than 0.0001 for 10 consecutive rounds; S54, apply the trained model to the entire sample set, output the scale prediction value corresponding to each sample, and combine the wellbore location parameters corresponding to the sample to draw dynamic scale prediction curves at different locations in the wellbore using a linear interpolation method.

10. A wellbore scaling prediction system based on transfer function and machine learning, characterized in that, This system is applied to a wellbore scaling prediction method based on transfer function and machine learning as described in claim 1. It includes: a multi-dimensional wellbore parameter acquisition unit, connected to pressure sensors, temperature sensors, flow rate sensors, ion concentration detectors, and wellbore topography scanners within the oil and gas wellbore, used to acquire fluid pressure, temperature, flow rate, ion concentration, wellbore inner diameter, and pipe wall roughness parameters, and converting the acquired parameters into digital signals for transmission to a parameter preprocessing and storage unit; a parameter preprocessing and storage unit, connected to the multi-dimensional wellbore parameter acquisition unit, receiving the transmitted digital signals, denoising the signals, and storing them in a built-in database according to parameter type, while simultaneously establishing an association index between parameters and acquisition time and wellbore depth to provide data support for subsequent model calculations; and a seepage coupling-dynamic scaling calculation unit, connected to the parameter preprocessing and storage unit and the oil and gas wellbore scaling dynamic analysis platform, which retrieves fluid seepage-related parameters from the parameter preprocessing and storage unit, performs calculations using the built-in seepage coupling transfer function scaling prediction model and dynamic transfer function bag-side scaling algorithm, and outputs preliminary... The scale prediction results are sent to the thermodynamic correction unit. This unit, connected to the seepage coupling-dynamic scaling calculation unit and the parameter preprocessing and storage unit, receives the preliminary scale prediction results, calls the temperature and scaling ion saturation parameters from the parameter preprocessing and storage unit, corrects the preliminary scale amount using a chemical thermodynamic transfer function correction algorithm, and outputs the corrected scale data to the machine learning modeling unit. The machine learning modeling and prediction unit, connected to the thermodynamic correction unit and the parameter preprocessing and storage unit, obtains the corrected scale data and corresponding wellbore location parameters, establishes a mapping relationship between scale amount and parameters using a trained machine learning model, and outputs the dynamic scaling prediction curve to the result visualization and display unit. The result visualization and display unit, connected to the machine learning modeling and prediction unit and the oil and gas wellbore scaling dynamic analysis platform, receives the dynamic scaling prediction curve data, and uses the platform's built-in visualization module, with a 3D wellbore model as the carrier, to display the scale distribution patterns and trends in different sections of the wellbore during different mining cycles. It also supports users in querying and exporting the prediction results.

Citation Information

Cited By

  • A wellbore multiphase flow digital twin monitoring method and system

    CN122197742A