An ultra-long horizontal well drilling parameter evolution prediction method and early warning method
By constructing a fingerprint vector of the current working condition and retrieving regional cases, a priori evolutionary trajectories and their uncertainties are generated. Combined with an evolutionary consistency inferencer for fusion processing, the problems of drift and low confidence in drilling parameter prediction results in existing technologies are solved. This significantly improves the accuracy and reliability of drilling parameter prediction, effectively avoids technical risks, and realizes the precise application of the technology in the field of environmental pollution prevention and control. Specifically, the technology is applied to intelligent analysis and safety early warning of drilling engineering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU NORTH OIL EXPLORATION DEV TECH
- Filing Date
- 2026-04-22
- Publication Date
- 2026-05-26
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN122087591A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent analysis and safety early warning technology for drilling engineering, specifically to a method for predicting the evolution of drilling parameters in ultra-long horizontal wells and an early warning method. Background Technology
[0002] In related technologies, for scenarios involving sudden changes in drilling conditions (encountering abnormal formations, tool failure, or sudden changes in operating procedures) in ultra-long horizontal wells, existing drilling parameter prediction methods cannot dynamically adapt to changes in operating conditions, nor can they quantify trend consistency and adaptively adjust the fusion strategy. This results in mean drift and low confidence in the prediction results, leading to technical problems in related technologies that make it difficult to accurately reflect the true evolution of drilling parameters and effectively avoid risks. Summary of the Invention
[0003] The technical problem this invention aims to solve is that, in related technologies, for scenarios involving abrupt changes in drilling conditions (encountering abnormal formations, tool failure, or sudden changes in operating procedures) in ultra-long horizontal wells, existing drilling parameter prediction methods fail to dynamically adapt to changes in operating conditions, quantify trend consistency, and adaptively adjust fusion strategies. This results in mean drift and low confidence levels in the prediction results, leading to a technical problem where related technologies cannot accurately reflect the true evolution of drilling parameters and effectively mitigate risks. The purpose is to provide a method for predicting the evolution of drilling parameters in ultra-long horizontal wells and an early warning method, solving the technical problem of accurately reflecting the true evolution of drilling parameters and effectively mitigating risks.
[0004] This invention is achieved through the following technical solution:
[0005] In a first aspect, the present invention provides a method for predicting the evolution of drilling parameters in ultra-long horizontal wells, including:
[0006] Acquire real-time multi-source drilling data;
[0007] Construct a fingerprint vector of the current working condition based on real-time multi-source drilling data;
[0008] Input the fingerprint vector of the current working condition into the regional case retrieval device to retrieve at least one set of historical cases similar to the current working condition;
[0009] Based on historical data of target parameters from at least one similar historical case, generate the prior evolution trajectory of the target drilling parameters and its prior uncertainty.
[0010] The real-time observations of the target drilling parameters, the prior evolution trajectory, and its prior uncertainty are input into the evolution consistency inferrer, and consistency-aware fusion processing is performed to output a corrected multi-step prediction sequence. The consistency-aware fusion processing includes at least: evaluating the consistency measure between the real-time evolution trend and the prior evolution trend based on the real-time observations and the prior evolution trajectory; determining the dynamic fusion weights for the prior information and the real-time observation information based on the consistency measure, prior uncertainty, and observation uncertainty; and coordinating the correction of the values and uncertainties of the prior evolution trajectory based on the dynamic fusion weights to obtain the corrected multi-step prediction sequence.
[0011] Furthermore, the step of acquiring real-time multi-source drilling data includes:
[0012] Receive real-time multi-source drilling data; wherein, the real-time multi-source drilling data includes at least two of the following: well depth, mechanical drilling speed, drilling pressure, rotational speed, torque, standpipe pressure, inlet and outlet density, inlet and outlet temperature, sand return rate, gas measurement value, well inclination azimuth, vibration while drilling, gamma while drilling, and resistivity while drilling.
[0013] The received real-time multi-source drilling data is subjected to quality assessment to obtain the reliability of each data channel. The quality assessment includes: for each data channel, obtaining the original observation value, physical reasonable upper and lower bounds, reference value, and missing data marker; determining a first penalty factor based on the degree to which the original observation value exceeds the physical reasonable upper and lower bounds; determining a second penalty factor based on the degree to which the original observation value deviates from the reference value; determining a third penalty factor based on the missing data marker; and determining the reliability of the channel at the corresponding time by multiplying the first, second, and third penalty factors.
[0014] Using well depth as the main axis, real-time multi-source drilling data is interpolated and aligned to a preset depth grid to obtain depth-domain aligned real-time multi-source drilling data. Specifically, for each target depth point, the interpolation weight is determined based on the distance between the original data points in the neighborhood and the target depth point, as well as the reliability of the original data point. Then, a weighted average is performed on each original data point to obtain depth-domain aligned real-time multi-source drilling data.
[0015] Furthermore, the step of constructing the current operating condition fingerprint vector based on real-time multi-source drilling data includes:
[0016] Statistical features, evolutionary gradient features, and consistency features characterizing the physical correlation of multiple channels are extracted from real-time multi-source drilling data at different depth scales. The statistical features include weighted mean and weighted variance calculated based on the reliability of each data point at different depth scales. The evolutionary gradient features include first-order and / or second-order differences of the data points. The consistency features include at least one of inlet / outlet density difference, inlet / outlet temperature difference, pressure-displacement sensitivity, and torque-speed sensitivity.
[0017] The extracted features are combined into the original fingerprint vector;
[0018] Based on the credibility of the data channels corresponding to each feature, the original fingerprint vector is weighted to obtain the weighted current operating condition fingerprint vector. The weighting is achieved by constructing a diagonal weighting matrix based on the aggregated credibility values of the data channels corresponding to each feature, and multiplying the diagonal weighting matrix with the original fingerprint vector to obtain the weighted current operating condition fingerprint vector.
[0019] Further, the step of inputting the current operating condition fingerprint vector into the regional case retrieval device to retrieve at least one set of historical cases similar to the current operating condition includes:
[0020] Calculate the weighted distance between the fingerprint vector of the current operating condition and the fingerprint vectors of each historical case in the regional case library;
[0021] The similarity ranking is determined based on weighted distance, and at least one historical case with the highest similarity is selected to form the set of historical cases.
[0022] Further, the step of calculating the weighted distance between the current operating condition fingerprint vector and the fingerprint vectors of each historical case in the regional case library includes:
[0023] The weighted Mahalanobis distance is used to calculate the weighted distance between the fingerprint vector of the current working condition and the fingerprint vectors of each historical case;
[0024] The step of determining the similarity ranking based on weighted distance and selecting at least one historical case with the highest similarity to form the historical case set includes:
[0025] Based on the weighted Mahalanobis distance, attention weights are calculated for each historical case, with higher weights for smaller distances.
[0026] At least one historical case with the highest attention weight is selected to form the historical case set; the process further includes retrieval optimization processing; wherein the retrieval optimization processing includes at least one of the following methods:
[0027] A two-stage retrieval method is adopted. First, a candidate case set is quickly retrieved from the regional case library based on the low-dimensional representation of the fingerprint vector of the current working condition. Then, the weighted Mahalanobis distance is calculated in the candidate case set.
[0028] When calculating the weighted Mahalanobis distance, the covariance matrix of the fingerprint vectors of cases in the regional case library or its diagonal approximation matrix is used.
[0029] Furthermore, the step of generating the prior evolution trajectory of the target drilling parameters and its prior uncertainty based on historical data of the target parameters from at least one similar historical case includes:
[0030] Based on the attention weights, the historical data of the target parameters of at least one similar historical case are weighted and summed to obtain the prior evolution trajectory.
[0031] Based on the attention weights and prior evolution trajectories, the weighted variance of the historical data of the target parameters of similar historical cases relative to the prior evolution trajectory is calculated, and a preset lower limit of variance is added to the weighted variance to obtain the prior uncertainty.
[0032] Furthermore, the step of evaluating the consistency measure between the real-time evolutionary trend and the prior evolutionary trend based on real-time observations and prior evolutionary trajectories includes:
[0033] Calculate the first evolution gradient of the real-time observation at the current moment and the second evolution gradient of the prior evolution trajectory at the current moment;
[0034] Calculate the dot product of the first evolution gradient and the second evolution gradient, and the product of the magnitude of the first evolution gradient and the magnitude of the second evolution gradient;
[0035] Based on the ratio of the dot product to the product, the directional similarity between the real-time evolution trend and the prior evolution trend is determined, and the directional similarity is mapped to a preset interval to obtain the consistency measure.
[0036] Furthermore, the step of determining the dynamic fusion weights for prior information and real-time observation information based on consistency metrics, prior uncertainty, and observation uncertainty includes:
[0037] Calculate the product of the consistency measure and the prior uncertainty, and use it as the first fusion factor;
[0038] The ratio of the observation uncertainty to the reliability of the real-time observation is calculated and used as the observation noise factor.
[0039] The sum of the first fusion factor and the observation noise factor is calculated as the second fusion factor;
[0040] The ratio of the first fusion factor to the second fusion factor is determined as the dynamic fusion weight.
[0041] Furthermore, the step of collaboratively correcting the numerical values and uncertainties of the prior evolution trajectory based on dynamic fusion weights to obtain the corrected multi-step prediction sequence includes:
[0042] Calculate the residual between the real-time observation at the current moment and the prior value of the prior evolution trajectory at the current moment, and use it as the current observation residual;
[0043] For each prediction step, the product of the dynamic fusion weight and the preset step size decay factor is calculated as the step size correction coefficient.
[0044] The prior values of the prior evolution trajectory at the corresponding future time are offset and corrected by multiplying the step size correction coefficient with the current observation residual, thus obtaining the corrected multi-step prediction mean sequence.
[0045] Calculate the first correction factor; where the first correction factor is the difference between one and the step size correction coefficient;
[0046] The first variance component is obtained by multiplying the first correction factor by the value of the prior uncertainty at the corresponding future time.
[0047] Based on the consistency metric, the degree of trend divergence is determined, and the preset expansion baseline value is scaled based on the degree of trend divergence to obtain the second variance component.
[0048] The sum of the first variance component and the second variance component is calculated and used as the corrected multi-step prediction variance sequence.
[0049] The corrected multi-step prediction mean sequence and the corresponding multi-step prediction variance sequence are output as the corrected multi-step prediction sequence.
[0050] Secondly, the present invention provides a method for early warning of drilling parameter evolution in ultra-long horizontal wells, including:
[0051] Obtain the corrected multi-step prediction sequence of the target drilling parameters; wherein, the above-mentioned method for predicting the evolution of drilling parameters in ultra-long horizontal wells is used to obtain the corrected multi-step prediction sequence of the target drilling parameters.
[0052] Based on the corrected multi-step prediction sequence, calculate the risk probability of at least one future prediction step;
[0053] If the risk probability exceeds a preset threshold, a warning message will be output.
[0054] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0055] The method for predicting the evolution of drilling parameters in ultra-long horizontal wells provided by this invention acquires real-time multi-source drilling data and constructs a fingerprint vector of the current operating condition, which can accurately characterize the characteristics of the current drilling condition and provide a reliable basis for the retrieval of similar historical cases. A set of similar historical cases is retrieved through a regional case retrieval tool, and based on this set, a priori evolution trajectory and its prior uncertainty of the target drilling parameters are generated, providing a reasonable priori reference for subsequent predictions. An evolution consistency inferencer performs consistency-aware fusion processing, quantitatively evaluating the consistency measure between the real-time evolution trend and the prior evolution trend, dynamically adjusting the fusion weights of prior information and real-time observation information, and simultaneously coordinating the correction of the values and uncertainties of the prior evolution trajectory. This effectively adapts to the sudden change scenarios of drilling conditions in ultra-long horizontal wells, avoiding the problems of mean drift and excessively high confidence in the prediction results, significantly improving the accuracy and reliability of multi-step prediction of drilling parameters, accurately reflecting the true evolution law of drilling parameters, providing strong data support for real-time control and risk warning of drilling operations, and ensuring the safe and efficient conduct of drilling operations. Attached Figure Description
[0056] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0057] Figure 1 A flowchart illustrating a method for predicting the evolution of drilling parameters and providing risk warning for ultra-long horizontal wells based on a regional case library, provided in an embodiment of this application;
[0058] Figure 2 This is a data flow diagram of the regional case retrieval and error-correction memory network provided in an embodiment of this application; wherein, Region Casebase represents the regional case library; Region Case Retriever represents the regional case retrieval device; and Error-Correction Memory Network represents the error-correction memory network; This is the final working condition fingerprint vector after confidence weighting under the current working condition t (time / depth index); The set of similar historical cases is the collection of the Top-K historical cases most similar to the current working conditions, output by the regional case retrieval tool; where K is the preset number of cases and t is the current time / depth index. Let t be the attention weight for the c-th similar historical case, and t be the current time / depth index. These are real-time observations, representing the target parameter observations collected in real-time by the drilling sensors under the current operating condition t (time / depth index). It refers to the reliability of real-time observations, which are the real-time observation values. The credibility score, where t is the current time / depth index; This is the real-time observed value under the current operating condition t. The difference between the value and the prior prediction; The residual update weights are used for the c-th similar case, where t is the current time / depth index; To be obtained by weighted fusion based on similar cases, the future h-th step ( The mean of prior predictions for (time / depth point); the subscript 0 represents the prior, t is the current time / depth index, and h is the prediction step size; In order to align with prior evolutionary trajectories The corresponding prior prediction variance, where the subscript 0 represents the prior, t is the current time / depth index, and h is the prediction step size; This is the working condition fingerprint vector for one case. The parameter evolution trajectory for a single case; Historical correction residuals for one case; This is the first case in the case library; This is the second case in the case library; This is the nth case in the case library;
[0059] Figure 3 This is a data flow diagram illustrating the evolutionary consistency inferrer and risk calculation provided in an embodiment of this application; wherein, The noise variance of the current observation represents the uncertainty of the observation data, and t represents the current operating condition (time index / depth index). It is the mean of the prior evolution trajectory of the h-th prediction step after the current depth point t, which is the predicted prior value of the target drilling parameters; Let Variance be the variance of the prior evolution trajectory at the h-th prediction step after the current depth point t, and let represent the prior mean. The degree of dispersion and uncertainty of the variance is as follows: the larger the variance, the lower the reliability of the prior prediction; h is the prediction step size. This represents the final predicted distribution after Bayesian fusion; where, The corrected predicted mean of the target parameters at time t+h in the future; The corrected predicted variance of the target parameters at time t+h in the future; For safe operating range, As the lower limit, The upper limit; To aggregate risk probabilities, This represents the probability that a risk will occur at least once within the next H-step prediction window under the current operating condition t; Levels I-IV are warning levels.
[0060] Figure 4 This is a structural block diagram of a system for predicting the evolution of drilling parameters and providing risk warnings for ultra-long horizontal wells based on a regional case library, provided in an embodiment of this application. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0062] In related technologies, an ultra-long horizontal well is often referred to as a horizontal well with a horizontal section length greater than 3,000 meters, and the well inclination angle must meet the basic definition of a horizontal well (greater than 85 degrees), with the horizontal section length being significantly greater than the vertical section length.
[0063] During the drilling of ultra-long horizontal wells, frequent changes in operating conditions occur, such as encountering abnormal formations, tool failures, or abrupt changes in operating procedures. Drilling parameters (standby pressure, torque, mechanical drilling rate, etc.) exhibit strong nonlinear and time-varying characteristics with changes in operating conditions, and their evolution trends are difficult to accurately describe using a single fixed model. To improve the reliability of parameter prediction, related technologies can employ retrieval methods based on historical case databases. This involves matching the similarity between the current operating conditions and historical cases, using the subsequent parameter evolution of similar cases as the basis for prediction. While this method can utilize historical experience to some extent, it is essentially a static matching process. When the real-time operating condition evolution trend deviates significantly from historical cases, the prediction results are prone to systematic bias.
[0064] Another related technology employs a data fusion approach, weighting real-time observations with prior information to balance the contributions of historical experience and real-time data. However, such methods often use fixed fusion weights, failing to dynamically adjust the confidence level based on the trend consistency between real-time operating conditions and prior trajectories. When operating conditions undergo abrupt changes, the evolution directions of the prior trajectory and real-time observations may be opposite. If fusion is still performed with fixed weights, it will lead to a drift in the predicted mean, and the predicted variance will fail to reflect the true uncertainty, resulting in excessively high confidence levels and affecting the reliability of subsequent risk warnings.
[0065] In summary, the existing technology has the following technical problems: For scenarios with sudden changes in drilling conditions in ultra-long horizontal wells, existing drilling parameter prediction methods cannot dynamically adapt to changes in operating conditions, cannot quantify trend consistency and adaptively adjust the fusion strategy, resulting in mean drift and low confidence in the prediction results. This makes it difficult to accurately reflect the true evolution of drilling parameters and effectively avoid risks.
[0066] This embodiment provides a method for predicting the evolution of drilling parameters in ultra-long horizontal wells. The execution entity of the method can be a terminal device, such as a ground-based industrial control computer / host computer at the drilling site, or an integrated control unit of the drilling platform. The execution entity of the method can also be a server, such as a locally deployed data processing server or a cloud-based data processing server.
[0067] The method may include:
[0068] Step S10: Obtain real-time multi-source drilling data.
[0069] In this embodiment, the real-time multi-source drilling data can be represented as various types of data related to drilling conditions and target parameters, acquired in real time by various data acquisition devices during ultra-long horizontal well drilling operations. Specifically, the real-time multi-source drilling data may include at least two of the following: well depth, mechanical drilling rate, drilling pressure, rotational speed, torque, standpipe pressure, inlet and outlet density, inlet and outlet temperature, sand return rate, gas measurement values, well inclination azimuth, vibration while drilling, gamma ray while drilling, and resistivity while drilling. More specifically, the real-time multi-source drilling data can be acquired in real time through sensors, data acquisition terminals, and other devices deployed at various locations on the drilling platform. The acquired data can be transmitted to the executing entity via wired or wireless communication links.
[0070] Step S12: Construct the current working condition fingerprint vector based on real-time multi-source drilling data.
[0071] In this embodiment, the current operating condition fingerprint vector can include statistical features, evolutionary gradient features, and physical consistency features. Specifically, the statistical features can be used to characterize the distribution characteristics of data from each channel within a local window. For example, for drill pressure data within a certain depth range, its mean, variance, kurtosis, skewness, and other statistical quantities can be calculated. Multiple depth scales (1-meter, 5-meter, and 10-meter windows) can also be selected, and the above statistical quantities can be extracted separately to capture the operating condition characteristics at different scales. The evolutionary gradient features are used to characterize the rate and acceleration of parameter changes with time or depth. For example, the trend and acceleration of pressure changes can be reflected by calculating the first-order difference (the difference between the current value and the previous value) and the second-order difference of riser pressure, which can be used to identify abnormal evolution patterns such as sudden pressure increases or decreases. The physical consistency features are used to characterize the physical correlation between multi-channel parameters, reflecting the physical rationality of the downhole process. The physical consistency features can further include density difference, temperature difference, pressure-displacement sensitivity, torque-speed sensitivity, and mechanical specific energy.
[0072] Step S14: Input the fingerprint vector of the current working condition into the regional case retrieval device to retrieve at least one set of historical cases similar to the current working condition.
[0073] In this embodiment, the regional case retrieval device can be represented as a module for storing historical drilling cases within a region and capable of retrieving historical cases with high similarity to the current working condition based on the input fingerprint vector of the current working condition. Its function is to provide similar historical data support for the generation of subsequent prior evolution trajectories. Specifically, the regional case retrieval device can be a pre-built database containing a large number of historical drilling cases and its retrieval algorithm module.
[0074] In one possible and specific implementation, the regional case library can be organized in the following hierarchy:
[0075] Regional layers can be divided according to physical regions such as oil fields, blocks, and structural zones;
[0076] The process layer can be classified according to process characteristics such as well type (horizontal well, extended reach well), mud system (oil-based, water-based, polymer), and drill string assembly.
[0077] Well sections can be classified as build-up sections, horizontal sections, stable sections, or stratigraphic lithology sections.
[0078] The case unit layer can form basic case units according to fixed depth windows (one slice every 10 meters).
[0079] In one possible and specific implementation, each case unit may include the following fields:
[0080] Case fingerprint vector, the weighted fingerprint vector extracted during the construction of this case;
[0081] The target parameter trajectory segment is a sequence of target parameter values (riseer pressure, torque, etc.) starting from the starting point of this case and extending to several depth steps in the future.
[0082] Auxiliary trajectory segments, which are the original data sequences of each channel within the window where this case is located, are used for consistency verification or realignment;
[0083] Risk event label: whether risk events such as stuck drill bit, lost circulation, well kick, or insufficient wellbore cleaning occurred in this case;
[0084] The handling record and results include the operational measures taken for this case (adjusting drilling pressure, increasing displacement), whether the risk was eliminated, and the time taken.
[0085] Error correction fields are used for estimating systematic bias and bias uncertainty in online learning;
[0086] Confidence score, the reliability score of this case in historical use.
[0087] Step S16: Based on the historical data of the target parameters from at least one similar historical case, generate the prior evolution trajectory of the target drilling parameters and its prior uncertainty.
[0088] In this embodiment, the target drilling parameters can be represented as drilling parameters that need to be predicted for evolution, specifically including parameters during the drilling operation such as mechanical drilling rate, drilling pressure, rotational speed, torque, and standpipe pressure. The prior evolution trajectory can be represented as an evolution trend curve of the target drilling parameters under the current operating conditions over a future period, predicted based on historical data of target parameters from similar historical cases. Its function is to provide prior reference for subsequent consistency perception fusion processing. The prior uncertainty can be used as a metric parameter to characterize the accuracy of the prior evolution trajectory prediction, reflecting the degree of deviation between the prior evolution trajectory and the actual parameter evolution law.
[0089] In one possible and specific implementation, firstly, the historical data of the target parameters for each similar historical case in the historical case set retrieved in step S14 are obtained. The historical data of the target parameters is consistent with the type of the target drilling parameters to be predicted, and includes the evolution data of the target parameters with well depth or time under the corresponding working condition of the historical case. Then, based on the attention weights of each similar historical case calculated in step S14, the historical data of the target parameters of each similar historical case are weighted and summed to obtain the prior evolution trajectory. The attention weight is calculated based on the weighted distance between the fingerprint vector of the current working condition and the fingerprint vectors of each historical case. The smaller the weighted distance, the higher the attention weight. During the weighted summation process, the historical data of the target parameters of each historical case are multiplied by their corresponding attention weights and then superimposed to obtain the prior evolution trajectory of the target drilling parameters under the current working condition. This trajectory can characterize the initial evolution trend of the target parameters under the current working condition.
[0090] In one possible and specific implementation, the prior uncertainty can be generated in the following manner:
[0091] Based on the attention weights obtained in step S14 and the previously generated prior evolutionary trajectory, the weighted variance of the historical target parameter data of each similar historical case relative to the prior evolutionary trajectory is calculated. Specifically, the deviation between the historical target parameter data of each similar historical case and the corresponding position value of the prior evolutionary trajectory is first calculated. The deviation is then squared and multiplied by the attention weight corresponding to that historical case. Finally, the calculation results of all similar historical cases are summed to obtain the weighted variance. Then, a preset lower limit value of variance is added to this weighted variance to obtain the prior uncertainty. The lower limit value of variance is a preset fixed value used to avoid the prior uncertainty being too low due to the weighted variance being too small, ensuring that the prior uncertainty can reasonably reflect the reliability of the prior evolutionary trajectory.
[0092] Step S18: Input the real-time observed values of the target drilling parameters, the prior evolution trajectory, and its prior uncertainty into the evolution consistency inferrer, and perform consistency-aware fusion processing to output a corrected multi-step prediction sequence; wherein, the consistency-aware fusion processing includes at least: evaluating the consistency measure between the real-time evolution trend and the prior evolution trend based on the real-time observed values and the prior evolution trajectory; determining the dynamic fusion weights for the prior information and the real-time observed information based on the consistency measure, the prior uncertainty, and the observation uncertainty; and co-correcting the values and uncertainties of the prior evolution trajectory based on the dynamic fusion weights to obtain the corrected multi-step prediction sequence.
[0093] In this embodiment, the real-time observed value of the target drilling parameter can be expressed as the real-time value of the target drilling parameter obtained by the real-time acquisition device during the current drilling operation, which is used to reflect the actual state of the current target parameter.
[0094] In this embodiment, the evolutionary consistency inferrer can be represented as an algorithm module that performs fusion processing on prior evolutionary trajectories and real-time observations of target parameters, and outputs accurate multi-step prediction sequences by evaluating trend consistency, dynamically adjusting fusion weights, and collaboratively correcting prediction results and uncertainties.
[0095] In this embodiment, the corrected multi-step prediction sequence can be represented as a sequence of predicted mean values and corresponding predicted variances of multiple future prediction steps of the target drilling parameters after consistency-aware fusion processing. This sequence can accurately reflect the future evolution of the target parameters and the reliability of the prediction results.
[0096] The method for predicting the evolution of drilling parameters in ultra-long horizontal wells provided in this embodiment acquires real-time multi-source drilling data and constructs a fingerprint vector of the current operating condition, which can accurately characterize the characteristics of the current drilling condition and provide a reliable basis for the retrieval of similar historical cases. A set of similar historical cases is retrieved through a regional case retrieval tool, and based on this set, a priori evolution trajectory and its prior uncertainty of the target drilling parameters are generated, providing a reasonable priori reference for subsequent predictions. An evolution consistency inferencer performs consistency-aware fusion processing, quantitatively evaluating the consistency measure between the real-time evolution trend and the prior evolution trend, dynamically adjusting the fusion weights of prior information and real-time observation information, and simultaneously coordinating the correction of the values and uncertainties of the prior evolution trajectory. This effectively adapts to the sudden change scenarios of drilling conditions in ultra-long horizontal wells, avoiding the problems of mean drift and excessively high confidence in the prediction results. It significantly improves the accuracy and reliability of multi-step prediction of drilling parameters, accurately reflects the true evolution law of drilling parameters, provides strong data support for real-time control and risk warning of drilling operations, and ensures the safe and efficient conduct of drilling operations.
[0097] In some implementations, the step of acquiring real-time multi-source drilling data includes:
[0098] Step S102: Receive real-time multi-source drilling data; wherein the real-time multi-source drilling data includes at least two of the following: well depth, mechanical drilling speed, drilling pressure, rotational speed, torque, standpipe pressure, inlet and outlet density, inlet and outlet temperature, sand return rate, gas measurement value, well inclination azimuth, vibration while drilling, gamma while drilling, and resistivity while drilling.
[0099] In this embodiment, the executing entity can receive the aforementioned real-time multi-source drilling data uploaded by the field data acquisition unit via a wired transmission link or wireless communication. Specifically, the field data acquisition unit may be a surface engineering parameter acquisition system, a mud logging system, a gas logging and chromatography system, a measurement-while-drilling / logging-while-drilling system, or a manual data entry terminal.
[0100] Step S104: Perform quality assessment on the received real-time multi-source drilling data to obtain the reliability of each data channel; wherein, the quality assessment includes: for each data channel, obtaining the original observation value, physical reasonable upper and lower bounds, reference value, and missing marker; determining a first penalty factor based on the degree of deviation of the original observation value from the physical reasonable upper and lower bounds; determining a second penalty factor based on the degree of deviation of the original observation value from the reference value; determining a third penalty factor based on the missing marker; and determining the reliability of the channel at the corresponding time by multiplying the first penalty factor, the second penalty factor, and the third penalty factor.
[0101] In this embodiment, the received real-time multi-source drilling data can be quality-assessed to obtain the reliability of each data channel at each time point (or at each depth point). The reliability can be a value between 0 and 1, used to quantify the reliability of the data point. A higher value indicates more reliable data, while a lower value indicates that the data may be interfered with, outside a reasonable range, or missing.
[0102] In one possible and specific implementation, the quality assessment process for each data channel may include the following sub-steps:
[0103] First, obtain the raw observations, physical reasonable upper and lower bounds, reference value, and missing data flag for the channel at the current moment. Specifically, the physical reasonable upper and lower bounds are threshold ranges preset based on the physical characteristics of the channel and engineering experience. The reference value is an estimated value of the channel at the current position obtained through smoothing or prediction, used to detect whether there are abrupt changes in the data. The missing data flag is a binary variable, with a value of 1 indicating that the channel is missing data at the current moment, and a value of 0 indicating that the data exists.
[0104] Next, the first penalty factor is determined. Specifically, if the original observation is within the reasonable upper and lower bounds, the degree of exceeding the bounds is 0, and the first penalty factor takes the maximum value of 1. If the original observation exceeds the reasonable upper and lower bounds, the absolute difference of the excess is calculated. The larger this difference is, the smaller the first penalty factor is. The value range of the first penalty factor is between 0 and 1. Its physical meaning is that the closer the data is to the reasonable range, the closer the factor is to 1; the further the data is from the reasonable range, the closer the factor is to 0, indicating that the reliability of the data point is reduced due to exceeding the bounds.
[0105] Next, the second penalty factor is determined. Specifically, the absolute difference between the original observation and the reference value can be calculated. The larger the difference, the more drastic the data mutation, and the smaller the second penalty factor. The value of the second penalty factor ranges from 0 to 1. That is, the more stable the data (closer to the reference value), the closer the factor is to 1; the more drastic the data mutation, the closer the factor is to 0, indicating that the reliability of the data point is reduced due to abnormal fluctuations.
[0106] Next, the third penalty factor is determined. Specifically, the third penalty factor can be determined based on the missing data marker. If the missing data marker is 0 (data exists), the third penalty factor is 1; if the missing data marker is 1 (data is missing), the third penalty factor is 0.
[0107] Finally, the first penalty factor, the second penalty factor, and the third penalty factor can be multiplied together, and the product is used as the confidence level of the channel at the corresponding time. Since all three factors are between 0 and 1, their product is also between 0 and 1, and the product is only 1 when all three factors are 1. A decrease in any one factor will lead to a decrease in confidence level.
[0108] Step S106: Using well depth as the main axis, real-time drilling multi-source data is interpolated and aligned to a preset depth grid to obtain depth-domain aligned real-time drilling multi-source data; wherein, for each target depth point, the interpolation weight is determined based on the distance between the original data points in the neighborhood and the target depth point and the reliability of the original data point, and then the weighted average of each original data point is performed to obtain depth-domain aligned real-time drilling multi-source data.
[0109] In this embodiment, the preset depth grid can set the depth step size according to the drilling operation depth range and processing accuracy. It can start from the initial depth and generate continuous depth points according to the set step size to form the preset depth grid. Each depth point in the grid is the target depth point.
[0110] In this embodiment, interpolation processing can be performed independently for each target depth point and each data channel. Specifically, raw data points in the neighborhood of the target depth point can be selected from the raw data to form a candidate point set. For each raw data point in the candidate point set, a comprehensive interpolation weight can be determined by combining the distance between the point and the target depth point and the confidence level obtained from the quality assessment of the point. The smaller the distance and the higher the confidence level, the larger the corresponding interpolation weight. A weighted average calculation can be performed based on the observed values of each raw data point and the corresponding interpolation weight to obtain the interpolation result of the data channel corresponding to the target depth point.
[0111] In this embodiment, if there are no valid original data points in the neighborhood of the target depth point, the data channel can be marked as missing data at the current target depth point.
[0112] In this embodiment, after performing the above interpolation processing on all target depth points and all data channels, a multidimensional data sequence with a preset depth grid as a unified reference is obtained, which is the depth domain aligned real-time multi-source drilling data.
[0113] In some implementations, the step of constructing a current operating condition fingerprint vector based on real-time multi-source drilling data includes:
[0114] Step S122: Extract statistical features, evolutionary gradient features, and consistency features characterizing the physical correlation of multiple channels from real-time multi-source drilling data at different depth scales; wherein, the statistical features include the weighted mean and weighted variance calculated based on the reliability of each data point at different depth scales; wherein, the evolutionary gradient features include the first-order difference and / or second-order difference of the data points; wherein, the consistency features include at least one of inlet / outlet density difference, inlet / outlet temperature difference, pressure-displacement sensitivity, and torque-speed sensitivity.
[0115] In this embodiment, statistical features can be used to characterize the distribution characteristics of each data channel within a local depth range. To capture changes in operating conditions at different scales, statistical features can be extracted at multiple depth scales. The depth scale can be a window range centered on the current depth point and extending forward and backward by a certain depth. The half-width of the window can be set to, for example, 2 depth points, 5 depth points, or 10 depth points, corresponding to local features at small, medium, and large scales, respectively.
[0116] In one possible and specific implementation, for each depth scale s (i.e., the half-width of the window), the following operations can be performed for each data channel i:
[0117] First, the range of depth points to be included in the calculation is determined, which is s points forward from the current depth point and s points backward, for a total of 2s+1 depth points. For each depth point, the data value of that channel and its reliability (calculated in step S104) are known.
[0118] Then, calculate the weighted mean. This can be done by multiplying the data values of each depth point within the window by the confidence level of that point, summing the results, and then dividing by the sum of all confidence levels within the window (adding a small amount to prevent division by zero) to obtain the weighted mean of the channel at the current depth scale.
[0119] Next, the weighted variance is calculated. For each depth point within the window, the squared deviation of the data value at that point from the weighted mean is calculated. This squared deviation is multiplied by the confidence level of that point, summed, and then divided by the sum of all confidence levels within the window (plus a small amount to prevent zero). This yields the weighted variance of the channel at the current depth scale. The weighted variance reflects the degree of fluctuation of the channel's data within the local window, taking data quality into account.
[0120] For each depth scale, the weighted mean and weighted variance can be calculated for all data channels to form a statistical feature set at that scale.
[0121] In this embodiment, the evolutionary gradient feature is used to characterize the trend of each data channel changing with depth, including first-order difference and second-order difference. Specifically, the first-order difference characterizes the rate of change of the parameter, and its calculation formula is the data value at the current depth point minus the data value at the previous depth point. For example, a positive first-order difference in riser pressure indicates that the pressure is increasing; a negative first-order difference indicates that the pressure is decreasing. The larger the absolute value of the first-order difference, the more drastic the change. The second-order difference characterizes the rate of change of the first-order difference, that is, the acceleration of the parameter change, and its calculation formula is the first-order difference at the current depth point minus the first-order difference at the previous depth point. A positive second-order difference indicates that the trend of change is accelerating (the pressure is rising faster and faster), and a negative second-order difference indicates that the trend of change is decelerating (the pressure is rising slower and slower).
[0122] In this embodiment, the consistency feature is used to characterize the physical correlation between different data channels, specifically including inlet / outlet density difference, inlet / outlet temperature difference, pressure-displacement sensitivity, and torque-speed sensitivity. The inlet / outlet density difference / temperature difference represents the difference in observed values of the inlet and outlet density / temperature data channels at the same depth point, respectively. The pressure-displacement sensitivity is the degree to which riser pressure changes with drilling displacement, and the torque-speed sensitivity is the degree to which drilling torque changes with speed.
[0123] Step S124: Combine the extracted features into the original fingerprint vector.
[0124] In this embodiment, all statistical features, evolutionary gradient features, and consistency features extracted in step S122 at all depth scales can be concatenated according to a preset dimensional order (which can be set according to feature type or data channel importance). The resulting multidimensional vector is the original fingerprint vector. The dimension of the original fingerprint vector is consistent with the total number of extracted features, including multidimensional feature information of the current working condition.
[0125] Step S126: Based on the credibility of the data channels corresponding to each feature, the original fingerprint vector is weighted to obtain the weighted current working condition fingerprint vector; wherein, the weighting is implemented in the following way: based on the credibility aggregation value of the data channels corresponding to each feature, a diagonal weighting matrix is constructed, and the diagonal weighting matrix is multiplied with the original fingerprint vector to obtain the weighted current working condition fingerprint vector.
[0126] In this embodiment, firstly, the data source channel corresponding to each dimension of the original fingerprint vector can be determined, and the confidence aggregation value of that channel can be calculated (this can be obtained by averaging the confidence values of all data points in that channel within the depth scale covered by feature extraction). Next, a diagonal weighted matrix can be constructed based on the confidence aggregation values corresponding to each dimension of the feature. This matrix is a square matrix, with the elements on the diagonal being the confidence aggregation values corresponding to each dimension of the feature, and the elements off-diagonal being 0. Finally, this diagonal weighted matrix can be multiplied with the original fingerprint vector, and the result is the weighted current working condition fingerprint vector. Through this weighting process, the weight ratio of features corresponding to low-confidence data channels can be reduced, while the contribution of high-confidence features to the working condition representation can be increased, enabling the current working condition fingerprint vector to accurately reflect the actual drilling conditions.
[0127] In some implementations, the step of inputting the current operating condition fingerprint vector into a regional case retrieval device to retrieve at least one set of historical cases similar to the current operating condition includes:
[0128] Step S142: Calculate the weighted distance between the fingerprint vector of the current working condition and the fingerprint vectors of each historical case in the regional case library.
[0129] In this embodiment, step S142 may include:
[0130] Step S1422: Calculate the weighted distance between the current working condition fingerprint vector and the fingerprint vectors of each historical case using weighted Mahalanobis distance.
[0131] Step S144: Determine the similarity ranking based on weighted distance, and select at least one historical case with the highest similarity to form the historical case set.
[0132] In this embodiment, step S144 may include:
[0133] Step S1442: Based on the weighted Mahalanobis distance, calculate the attention weight for each historical case. The smaller the distance, the higher the weight.
[0134] Step S1444: Select at least one historical case with the highest attention weight to form the historical case set; wherein, the step further includes retrieval optimization processing; wherein, the retrieval optimization processing includes at least one of the following methods:
[0135] Step S1444a: A two-stage retrieval is adopted. First, a candidate case set is quickly recalled from the regional case library based on the low-dimensional representation of the fingerprint vector of the current working condition. Then, the weighted Mahalanobis distance is calculated in the candidate case set.
[0136] Step S1444b: When calculating the weighted Mahalanobis distance, the covariance matrix of the fingerprint vectors of cases in the regional case library or its diagonal approximation matrix is used.
[0137] In some implementations, the step of calculating the weighted distance between the current operating condition fingerprint vector and the fingerprint vectors of each historical case in the regional case library includes:
[0138] Step S1422: Calculate the weighted distance between the current working condition fingerprint vector and the fingerprint vectors of each historical case using weighted Mahalanobis distance.
[0139] In this embodiment, weighted Mahalanobis distance can be used as a similarity measure to calculate the distance between the current working condition fingerprint vector and the fingerprint vectors of each historical case in the regional case library.
[0140] Specifically, for the fingerprint vector of the current operating condition and the fingerprint vector of a historical case in the case library, the difference vector between the two is first calculated to obtain the vector difference. This difference vector represents the degree of difference between the current operating condition and the case in each feature dimension.
[0141] Then, obtain the covariance matrix or its approximation matrix of the fingerprint vectors of all cases in the regional case library. The covariance matrix can be a D x D matrix (D being the fingerprint vector dimension), where the diagonal elements represent the variance of each feature dimension, and the off-diagonal elements represent the covariance between different feature dimensions. This matrix characterizes the statistical distribution characteristics of the fingerprint vectors in the case library. More specifically, when the number of cases is sufficient and computational resources allow, the complete covariance matrix can be used. When the number of cases is small or computational complexity needs to be reduced, a diagonal approximation matrix can be used, i.e., only the variance elements on the diagonal are retained, and the off-diagonal elements are set to zero. In this case, the weighted Mahalanobis distance degenerates into a weighted Euclidean distance.
[0142] Next, calculate the inverse of the covariance matrix. For a complete covariance matrix, matrix inversion can be performed. For a diagonal approximation matrix, its inverse is the diagonal matrix formed by the reciprocals of its diagonal elements.
[0143] Finally, calculate the weighted Mahalanobis distance. This can be done by transposing the difference vector, multiplying it by the inverse of the covariance matrix, and then multiplying that by the difference vector again. The result is the weighted Mahalanobis distance.
[0144] The step of determining the similarity ranking based on weighted distance and selecting at least one historical case with the highest similarity to form the historical case set includes:
[0145] Step S1442: Based on the weighted Mahalanobis distance, calculate the attention weight for each historical case. The smaller the distance, the higher the weight.
[0146] In this embodiment, the attention weight can be a value between 0 and 1, used to quantify the importance of the case under the current working condition. A higher weight indicates that the case is more similar to the current working condition and contributes more to the subsequent prior trajectory generation. Specifically, for each historical case, its weighted Mahalanobis distance can be substituted into a monotonically decreasing mapping function to obtain the attention weight of that case. The mapping function can specifically include a negative exponential function, that is, the weight is proportional to the negative exponent of the distance. That is, cases with smaller distances receive higher weights, while the weights of cases with larger distances decay rapidly, thus allowing the few most similar cases to dominate in subsequent fusion.
[0147] Step S1444: Select at least one historical case with the highest attention weight to form the historical case set; wherein, the step further includes retrieval optimization processing; wherein, the retrieval optimization processing includes at least one of the following methods:
[0148] Step S1444a: A two-stage retrieval is adopted. First, a candidate case set is quickly recalled from the regional case library based on the low-dimensional representation of the fingerprint vector of the current working condition. Then, the weighted Mahalanobis distance is calculated in the candidate case set.
[0149] Step S1444b: When calculating the weighted Mahalanobis distance, the covariance matrix of the fingerprint vectors of cases in the regional case library or its diagonal approximation matrix is used.
[0150] In this embodiment, based on the attention weights calculated in step S1442, at least one historical case with the highest weight can be selected to form a set of similar historical cases. The number K selected can be preset according to actual needs; for example, 5, 10, or 20 cases with the highest weights can be selected.
[0151] In this embodiment, to further improve retrieval efficiency, the two-stage retrieval optimization process described in step S1444a can be adopted. The first stage is the rapid recall stage. Specifically, in the first stage, a low-dimensional representation is extracted from the current working condition fingerprint vector. The low-dimensional representation is a simplified feature that can be quickly calculated and has a certain discriminative ability. For example, only the values of the target data channels (standby pressure, torque, mechanical drilling rate) at the current depth point and their first-order differences are selected, or only coarse-grained features such as well section phase are calculated. Then, based on the low-dimensional representation, a similarity metric with low computational complexity is used to quickly recall a set of candidate cases from the entire case library. The number of cases recalled can be set to a value much larger than the final required number of cases (e.g., 100) to ensure that no truly similar cases are missed. Specifically, the second stage is the precise re-ranking stage. For the set of candidate cases recalled in the first stage, the distance between each candidate case and the current working condition is calculated one by one using the complete current working condition fingerprint vector and the precise weighted Mahalanobis distance, and the cases are re-ranked according to the calculation results. Then, the K cases with the highest attention weights are selected from the reordered candidate set to form the final set of similar historical cases.
[0152] In this embodiment, in step S1444b, when a complete covariance matrix is used, the weighted Mahalanobis distance can fully consider the correlation between each feature dimension. For example, some features may exhibit collinearity or strong correlation. The complete covariance matrix can be used to rotate and scale the feature space through its inverse matrix to eliminate the influence of correlation, making the distance measurement more accurate. When a diagonal approximation matrix is used, the weighted Mahalanobis distance simplifies to a weighted Euclidean distance, that is, only the variance of each feature dimension is normalized, without considering the correlation between features.
[0153] In some implementations, the step of generating the prior evolution trajectory of the target drilling parameters and its prior uncertainty based on historical data of the target parameters from at least one similar historical case includes:
[0154] Step S162: Based on the attention weights, perform a weighted summation of the historical data of the target parameters of at least one similar historical case to obtain the prior evolution trajectory.
[0155] In this embodiment, the attention weight is a weight parameter calculated in step S1442 that characterizes the similarity between each similar historical case and the current working condition.
[0156] In this embodiment, the historical data of the target parameter is a numerical sequence that evolves with well depth (or time) among similar historical cases obtained in step S1444, which is consistent with the type of the target drilling parameter to be predicted.
[0157] Specifically, firstly, historical target parameter data for each similar historical case in the historical case set can be extracted to ensure that the historical target parameter data of each case corresponds one-to-one with the preset prediction step size in the depth (or time) dimension. Next, the attention weight corresponding to each similar historical case can be retrieved. For each prediction step size, the historical target parameter data of each similar historical case at that position is multiplied by its corresponding attention weight, and then the weighted results of all cases are summed to obtain the prior value for that prediction step size position. Finally, the prior values of all prediction step size positions can be arranged in depth (or time) order, and the resulting continuous numerical sequence is the prior evolution trajectory of the target drilling parameters. This trajectory can initially reflect the future evolution trend of the target parameters under the current operating conditions.
[0158] Step S164: Based on the attention weight and prior evolution trajectory, calculate the weighted variance of the target parameter historical data of similar historical cases relative to the prior evolution trajectory, and add a preset lower limit value of variance to the weighted variance to obtain the prior uncertainty.
[0159] In this embodiment, the weighted variance is used to quantify the degree of dispersion of the historical data of the target parameters of each similar historical case relative to the prior evolution trajectory, and the attention weight is combined to highlight the contribution of highly similar cases to the degree of dispersion.
[0160] In this embodiment, the lower limit of variance is a pre-set fixed value, which can be determined based on the engineering characteristics of the target drilling parameters (parameter value range, historical fluctuation interval). Its function is to prevent the weighted variance from being too small, which would cause the prior uncertainty to fail to reasonably reflect the degree of deviation of the prior evolution trajectory. The prior uncertainty is a numerical sequence with the same dimension as the prior evolution trajectory, used to characterize the reliability of the prior evolution trajectory at each prediction step.
[0161] Specifically, firstly, for each prediction step position, the deviation between the historical data of the target parameter at that position and the prior value of the corresponding position in the prior evolution trajectory for each similar historical case can be calculated. Next, each deviation can be squared, multiplied by the attention weight corresponding to that case, and then the above calculation results for all similar historical cases can be summed to obtain the weighted variance for that prediction step position. Then, the weighted variance for each prediction step position can be added to a preset lower limit of variance to eliminate cases where the weighted variance approaches 0, ensuring that the prior uncertainty can reasonably characterize the deviation risk of the prior evolution trajectory. Finally, the values of all prediction step positions after the above processing can be arranged in depth (or time) order, and the resulting continuous numerical sequence is the prior uncertainty of the target drilling parameters.
[0162] In some implementations, the step of evaluating the consistency measure between the real-time evolutionary trend and the prior evolutionary trend based on real-time observations and prior evolutionary trajectories includes:
[0163] Step S1822: Calculate the first evolution gradient of the real-time observation at the current time and the second evolution gradient of the prior evolution trajectory at the current time.
[0164] In this embodiment, the current moment can be the current depth node or the current time node of the corresponding drilling operation, and can be consistent with the time / depth benchmark of the preset depth grid and the prediction step size.
[0165] In this embodiment, the first evolution gradient can be used to characterize the rate and direction of change of the real-time observed values of the target drilling parameters at the current moment, reflecting the instantaneous state of the real-time evolution trend.
[0166] In this embodiment, the second evolution gradient can be used to characterize the rate and direction of change of the prior evolution trajectory at the current moment, reflecting the instantaneous state of the prior evolution trend. The calculation basis and dimension of the two can be consistent, thereby ensuring the rationality of subsequent comparisons.
[0167] In one possible and specific implementation, firstly, real-time observations of the target drilling parameters at the current time and the previous adjacent time (or the previous adjacent depth node) can be retrieved. The difference between the two real-time observations is calculated, and this difference is the first evolution gradient of the real-time observation at the current time. A positive difference indicates that the real-time parameters are trending upward, and a negative difference indicates that the real-time parameters are trending downward. The absolute value of the difference indicates the rate of change. Next, prior values of the prior evolution trajectory at the current time and the previous adjacent time (or the previous adjacent depth node) can be retrieved. The same calculation method can be used to calculate the difference between the two prior values. This difference is the second evolution gradient of the prior evolution trajectory at the current time, and its positive / negative and absolute value meanings are consistent with the first evolution gradient. If the current time is the initial time (without an adjacent previous time / depth node), the gradient is calculated using the numerical difference between the current time and the next adjacent time / depth node to ensure the completeness of the gradient calculation.
[0168] Step S1824: Calculate the dot product of the first evolution gradient and the second evolution gradient, and the product of the magnitude of the first evolution gradient and the magnitude of the second evolution gradient.
[0169] In one possible and specific implementation, firstly, the dot product of the first and second evolutionary gradients can be calculated, that is, the numerical values of the two gradients are directly multiplied. The sign of the dot product reflects the directional relationship between the two gradients; a positive sign indicates that the directions are the same or similar, and a negative sign indicates that the directions are opposite or divergent. The absolute value of the dot product reflects the tightness of the directional fit. Next, the magnitudes of the first and second evolutionary gradients are calculated separately. The magnitude of the gradient is the absolute value of the gradient value, used to characterize the magnitude of the gradient (i.e., the absolute value of the rate of change). Finally, the magnitudes of the first and second evolutionary gradients can be multiplied to obtain the product of their magnitudes. This product is used to normalize the directional similarity in subsequent calculations, avoiding deviations in the directional similarity calculation due to differences in gradient magnitudes.
[0170] Step S1826: Determine the directional similarity between the real-time evolution trend and the prior evolution trend based on the ratio of the dot product to the product, and map the directional similarity to a preset interval to obtain the consistency measure.
[0171] In this embodiment, the directional similarity can be used to quantify the degree of directional fit between two evolutionary gradients, and its value range can be determined by the ratio of the dot product to the product of the magnitude. The preset interval can be a pre-defined range of consistency metrics (which can be set to [0,1]), and the purpose of the mapping process is to unify the range of consistency metrics.
[0172] In one possible and specific implementation, firstly, the ratio of the dot product to the modulus product obtained in step S1824 is calculated. This ratio represents the directional similarity between the real-time evolutionary trend and the prior evolutionary trend. The ratio ranges from -1 to 1. A ratio of 1 indicates that the first and second evolutionary gradients are completely aligned, and the real-time and prior evolutionary trends are perfectly matched. A ratio of -1 indicates that the two gradients are completely opposite, and the two evolutionary trends are completely divergent. The closer the ratio is to 0, the lower the directional alignment of the two evolutionary trends and the higher the degree of divergence. Then, this directional similarity can be mapped to a preset interval. The mapping method can be linear or nonlinear, ensuring that the mapped value falls within the preset interval. The mapped value is the consistency measure.
[0173] In some implementations, the step of determining the dynamic fusion weights for prior information and real-time observation information based on consistency metrics, prior uncertainty, and observation uncertainty includes:
[0174] Step S1842: Calculate the product of the consistency metric and the prior uncertainty as the first fusion factor.
[0175] In this embodiment, the first fusion factor is a parameter used to quantify the reliability of prior information, and its value directly reflects the credibility and trend fit of the prior evolution trajectory.
[0176] Understandably, a higher consistency metric indicates a better alignment between real-time and prior evolutionary trends. A lower prior uncertainty metric indicates a lower risk of prediction bias in the prior evolutionary trajectory. The larger the product of the two, the higher the corresponding first fusion factor, representing a higher level of reliability of prior information; conversely, a smaller product indicates a lower level of reliability of prior information.
[0177] Step S1844: Calculate the ratio of the observation uncertainty to the confidence level of the real-time observation, and use it as the observation noise factor.
[0178] In this embodiment, the observation noise factor is a parameter used to quantify the noise level of real-time observation information, and its value directly reflects the effectiveness of the real-time observation data.
[0179] Understandably, a larger observation uncertainty indicates a wider range of inherent errors in the real-time observations. Conversely, a smaller real-time observation reliability indicates lower validity of the real-time observation data. A larger ratio between the two corresponds to a higher observation noise factor, representing a higher level of noise in the real-time observation information.
[0180] Step S1846: Calculate the sum of the first fusion factor and the observation noise factor as the second fusion factor.
[0181] In this embodiment, the second fusion factor is an intermediate parameter used to integrate the reliability of prior information and the noise level of real-time observation information. Its function is to unify and fuse the reliability of the two types of information.
[0182] Understandably, the second fusion factor, through addition, considers both the reliability of prior information and the noise level of real-time observation information. Specifically, the higher the value of the first fusion factor (the more reliable the prior information) and the lower the value of the observation noise factor (the lower the noise level of real-time observation information), the closer the sum of the two values is to the first fusion factor, and the overall benchmark is more biased towards prior information; conversely, the overall benchmark is more biased towards real-time observation information.
[0183] Step S1848: The ratio of the first fusion factor to the second fusion factor is determined as the dynamic fusion weight.
[0184] Understandably, for dynamic fusion weights, the closer the ratio is to 1, the closer the dynamic fusion weight value is to 1, indicating that prior information is prioritized for correction during the fusion process; conversely, the closer the ratio is to 0, the closer the dynamic fusion weight value is to 0, indicating that real-time observation information is prioritized for correction during the fusion process. Through this ratio calculation method, the dynamic fusion weights can adaptively adjust with changes in consistency metrics, prior uncertainty, and observation uncertainty, achieving a dynamic fusion strategy that relies on prior information when trends align and on observations when trends diverge.
[0185] In some implementations, the step of collaboratively correcting the numerical values and uncertainties of the prior evolution trajectory based on dynamic fusion weights to obtain the corrected multi-step prediction sequence includes:
[0186] Step S1861: Calculate the residual between the real-time observation at the current moment and the prior value of the prior evolution trajectory at the current moment, and use it as the current observation residual.
[0187] In this embodiment, the current observation residual is a parameter used to quantify the degree of deviation between the real-time observation value at the current moment and the prior evolution trajectory. Its function is to provide a basis for the deviation correction of the subsequent prior evolution trajectory.
[0188] In one possible and specific implementation, firstly, the real-time observation values of the target drilling parameters at the current moment can be retrieved (consistent with the real-time observation values input into the evolution consistency inferrer in step S18). Simultaneously, the prior values corresponding to the prior evolution trajectory generated in step S162 at the current moment are retrieved to ensure complete consistency between the time or depth benchmarks of the two. Then, the numerical difference between the current real-time observation value and the corresponding prior value is calculated, and this difference is determined as the current observation residual. A positive residual indicates that the real-time observation value is higher than the prior value; a negative residual indicates that the real-time observation value is lower than the prior value. The larger the absolute value of the residual, the greater the deviation between the current prior evolution trajectory and the actual working conditions, and the stronger the subsequent correction force required.
[0189] Step S1862: For each prediction step size, calculate the product of the dynamic fusion weight and the preset step size decay factor as the step size correction coefficient.
[0190] In this embodiment, the prediction step length can be a preset time interval or well depth interval for future predictions, and multiple consecutive prediction steps constitute a time or depth sequence for multi-step prediction.
[0191] In this embodiment, the step size decay factor is a pre-set parameter used to adjust the correction strength of different prediction step sizes. Its value decreases monotonically as the prediction step size increases. That is, the further the prediction step size is, the smaller the step size decay factor value is. Its function is to avoid excessive correction strength in long-term prediction and ensure that the corrected prediction sequence conforms to the evolution law of drilling parameters.
[0192] In this embodiment, the step size correction coefficient is used to characterize the correction strength under the corresponding prediction step size, and its value determines the degree of influence of the current observation residual on the prior value of the step size.
[0193] Step S1863: Based on the product of the step size correction coefficient and the current observation residual, the prior value of the prior evolution trajectory at the corresponding future time is offset and corrected to obtain the corrected multi-step prediction mean sequence.
[0194] In one possible and specific implementation, for each prediction step, firstly, the step correction coefficient corresponding to that step, calculated in step S1862, and the current observation residual obtained in step S1861 are obtained. The product of the step correction coefficient and the current observation residual is calculated to obtain the offset correction amount for that prediction step. Then, the prior value of the prior evolution trajectory generated in step S162 corresponding to that prediction step can be retrieved, and the prior value is added to the offset correction amount to obtain the prediction mean after offset correction for that prediction step. After completing the above offset correction operation for all prediction steps in sequence, the corrected prediction means for all prediction steps are arranged in chronological or depth order, and the resulting continuous numerical sequence is the corrected multi-step prediction mean sequence.
[0195] Step S1864: Calculate the first correction factor; where the first correction factor is the difference between one and the step size correction coefficient.
[0196] In this embodiment, the first correction factor is an intermediate parameter used to correct prior uncertainty and calculate the first variance component. Its value is directly related to the step size correction coefficient, and its function is to quantify the influence of the step size correction coefficient on the prior uncertainty.
[0197] It is understandable that the larger the step size correction coefficient, the smaller the value of the first correction factor, and vice versa.
[0198] Step S1865: Obtain the first variance component by multiplying the first correction factor by the value of the prior uncertainty at the corresponding future time.
[0199] In this embodiment, the first variance component is a component of the corrected multi-step prediction variance sequence, used to characterize the degree of residual influence of prior uncertainty on the prediction variance after step size correction, and to reflect the reliability risk after prior information correction.
[0200] It is understandable that the larger the first correction factor, the greater the prior uncertainty, and the larger the value of the first variance component, the greater the impact of the prior information correction on the prediction variance, and vice versa.
[0201] Step S1866: Determine the degree of trend divergence based on the consistency metric, and scale the preset expansion benchmark value based on the degree of trend divergence to obtain the second variance component.
[0202] In this embodiment, the degree of trend divergence can be a parameter used to quantify the degree of deviation between the real-time evolution trend and the prior evolution trend, and can be directly determined by the consistency measure obtained in step S1826.
[0203] In this embodiment, the expansion reference value can be a pre-set fixed parameter used to adjust the variance expansion force.
[0204] In this embodiment, the second variance component is another component of the corrected multi-step prediction variance sequence. Its function is to automatically expand the prediction variance when the trend deviates, avoid the risk of underreporting due to excessive confidence, and ensure that the prediction variance can reasonably reflect the reliability of the prediction results.
[0205] In one possible and specific implementation, firstly, the consistency metric at the current moment can be obtained. This metric can be calculated in step S1826. Next, the degree of trend divergence can be determined. The degree of trend divergence is negatively correlated with the consistency metric, specifically defined as 1 minus the consistency metric, or other mapping methods can be used. The greater the degree of trend divergence, the more significant the difference between the two trends. Then, a preset inflation benchmark value is obtained. The inflation benchmark value can be a pre-set constant used to control the magnitude of variance inflation when there is trend divergence. Finally, the degree of trend divergence is multiplied by the inflation benchmark value to obtain the second variance component. When the degree of trend divergence is high (i.e., the consistency metric is low), the second variance component is large, significantly increasing the prediction variance; when the trends are consistent, the second variance component approaches zero.
[0206] Step S1867: Calculate the sum of the first variance component and the second variance component, and use it as the corrected multi-step prediction variance sequence.
[0207] In this embodiment, the first variance component and the second variance component can be added together to obtain the corrected predicted variance for each future step.
[0208] In one possible and specific implementation, for each future prediction step, the first variance component obtained in step S1865 and the second variance component obtained in step S1866 can be added together, and the sum is the corrected prediction variance for that step. Performing the above operation on all future steps yields a set of corrected prediction variances, which, arranged in step order, constitute a corrected multi-step prediction variance sequence. This sequence integrates the residual uncertainty after fusion and compression of prior uncertainty (the first component) and the additional conservative uncertainty due to trend deviation (the second component), thus more comprehensively reflecting the confidence level of the prediction results.
[0209] Step S1868: Output the corrected multi-step prediction mean sequence and the corresponding multi-step prediction variance sequence as the corrected multi-step prediction sequence.
[0210] In this embodiment, the corrected multi-step prediction mean sequence generated in step S1863 and the corrected multi-step prediction variance sequence generated in step S1867 can be combined as the final corrected multi-step prediction sequence output. Specifically, the mean sequence is used to characterize the most likely values of the target drilling parameters in each future step, and the variance sequence is used to characterize the uncertainty range of the corresponding predicted values. Together, they constitute a probabilistic description of the future evolution trend.
[0211] Understandably, this implementation achieves coordinated correction of the prior evolution trajectory. The mean correction part smoothly superimposes the current observation residuals onto future step sizes according to dynamic fusion weights and step size decay factors, so that the prediction curve fits the real-time observation while retaining the shape of the prior trend; the variance correction part, based on the fusion and compression of prior uncertainty, adaptively expands according to the degree of trend deviation, ensuring that the prediction uncertainty is reasonably amplified when the operating conditions change abruptly, avoiding underreporting due to blind confidence.
[0212] This embodiment provides a method for early warning of drilling parameter evolution in ultra-long horizontal wells. The execution subject of the method can be any one of the following: a ground control computer at the drilling site, an integrated control unit of the drilling platform, a local data processing server, or a cloud data processing server.
[0213] The method may include:
[0214] Step S20: Obtain the corrected multi-step prediction sequence of the target drilling parameters; wherein, the corrected multi-step prediction sequence of the target drilling parameters is obtained by using an ultra-long horizontal well drilling parameter evolution prediction method as described above.
[0215] Step S22: Based on the corrected multi-step prediction sequence, calculate the risk probability of at least one prediction step in the future.
[0216] In one possible and specific implementation, firstly, the executing entity can retrieve the corrected multi-step prediction sequence obtained in step S20, and extract the corrected prediction mean and corrected prediction variance corresponding to each prediction step length in the sequence. Simultaneously, it can retrieve a preset physically reasonable threshold range for the target drilling parameters. This threshold range can be preset based on drilling operation engineering design standards, historical safe operation data, and relevant industry specifications, and is used to define the safe operating range of the target drilling parameters. Different types of target drilling parameters correspond to different physically reasonable threshold ranges, and can be flexibly adjusted according to the actual working conditions at the drilling site.
[0217] Then, for at least one selected future prediction step, the risk probability for each prediction step can be calculated. The risk probability calculation can be based on the corrected prediction mean and prediction variance, combined with the numerical distribution pattern of the target drilling parameters. Specifically, the numerical distribution characteristics of the target drilling parameters under that prediction step can be determined based on the prediction mean and prediction variance. Based on these distribution characteristics, the probability that the value of the target drilling parameters exceeds a preset physically reasonable threshold range is calculated; this probability is the risk probability under that prediction step. For example, if the value of the target drilling parameters under the prediction step follows a normal distribution, then with the prediction mean as the center and the prediction variance as the degree of dispersion, the probability that the value falls outside the physically reasonable threshold range is calculated as the risk probability of that prediction step.
[0218] Step S24: If the risk probability exceeds a preset threshold, output a warning message.
[0219] In this embodiment, the preset threshold can be a risk probability threshold used to determine whether to trigger an early warning. Its value is preset based on the safety level requirements of drilling operations, or it can be flexibly adjusted according to factors such as the risk tolerance of the drilling site and the difficulty of the operation. For example, it can be preset to 0.7, that is, when the risk probability is greater than 0.7, it is determined that there is a high safety risk and an early warning is triggered.
[0220] In this embodiment, the early warning information is used to alert drilling personnel to the risk of abnormal parameters and the need to take timely control measures.
[0221] In one possible and specific implementation, the early warning information may include: early warning level, risk type, risk location, risk probability value, and handling suggestions.
[0222] In some implementations, the determination of the original observation value, the physically reasonable upper and lower bounds, and the reference value can be as follows: The original observation value can be the uncorrected observation data directly output by the field acquisition device of the corresponding data channel at the current time or current depth point. The physically reasonable upper and lower bounds can be parameter allowable ranges predetermined for different data channels based on at least one of the following methods: equipment range, drilling process design parameters, regional historical statistical range, and engineering safety threshold. The reference value can be a benchmark value used to characterize the reasonable trend of change of the data channel under the current operating conditions, and can be determined by at least one of the following methods: moving statistics, exponential smoothing, operating condition correlation model, and regional historical case regression model.
[0223] In one specific embodiment, the raw observation value can be directly taken from the instantaneous value output by the corresponding channel of the field data acquisition system at the current sampling time. For example, for the riser pressure channel, the raw observation value can be taken from the pressure value uploaded by the riser pressure sensor via the acquisition card. For the drill bit pressure channel, the raw observation value can be taken from the drill bit pressure value calculated from the hook load, suspended weight, and drill string weight. For the rotation speed channel, the raw observation value can be taken from the output value of the rotary table rotation speed sensor or the top drive rotation speed sensor. For the inlet density and outlet density channels, the raw observation values can be taken from the measured values of the inlet density meter and outlet density meter at the corresponding time in the mud logging system, respectively.
[0224] In another specific embodiment, when well depth is used as the unified main axis, the original observation value can be defined as: within a preset depth range near the current target depth point, select the original sampling point that is closest to the target depth point, and use the observation value corresponding to the original sampling point as the original observation value of the target depth point.
[0225] In some implementations, when there are multiple acquisition sources for the same physical quantity, the original observation value can be selected first from the output value of the main acquisition channel; when the main acquisition channel is missing or abnormal, the corresponding value of the backup channel is selected as the original observation value.
[0226] In one specific embodiment, the physical reasonable upper and lower boundaries can be determined jointly based on the measurement range of the corresponding measuring equipment and the drilling process design range. Specifically, for a certain data channel, the nominal range of the corresponding sensor or measuring instrument is first read to obtain the allowable measurement range of the equipment; then, combined with the wellbore structure design, drilling fluid system design, pump pressure design, drill string assembly design, or the target well section construction parameter range, the allowable measurement range of the equipment is further narrowed to obtain the physical reasonable upper and lower boundaries of the data channel. For example, the physical reasonable lower boundary of the riser pressure channel can be set to 0 or a pressure value close to 0, and the upper boundary can be determined based on the smaller of the full scale range of the riser pressure sensor and the rated working pressure of the pump set; the lower boundary of the speed channel can be set to 0, and the upper boundary can be determined based on the rated maximum speed of the top drive or rotary table; the upper and lower boundaries of the outlet density channel can be determined based on the density design range of the mud system used and in combination with the density measurement range.
[0227] In another specific embodiment, the physically reasonable upper and lower bounds can be determined based on the statistical results of historical drilling data from the same region, well type, mud system, or well section. Specifically, historical samples matching the current well process conditions can be extracted from a regional case library, and the historical observations of the corresponding data channels can be statistically analyzed. The physically reasonable upper and lower bounds can then be determined based on quantile intervals, mean plus or minus standard deviation intervals, or median plus or minus absolute median difference intervals. For example, the 1st percentile of a data channel in the regional historical samples can be used as the initial lower bound, and the 99th percentile as the initial upper bound.
[0228] In one specific embodiment, the reference value can be determined using a sliding median method. Specifically, for the i-th data channel at the current time t or the current depth point t, a neighborhood data sequence centered at t with a window half-width of w is selected. The original observations within this neighborhood are sorted by numerical value, and the median is taken as the reference value for the current point. The window half-width w can be preset according to the data sampling frequency or the depth grid step size. For channels with high sampling frequencies and strong fluctuations, a smaller window can be used; for channels with slower changes, a larger window can be used. For example, for riser pressure and torque channels, the median of the most recent several depth points or several seconds of sampled values can be taken as the reference value to suppress the influence of spike noise on the reference value.
[0229] In another specific embodiment, the reference value can be determined using a first-order exponential smoothing method. Specifically, the reference value of the i-th data channel at the current time t can be obtained recursively from the reference value of the channel at the previous time and the original observation value at the current time using a preset smoothing coefficient. The smoothing coefficient can be preset according to the channel response speed; a larger smoothing coefficient can be used when the channel changes rapidly, and a smaller smoothing coefficient can be used when the channel changes slowly. For example, for channels such as speed and displacement, which have a high degree of human control and relatively stable changes, an exponentially smoothed reference value can be used as the trend benchmark for the current operating condition.
[0230] like Figures 1-4 As shown, in a specific implementation scheme, a method for predicting the evolution of drilling parameters and providing risk warnings for ultra-long horizontal wells based on a regional case library is provided, including:
[0231] S100: Acquire real-time multi-source drilling data.
[0232] Data sources may include, but are not limited to:
[0233] 1. Surface engineering parameter acquisition system to obtain mechanical drilling speed, drilling pressure, rotation speed, torque, riser pressure, pump flush, drilling fluid flow rate and hook load;
[0234] 2. Mud logging system to obtain inlet / outlet density, temperature, conductivity, viscosity, solids, sand return rate, etc.
[0235] 3. Gas analysis and chromatography to obtain total hydrocarbons, methane to pentane, carbon dioxide, and hydrogen sulfide;
[0236] 4. Measurement while drilling / logging while drilling to obtain wellbore inclination, azimuth, gamma, resistivity, vibration, etc.
[0237] 5. Manually entered work system / condition tags: drilling, sliding, tripping, circulation, reaming, reaming, etc.
[0238] Depth Domain Alignment: Due to varying sampling frequencies across different systems and the common occurrence of timestamp drift and delay, this implementation scheme preferentially uses the depth domain principal axis for alignment, i.e., using well depth (measurement depth or a combination of well depth and horizontal displacement) as the sequence index. The depth grid step size is set. (For example, 0.1m, 0.5m, or 1m, depending on the on-site sampling density and computational resources), project the original time series onto the depth series. Define the first... The center of each depth grid is:
[0239] (1)
[0240] In formula (1), This represents the center depth value of the nth depth grid. The initial depth; For depth raster index; This represents the depth grid step size; This is the maximum depth raster number.
[0241] For any channel If its original data is Then the alignment value can be obtained using weighted interpolation with confidence level:
[0242] (2)
[0243] In formula (2), The i-th data channel is located at the center of the n-th depth raster. The interpolated and aligned data value at the specified location is the output result of depth domain alignment; i is the data channel number, used to distinguish different types of drilling parameter data channels; Let be the original data set of the i-th data channel, where Let J be the depth coordinates of the j-th raw data point in the i-th data channel. For the j-th raw data point in the i-th data channel, This represents the total number of raw data points in the i-th data channel; Center of the nth depth grid The corresponding set of neighborhood sampling points; For the j-th raw data point in the i-th data channel The interpolation weight at a given point is defined as: ;in, It is a natural exponential function. The depth of the j-th original data point and The absolute depth distance Let be the interpolation attenuation scale for the i-th data channel. The credibility of the j-th raw data point in the i-th data channel; To prevent zero-value errors. If a channel is at a certain depth... If there are no valid observations nearby, the marker is missing. . Specifically, For the i-th data channel in Missing marker at the location.
[0244] S200: Data quality assessment, missing data repair and standardization.
[0245] 1. Credibility weight calculation, specifically calculated using the following formula:
[0246] (3)
[0247] In formula (3), Let be the confidence weight of the i-th data channel at time t (or depth point t); This represents the original observation value of the i-th data channel at time t, i.e., the original data acquired by the sensor. This is a cutoff function, whose purpose is to restrict the original observations to a physically reasonable range; The physical reasonable lower bound of the i-th data channel is the minimum reasonable value of this parameter preset by the physical rules of drilling engineering and the operating parameters of the equipment. The physical reasonable upper bound of the i-th data channel is the maximum reasonable value of this parameter preset by the physical rules of drilling engineering and equipment operating parameters. The absolute difference between the original observation and the truncated value represents the degree to which the original data exceeds the physically reasonable range. The larger the difference, the more serious the out-of-bounds violation. is the out-of-bounds penalty scale parameter for the i-th data channel, which controls the severity of the penalty for out-of-bounds violations on reliability. This is the reference value for the i-th data channel at time t; The absolute difference between the original observation and the reference value represents the degree of abrupt change in the original data relative to the reference trend. The larger the difference, the more drastic the data change. is the mutation penalty scale parameter for the i-th data channel, which controls the penalty intensity of data mutation on reliability. This is a missing marker for the i-th data channel at time t, indicating when data acquisition is incomplete. A value of 1 indicates normal data collection. It is 0. The factor is used to penalize data exceeding the boundary. The more severe the data exceeds the boundary, the smaller the factor and the lower the credibility weight. If the data is within a reasonable range, the difference is 0, the factor is 1, and there is no penalty for exceeding the boundary. The mutation penalty factor is the factor that increases as the data deviates more from the reference value. The smaller the factor, the lower the confidence weight. If the data is exactly the same as the reference value, the difference is 0, the factor is 1, and there is no mutation penalty. As a missing penalty factor, when data is missing, the factor is 0, and the credibility weight is directly reset to 0.
[0248] It is understandable that in the formulas above and in subsequent formulas, the index symbol 't' uniformly represents the time index or depth index of drilling data, serving as a standardized index that is equivalent and universally applicable to both the time and depth dimensions. It is also understandable that, to simplify formula descriptions and avoid textual redundancy, the time or depth points are not separately annotated in the parameter explanations of some formulas. This simplification is solely for the sake of brevity and does not constitute a singular limitation on the meaning of index 't', nor does it change the unified definition of 't' as a time index or depth index.
[0249] To avoid misjudgments based solely on out-of-bounds or sudden changes, this implementation plan further provides optional reference values. Calculation method (choose one or a combination):
[0250] Moving median reference:
[0251] (4)
[0252] In formula (4), This is the reference value of the sliding median for the i-th data channel at time t (or depth point t); It is a median function; For the i-th data channel, with t as the center and a window half-width of t, The sequence of original observations within the neighborhood; The width is half the width of the window.
[0253] First-order exponential smoothing reference:
[0254] (5)
[0255] In formula (5), is the smoothing coefficient, and its value ranges from (0, 1); This represents the original observation value of the i-th data channel at time t; For the i-th data channel at time... The first-order exponential smoothing reference value is the smoothing result of the previous time step, used to recursively calculate the reference value for the current time step.
[0256] Linear predictive reference with operating conditions: When the relationship between certain channels and control variables is known to be stable, a setting can be made...
[0257] (6)
[0258] In formula (6), The reference value for linear prediction of the riser pressure (SPP, Stand Pipe Pressure) channel at time t under operating conditions; The intercept term of the linear regression is the constant term obtained from the statistical regression of historical regional data. , as well as The coefficients of the linear regression correspond to the weights of the control variables under each operating condition. They are obtained by regional statistical regression and are used to quantify the influence of displacement, inlet density, and equivalent circulation density on riser pressure. Let be the drilling displacement at time t; Let be the drilling fluid inlet density at time t; Let be the equivalent cyclic density at time t.
[0259] 2. Missing item repair
[0260] Confidence-driven layered repair is used for missing points:
[0261] If short-term missing (length of consecutive missing items) Linear / spline interpolation with boundary constraints is used.
[0262] If long-term missing (length of consecutive missing items) (Using reference values) or case prior Fill, among which, Let the prior values of the case library be at time t; and let Set to a lower value to avoid misleading; among which, It is the length threshold that distinguishes between short-term and long-term missing values;
[0263] It can be uniformly written as:
[0264] (7)
[0265] In formula (7), is the final repaired value of the i-th data channel at time t (or depth t), which is the output result after missing data repair; i is the data channel number, used to distinguish different types of drilling parameter channels such as mechanical drilling rate, drilling pressure, and standpipe pressure; t is the time / depth index, representing the time or well depth position corresponding to the data point that needs to be repaired. This is a missing marker for the i-th data channel at time t; A value of 0 indicates that there are no missing data, and the original observations are retained directly. A value of 1 indicates that data is missing, and the fusion and repair logic will be executed. This represents the raw observation value of the i-th data channel at time t, i.e., the raw drilling data directly collected by the sensor; This is the reference value for the i-th data channel at time t; The prior value of the case library for the i-th data channel at time t is obtained by statistical analysis of the target parameters of similar historical cases in the regional case library; The fusion coefficient is... .
[0266] 3. Robust standardization:
[0267] (8)
[0268] In formula (8), Let be the standardized data value of the i-th data channel at time t; Let be the repaired data value of the i-th data channel at time t; This represents the median of the i-th data channel within the current well section or sliding window. is the median absolute deviation of the i-th data channel; ; To prevent zero-valued values, in regional cross-well alignment scenarios, the "regional statistical median and MAD" can also be used as a standardized benchmark to facilitate model reuse across wells. It is an abbreviation for Median Absolute Deviation, which represents the absolute deviation of the median.
[0269] III. Construction and Data Structure of Regional Case Library, such as Figure 2 As shown.
[0270] 3.1 Case Library Hierarchical Structure
[0271] The regional case library can use a two-level or three-level index structure:
[0272] Regional layer: Block / Oilfield / Platform / Structural zone;
[0273] Technological layers: Well type (horizontal / extended reach), mud system (oil-based / water-based / polymer / high-density, etc.), well diameter combination, drill string combination keywords;
[0274] Well sections are categorized as follows: build-up section, horizontal section, and stable section; or classified according to formation / lithology section, wellbore cleanliness sensitive section, and loss-of-continuity sensitive section.
[0275] Fragment layer: Case cells are formed by slicing the data at a fixed depth window.
[0276] Each case unit should include at least: case fingerprint; target parameter trajectory segment; auxiliary trajectory segment; risk event label (such as stuck drill / lost well / well kick / insufficient hole cleaning, etc.); handling result and effect field (such as parameter adjustment action, whether it is resolved, time consumption, etc.); error correction residual field and confidence field.
[0277] 3.2 Case Fragment Slicing and Alignment
[0278] Let the length of the historical well sequence in the depth domain be... Select the fingerprint window half-width. With prediction window length For each center point Generate a case cell Among them: case fingerprints From historical wells Range data calculation; case target trajectory Pick . Specifically, For the first The total length of the sequence of historical wells in the depth domain (i.e., the total number of depth points). It serves as the unique identifier for historical wells. This serves as a unique identifier for each case unit, indicated by a well. and center point Together they form, representing the first Koujing, with It is an independent case unit centered around the central theme. The fingerprint vector of case unit c; The target parameter trajectory segment is the case unit c.
[0279] To enhance the alignment capability with velocity / operating condition variations across different sections of ultra-long horizontal wells, depth normalization and operating condition phase fields can be added, for example:
[0280] (9)
[0281] In formula (9), The phase of the well section is t, where t can be time t or depth index t. The current depth point is normalized to the relative position of the well section (0 represents the start of the well section and 1 represents the end of the well section). This serves as an additional constraint or feature for case retrieval, improving the alignment capability of working conditions for different well sections of ultra-long horizontal wells. The actual well depth at the current depth point t; This represents the initial depth of the current well section; This represents the end depth of the current well section; To prevent small quantities.
[0282] 3.3 Fingerprint Dimensions and Composition
[0283] fingerprint vector It consists of three types of features: statistical features, physical consistency features, and evolutionary gradient features. To ensure interpretability, searchability, and robustness to noise, it is preferable to construct it at multiple depth scales.
[0284] Let the scale set be each Corresponding window half-width (in depth points). For channels In scale Below, we define the confidence-weighted mean and variance:
[0285] (10)
[0286] (11)
[0287] In formulas (10) and (11), It is a depth scale set, including M different window half-widths (in terms of depth points), used to extract features at multiple granularities, improving the robustness of fingerprints to noise and the comprehensiveness of condition characterization. is the weighted mean of the credibility of the i-th data channel at scale s and center point t, reflecting the central trend of the channel in the neighborhood of t. After weighting, the influence of high credibility data can be highlighted; i is the data channel number. For the i-th channel at the depth point Credibility weight; For the i-th channel at the depth point Standardized data values; To prevent small quantities. The confidence weighted variance of the i-th data channel at scale s and center point t reflects the dispersion of the channel in the neighborhood of t. The confidence is also weighted to suppress noise. The square of the deviation of the (t+u)th point from the weighted mean is used to measure the degree of dispersion of the data.
[0288] The evolution gradient uses depth differencing (first-order or second-order optional):
[0289] (12)
[0290] (13)
[0291] In formulas (12) and (13), The first-order evolution gradient of the i-th data channel at depth point t is used to characterize the rate of change of the parameter at adjacent depth points and reflect the instantaneous change trend of the parameter. The standardized data value of the i-th data channel at depth point t; For the i-th data channel at the depth point The first-order evolution gradient; The second-order evolution gradient of the i-th data channel at depth point t is used to characterize the changing trend of the parameter change rate and capture the curvature characteristics of parameter evolution. Let be the first-order evolution gradient of the i-th data channel at depth point t.
[0292] Examples of physical consistency features (all can be used as fingerprint dimensions):
[0293] Difference: ;in, Due to the density difference between the drilling fluid inlet and outlet, The observed density of the drilling fluid outlet at depth point t; The measured value of the drilling fluid inlet density at depth point t.
[0294] Temperature difference: ;in, The temperature difference between the inlet and outlet of the drilling fluid. The measured value of the drilling fluid outlet temperature at depth point t. The value is the observed drilling fluid inlet temperature at depth point t.
[0295] Pressure-displacement sensitivity (local derivative):
[0296] (14)
[0297] Torque-speed sensitivity:
[0298] (15)
[0299] In formulas (14) and (15), The standpipe pressure (SPP) is the local sensitivity of drilling displacement Q, reflecting the intensity of the pressure system's response to changes in displacement. The first-order difference of the riser pressure SPP at depth point t; Let Q be the first-order difference of the drilling displacement at depth t; To prevent small quantities; This represents the local sensitivity of drilling torque (TQ, Torque) to drilling speed (RPM, Revolutions Per Minute); This represents the first-order difference of the drilling torque TQ at depth t. Let RPM be the first-order difference at depth t.
[0300] When the field is available, you can also add: ECD (Equivalent Circulating Density) deviation, back pressure, inflow-outflow difference, pump efficiency estimate, etc.
[0301] The above multiscale statistics, derivatives, and consistency terms are assembled in a fixed order to form... The credibility-weighted fingerprint is:
[0302] (16)
[0303] In formula (16), It is the original working condition fingerprint vector at the depth point (or time point t); It is a diagonal weighted matrix at depth point t; It is the final operational fingerprint vector at depth point t after confidence weighting. The diagonal elements do not necessarily equal the single-channel confidence score individually, but can be aggregated based on the confidence scores of "which channels constitute this feature dimension". For example, for For the corresponding dimension, its diagonal weights can be set as: ;right For the corresponding dimension, we can set: ;in, For density characteristics in The corresponding diagonal weights represent the overall credibility of that feature dimension; The confidence weight of the import density channel at depth point t; The confidence weight of the export density channel at depth point t; To obtain the minimum confidence level of the two channels; diagonal weighted matrix In the context of pressure-displacement sensitivity feature, the diagonal weight value represents the overall credibility of the feature at the depth point (or time point t). The confidence weight of the riser pressure (SPP) data channel at the depth point (or time point t); The reliability weight of the drilling displacement Q data channel at depth (or time) t.
[0304] IV. Regional Case Search Tool
[0305] 4.1 Distance Metrics and Weighted Mahalanobis Distance
[0306] The weighted Mahalanobis distance is:
[0307] (17)
[0308] in The following estimation method can be used:
[0309] Regional global estimation: Under the same region / same well type / same mud system, calculate the covariance of fingerprints for all cases;
[0310] Clustering estimation: First, cluster the case fingerprints (e.g., K-means), one for each cluster. ;in, Let be the covariance matrix of the k-th operating condition cluster;
[0311] Diagonal approximation: To reduce computational complexity and enhance numerical stability; among which, Let be the variance of the j-th feature dimension, and be a diagonal matrix. The j-th element on the diagonal; D is the total feature dimension of the working condition fingerprint vector; To construct a diagonal matrix;
[0312] When using a diagonal approximation:
[0313] (18)
[0314] In formulas (17) and (18), The weighted Mahalanobis distance between the current drilling condition and case cell c is used to quantify the similarity between the current drilling condition and historical case c. The smaller the distance, the more similar the conditions are. t is the index of the current depth point (or time point), representing the position of the current drilling condition. This serves as the identifier for case units within the regional case library. The credibility-weighted fingerprint vector of the current working condition at depth point t; The credibility-weighted working condition fingerprint vector for case unit c; T is the vector transpose operation; Let be the inverse of the covariance matrix of the case fingerprint; Fingerprint for current operating conditions The numerical value of the j-th dimension feature; Fingerprint of case unit c The numerical value of the j-th dimension feature; Let be the variance of the j-th feature.
[0315] 4.2 Candidate Recall and Top-K
[0316] To reduce retrieval latency in a very large case database, a two-stage retrieval method can be used:
[0317] Phase 1: Using low-dimensional coarse fingerprints (such as the mean / slope of key channels, well segment phase) Conduct a rapid recall;
[0318] Phase Two: Computing the complete candidate set And sort it carefully, take the top- .
[0319] Top- Sets are denoted as:
[0320] (19)
[0321] In formula (19), This is the Top-K similar case set at depth point t for the current working condition; For the Top-K selection function, in the candidate case set In the process, based on the input similarity index (i.e. Select the one with the largest value. Case unit corresponding to each element . This is a preset positive integer representing the number of similar cases to be selected; This serves as a unique identifier for the case unit; The set of candidate cases in the database; This is a similarity metric.
[0322] V. Error-correcting memory network
[0323] 5.1 Retrieval Attention Weight
[0324] Attention weights:
[0325] (20)
[0326] In formula (20), Let be the attention weight of the c-th case at the current depth (or time point t); This is a temperature parameter (distribution sharpness control factor). The weighted Mahalanobis distance between the current working condition and case c; The normalized denominator is used to sum the exponential terms of all cases k in the Top-K set, ensuring that the sum of the attention weights of all cases is 1, thus forming a standardized probability distribution. This is the set of Top-K similar cases at depth point t for the current working condition.
[0327] 5.2 Prior evolution trajectory and uncertainty, the specific formula is as follows:
[0328] (twenty one)
[0329] (twenty two)
[0330] In formulas (21) and (22), It is the mean of the prior evolution trajectory of the h-th prediction step after the current depth point t, which is the predicted prior value of the target drilling parameters; For predicting the step size index; In case c, the historical observation value of the target parameter at the h-th step after the current reference point t; Let Variance be the variance of the prior evolution trajectory at the h-th prediction step after the current depth point t, and let represent the prior mean. The greater the variance in dispersion and uncertainty, the lower the reliability of prior predictions. It is a variance lower bound constant used to avoid the variance degenerating to 0 when the Top-K cases are highly consistent, which would lead to distortion of risk probability calculation and ensure that the prior uncertainty always has a reasonable lower bound.
[0331] 5.3 Error correction writing mechanism.
[0332] (1) Define instantaneous residual
[0333] When online Observations have been obtained (Real-time values of the target parameters), define the residuals: Multi-step prediction can also be defined as follows: ;in, Characterizes the deviation between the real-time observed values of the target drilling parameters and the mean of the prior evolution trajectory at the current depth / time point t; Let t be the target drilling parameters collected by the sensor at online time; The target parameter prior prediction value at time t is obtained by weighted aggregation of Top-K similar cases.
[0334] Characterizing the h-th prediction step size (depth / time point) in the future The deviation between the actual observed values and the prior mean of the target parameters; The actual observed values of the target drilling parameters corresponding to the h-th prediction step in the future; This represents the prior prediction value of the target parameter corresponding to the h-th step in the future.
[0335] (2) Maintain the error correction field for each case.
[0336] Each case Maintain the mean of error correction residuals With error correction variance (It can also be a vector, varying with the prediction step size) (Changes). To simplify the description, the scalar version will be used as an example. For example Estimation of systematic bias in the current region / process; Let be the deviation uncertainty of case c, used to determine the strength of error correction.
[0337] (3) Gating and Responsibility Assignment
[0338] Online time to Top- Cases are written according to responsibility allocation, which is equivalent to attention weighting. The update rules can be:
[0339] (twenty three)
[0340] (twenty four)
[0341] In formulas (23) and (24), For the assignment update symbol, This is a historical bias retention term, that is, the historical systematic bias of case c is retained according to the complement of the write rate. The smaller the value, the greater the weight of historical bias, and the longer the memory lasts; Write the real-time deviation into the item; The write rate of case c is used to control the intensity of real-time deviation updates to the systematic deviation of case c. For single-step instantaneous residuals; This is a term reserved for historical uncertainty. Writes entries for real-time deviation fluctuations. Write rate: ;in, The updated strength coefficient is dynamically adjusted according to the current working condition position t. As the baseline write rate, Let y be the confidence weight of the target parameter y at time t.
[0342] (4) Use the error correction residuals for prior correction.
[0343] In the next prior generation, the case trajectory will be corrected as follows:
[0344] (25)
[0345] In formula (25), The corrected case trajectory value represents the target parameter of case c after error correction and update at time t+h in the future; The original case trajectory value represents the original target parameter value stored in the historical record of case c at time t+h. Let be the mean of the error correction residuals for case c.
[0346] Therefore, the prior mean becomes:
[0347] (26)
[0348] In formula (26), The corrected prior prediction mean represents the expected value of the target parameter at time t+h, which is the expected value at time t+h. Let t be the set of the Top-K historical cases that are most similar to the current working condition, obtained through retrieval.
[0349] The prior variance can be added to the error correction variance term accordingly:
[0350] (27)
[0351] In formula (27), This is the corrected prior prediction variance. It represents a measure of the uncertainty of the predicted value at time t+h, given at time t. A larger variance indicates higher uncertainty. The case dispersion measures how much the predicted values of each corrected similar case are dispersed around its weighted average. The variance of the error correction residuals for case c; This is the term with the least variance; in this way, the case library not only stores history, but is also corrected by reality.
[0352] (5) False alarm / missed alarm reward and punishment system (for early warning reliability optimization)
[0353] After a warning window ends, it can be determined whether a risk event has actually occurred, and a "true" label can be defined. Early warning output . Specifically, A value of 1 indicates that a drilling risk event has actually occurred within the warning window corresponding to the current operating condition t. A value of 0 indicates that no actual risk event has occurred within the warning window; This is the risk warning result output for the current operating condition t; A value of 1 indicates that there is a risk in the current working condition, and a risk warning has been issued; A value of 0 indicates that the current working condition is deemed risk-free and no warning has been issued.
[0354] For false alarms ( ) and underreporting ( ) Confidence levels of the cases respectively Perform weakening / enhancing:
[0355] (28)
[0356] In formula (28), To assess the reliability of Case c in early warning / forecasting, This is a truncation function; It is a natural exponential function; This is the reward / punishment intensity coefficient; The attention weights for case c under operating condition t; This represents the lower confidence level. is the upper limit of confidence; t is the depth / time point index of the current working condition.
[0357] Subsequently introduced into attention weights or distance Modulation, for example:
[0358] (29)
[0359] Or add a penalty to the distance:
[0360] (30)
[0361] In formulas (29) and (30), The sign is proportional. For the similarity of working conditions; For weighted Mahalanobis distance; Temperature is a parameter used to control the sharpness of similarity. The modulated weighted Mahalanobis distance; This is the penalty coefficient; This is a confidence level penalty item. The above error correction writing mechanism enables the system to continuously learn and gradually reduce the weight of misleading cases, achieving increasing accuracy with repeated use in engineering applications.
[0362] VI. Evolutionary Consistency Inferrer
[0363] To address the issues of prediction bias and conflicts between historical case trends and real-time operating conditions, this implementation plan designs an inference mechanism based on trend locking and drift correction, rather than static weighting.
[0364] 6.1 Trend Consistency Coefficient Calculation
[0365] In the evolution of drilling risk, changing trends are often more discerning than absolute values. This implementation plan first calculates the real-time observed gradient. With prior evolution gradient Directional similarity between them:
[0366] (31)
[0367] In formula (31), This is the trend consistency coefficient, which changes dynamically with the current operating condition position t. When the gradient approaches 1, the real-time observed gradient is highly consistent with the direction of the prior evolution gradient, indicating that the historical case trends are suitable for the current working conditions, and the trust in the prior prediction should be strengthened; when When the value approaches 0, it indicates that the two trends are completely divergent; This represents the real-time trend of the target parameters under the current operating condition t. This represents the evolution trend of the target parameters in the prior predictions obtained by aggregating historical cases under the current working condition t. The result is the gradient dot product; a positive result indicates the same direction and consistent trend; a negative result indicates the opposite direction and divergent trend; a result of 0 indicates the perpendicular direction and no obvious correlation. To prevent small quantities.
[0368] 6.2 Dynamic Drift Correction
[0369] Considering the inherent biases in formation pressure coefficients or sensor calibration between different well runs, directly using the absolute values from case studies for prediction can easily lead to systematic errors. This implementation plan utilizes a trend consistency coefficient. Calculate dynamic fusion gain :
[0370] (32)
[0371] Then, a drift correction formula for multi-step prediction is constructed:
[0372] (33)
[0373] In formulas (32) and (33), The dynamic fusion gain changes dynamically with the current operating condition t, and its value ranges from 0 to 1. When the value tends towards 1, prioritize trusting real-time observations and significantly revise prior predictions; when... When the value approaches 0, prioritize trusting prior predictions; The variance of the prior evolution trajectory represents the uncertainty of the prior prediction. To monitor variance in real time; The confidence level of the target parameter represents the reliability of real-time observations. When the value approaches 0, it indicates that the observation is unreliable. When the value approaches 1, it indicates that the observation is reliable and the observation weights are functioning normally. This is the corrected observation variance; t is the condition index, representing the current depth / time point, and all parameters with t are bound to this condition index; The corrected multi-step prediction mean is the final output of the target parameter at step t+h, which is the fusion result of prior prediction and drift correction. The mean of the original prior evolutionary trajectory is the prior prediction value for the next t+h steps, obtained by weighted aggregation of Top-K similar cases, representing the evolutionary trend shape of historical cases; These are the actual observed values of the target parameters under the current operating condition t; It is the prior model's prediction of the current operating condition t; h is the prediction step size index; This represents the current observation residual. A decay function is introduced. This formula smoothly superimposes current systematic biases onto future predicted trajectories. This ensures the predicted curve can lock onto the evolutionary shape of historical cases while calibrating the starting point to the current real-time observation anchor point, effectively eliminating the effects of zero-point drift. This is the attenuation coefficient.
[0374] 6.3 Variance Inflation under Trend Conflict
[0375] To prevent the system from making overly confident predictions when trends are inconsistent, this implementation plan introduces a penalty term in the posterior variance:
[0376] (34)
[0377] In formula (34), The corrected posterior prediction variance represents the uncertainty at time t regarding the predicted value of the target parameter at time t+h. The standard deviation update coefficient. For dynamic fusion weights; This is the step size decay factor, which decays exponentially with the increase of the prediction step size h. The prior prediction variance represents the initial uncertainty of the predicted value at time t+h based on similar historical cases, reflecting the degree of dispersion of historical experience. As a measure of trend conflict, The trend consistency coefficient. It is a very small positive number; This is a trend conflict penalty factor, a preset normal value, used to control the baseline strength or magnitude of variance inflation. When the trend is consistent... When the value is low, the second term increases significantly, leading to a decrease in prediction variance. Inflation. In subsequent risk probability calculations, the inflated variance flattens the probability distribution, making it easier to cover the safety threshold boundary, thus triggering uncertainty warnings and indicating potential risks arising from deviations from historical experience in operating conditions. t is the operating condition index, representing the current depth point / time point; all parameters with t are bound to this operating condition index.
[0378] 6.2 Consistency Inference of Multi-Step Prediction
[0379] In multi-step prediction, for each future step... It can be constructed using a priori trajectory plus dynamic consistency increments:
[0380] (35)
[0381] in This can be obtained from the difference between the mean and the mean of the case trajectories:
[0382] (36)
[0383] In formulas (35) and (36), Let be the predicted value of the prior evolution trajectory at time t+h. This represents the value of the prior evolution trajectory at the previous prediction step size t+h-1. This represents the prior prediction increment from time t+h-1 to time t+h. This enhances the smoothness and evolutionary consistency of the prior trajectory.
[0384] 6.3 Process consistency residual
[0385] In addition to the target parameters themselves, this implementation scheme preferably calculates several consistency residuals to interpret early warnings and enhance robustness. A family of consistency functions is defined. ,in, This is a set of J-type process consistency residual functions, used to quantify the degree of deviation between the current operating condition and the normal process pattern; j is the index of the consistency residual, and J is the total number of consistency residuals. Specifically:
[0386] Inlet / outlet density consistency: ;in, The density difference between the inlet and outlet under the current operating condition t. This represents the real-time observed density of the drilling fluid outlet under the current operating condition t. This represents the real-time observed density of the drilling fluid inlet under the current operating condition t.
[0387] Inlet / outlet temperature consistency: ;in, The inlet and outlet temperature difference under the current operating condition t; This is the real-time observed value of the drilling fluid outlet temperature under the current operating condition t; This is the real-time observed value of the drilling fluid inlet temperature under the current operating condition t;
[0388] Pressure-displacement relationship residuals (simplified linear consistency): ;in, This represents the residual between the actual riser pressure and the linear model prediction under the current operating condition t. This represents the real-time observed value of the riser pressure under the current operating condition t. This represents the real-time observed value of drilling displacement under the current operating condition t. The coefficients are obtained from regional regression or online adaptive estimation and are linear model coefficients.
[0389] Incorporating these consistency items into fingerprints and risk assessments can lead to more robust early warning systems. For example, defining the probability of consistency anomalies:
[0390] (37)
[0391] In formula (37), This represents the probability of consistency anomalies under the current operating condition t. A larger value indicates a higher probability that at least one process constraint is significantly violated, and the operating condition is more unstable. This represents the total number of consistent residuals. The consistency residual of the j-th process under the current operating condition t; Let be the tolerance threshold for the j-th residual; Let be the scaling parameter of the j-th residual; This is the cumulative distribution function of the standard normal distribution.
[0392] VII. Risk Probability Calculation and Early Warning Strategy
[0393] 7.1 The risk probability based on the predicted distribution is expressed as:
[0394] (38)
[0395] In formula (38), Let be the single-step risk probability predicted at time t (the current time); t is the current time or the current depth index; h is the prediction step size, which is a positive integer representing the number of steps to predict forward from the current time t. The lower and upper limits of the safe operating range for the target drilling parameters; The corrected predicted mean of the target parameters at time t+h in the future; The corrected predicted variance of the target parameters at time t+h in the future; Let be the target parameter random variable; the meaning of this formula is: if the target parameter falls within the safe interval in the future, it is considered safe; otherwise, it is considered risky; the risk probability is the probability of falling outside the interval. This is the probability density function of a normal distribution, used to describe the probability distribution of the predicted values of the target parameters. It is a random variable.
[0396] When a normal distribution is used, the above equation can be written in closed form:
[0397] (39)
[0398] In formula (39), ; The cumulative distribution function of the standard normal distribution; This is a standardized value representing the upper limit of safety. This is a standardized value for the lower safety limit; For the predicted standard deviation; This is the corrected predicted mean.
[0399] 7.2 Multi-step risk aggregation and early warning level
[0400] The aggregation formula is:
[0401] (40)
[0402] In formula (40), To aggregate risk probabilities, This represents the probability that a risk will occur at least once within the next H-step prediction window under the current operating condition t. The safety probability at step h is complementary to the risk probability at step h, representing the probability that the target parameter at this step falls within the safety range. This represents the total step size of the prediction window. This formula indicates the probability that a risk will occur at least one step within the prediction window, making it suitable for applications requiring alerts whenever a risk is likely to occur within the future window.
[0403] The warning level can be defined in multiple tiers:
[0404] Level I (Hint): ;
[0405] Level II (Attention): ;
[0406] Level III (Warning): ;
[0407] Level V (Severe): ;
[0408] in, , , , as well as This is a preset risk probability threshold boundary; This is for aggregating risk probabilities.
[0409] 7.3 Risk Type Mapping
[0410] In ultra-long horizontal wells, common types of risks include:
[0411] Stuck drill risk: manifested as increased torque and riser pressure, decreased mechanical drilling speed, abnormal vibration, short-term pump pressure fluctuations, etc.
[0412] Well leakage risk manifests as inflow-outflow difference, decreased outlet density, decreased riser pressure (in some operating conditions), abnormal sand return, etc.
[0413] Well kick risk: Increased gas flow, decreased outlet density, abnormally increased outflow, etc.
[0414] Insufficient wellbore cleaning: gradually increasing torque / friction, gradually increasing riser pressure, and need for improvement during short starts, etc.
[0415] This application allows for setting different target parameters and consistency functions for different risk types, for example:
[0416] For stuck drill / insufficient hole clearing: torque, riser pressure, mechanical drilling speed, and vibration are the key predictors;
[0417] For leakage / well inrush: the key parameters are flow difference, density difference, and gas measurement.
[0418] Risk probabilities can be expanded into a vector:
[0419] (41)
[0420] In formula (41), This represents the probability vector of multiple risk types under the current operating condition t. The aggregate probability of stuck drill risk represents the probability that the stuck drill risk will occur at least once within the future window under the current working condition t. The aggregate probability of well leakage risk represents the probability that well leakage risk will occur at least once within the future window under the current operating condition t. Aggregate probability of well kick (well kick / blowout) risk, representing the probability that well kick risk will occur at least once within the future window under the current operating condition t; Given the current operating condition t, this represents the probability of insufficient wellbore cleaning occurring at least once within the future window.
[0421] Each item can be obtained by fusing the aggregated risk and the probability of consistency anomalies of the corresponding parameter set, for example:
[0422] (42)
[0423] In formula (42), Let be the probability of the density difference exceeding the threshold at step h, that is, the probability that the density difference will exceed the safety threshold at time t+h in the future; The difference between import and export densities; The probability of density difference security at step h; This represents the probability of abnormal flow consistency, or the probability that the flow balance is disrupted under the current operating condition t.
[0424] 8. Optional physical consistency features
[0425] To enhance interpretability and generalization ability, a mechanism consistency term can be introduced into fingerprints and risks.
[0426] For example, the mechanical specific energy characteristic is calculated (the unit depends on the input unit):
[0427] (43)
[0428] In formula (43), t represents the mechanical specific energy under the current operating condition, where MSE is an abbreviation for Mechanical Specific Energy. Weight on Bit (BBT) is the axial pressure exerted on the drill bit under the current working condition t, and it is the main axial force for rock breaking. Torque is the rotational torque transmitted from the drill string to the drill bit under the current operating condition t. Rotational speed (Revolutions Per Minute) is the number of revolutions per minute of the drill bit under the current working condition t, which determines the frequency and efficiency of rock breaking; The mechanical drilling rate (Rate of Penetration) is the drilling speed of the drill bit under the current working condition t, and is a direct representation of rock breaking efficiency. This represents the cross-sectional area of the drill bit.
[0429] Will Add window mean and window slope This can improve sensitivity to stick-slip, drill bit wear, and sudden changes in mechanical efficiency. Furthermore, the probability of MSE anomalies can be defined:
[0430] (44)
[0431] In formula (44), Let MSE be the probability of anomaly under the current operating condition t. The cumulative distribution function of the standard normal distribution; This represents the average value of MSE under normal operating conditions. The standard deviation (SCD) is the scaling parameter for MSE; torque-friction consistency characteristics can also be introduced: Alternatively, the friction coefficient can be estimated based on the drilling and dragging curve and used as a fingerprint dimension; among which, is the friction coefficient under the current working condition t, where DF (Drag Factor, torque-drill pressure ratio).
[0432] IX. System Implementation Examples
[0433] See Figure 4 The system provided in this embodiment includes:
[0434] Data acquisition module: Acquires multi-source drilling data;
[0435] Data processing module: credibility assessment, repair, standardization;
[0436] Case retrieval module: fingerprint construction, distance calculation, Top- Search;
[0437] Error-correcting memory module: attention aggregation, prior trajectory generation, residual writing, and confidence reward / penalty update;
[0438] Consistency inference module: Bayesian fusion, multi-step prediction distribution output, consistency residual calculation;
[0439] Early warning output module: risk calculation, threshold determination, classification and recommendation output, and evidence case display.
[0440] According to an embodiment of the present invention, an electronic device is provided. The electronic device in this embodiment may include one or more of the following components: a processor, a network interface, memory, non-volatile memory, and one or more application programs, wherein the one or more application programs may be stored in the non-volatile memory and configured to be executed by one or more processors, and the one or more programs are configured to perform the methods described in the foregoing method embodiments.
[0441] According to embodiments of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a computer, causes the computer to perform the method described in any of the above embodiments.
[0442] According to embodiments of the present invention, a computer program product comprising instructions is also provided, which, when executed by a computer, cause the computer to perform a method in any of the above embodiments.
[0443] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting the evolution of drilling parameters in ultra-long horizontal wells, characterized in that, include: Acquire real-time multi-source drilling data; Construct a fingerprint vector of the current working condition based on real-time multi-source drilling data; Input the fingerprint vector of the current working condition into the regional case retrieval device to retrieve at least one set of historical cases similar to the current working condition; Based on historical data of target parameters from at least one similar historical case, generate the prior evolution trajectory of the target drilling parameters and its prior uncertainty. The real-time observations of the target drilling parameters, the prior evolution trajectory, and its prior uncertainty are input into the evolution consistency inferrer, and consistency-aware fusion processing is performed to output a corrected multi-step prediction sequence. The consistency-aware fusion processing includes at least: evaluating the consistency measure between the real-time evolution trend and the prior evolution trend based on the real-time observations and the prior evolution trajectory; determining the dynamic fusion weights for the prior information and the real-time observation information based on the consistency measure, prior uncertainty, and observation uncertainty; and coordinating the correction of the values and uncertainties of the prior evolution trajectory based on the dynamic fusion weights to obtain the corrected multi-step prediction sequence.
2. The method according to claim 1, characterized in that, The steps for acquiring real-time multi-source drilling data include: Receive real-time multi-source drilling data; wherein, the real-time multi-source drilling data includes at least two of the following: well depth, mechanical drilling speed, drilling pressure, rotational speed, torque, standpipe pressure, inlet and outlet density, inlet and outlet temperature, sand return rate, gas measurement value, well inclination azimuth, vibration while drilling, gamma while drilling, and resistivity while drilling. The received real-time multi-source drilling data is subjected to quality assessment to obtain the reliability of each data channel. The quality assessment includes: for each data channel, obtaining the original observation value, physical reasonable upper and lower bounds, reference value, and missing data marker; determining a first penalty factor based on the degree to which the original observation value exceeds the physical reasonable upper and lower bounds; determining a second penalty factor based on the degree to which the original observation value deviates from the reference value; determining a third penalty factor based on the missing data marker; and determining the reliability of the channel at the corresponding time by multiplying the first, second, and third penalty factors. Using well depth as the main axis, real-time multi-source drilling data is interpolated and aligned to a preset depth grid to obtain depth-domain aligned real-time multi-source drilling data. Specifically, for each target depth point, the interpolation weight is determined based on the distance between the original data points in the neighborhood and the target depth point, as well as the reliability of the original data point. Then, a weighted average is performed on each original data point to obtain depth-domain aligned real-time multi-source drilling data.
3. The method according to claim 1, characterized in that, The step of constructing the current working condition fingerprint vector based on real-time multi-source drilling data includes: Statistical features, evolutionary gradient features, and consistency features characterizing the physical correlation of multiple channels are extracted from real-time multi-source drilling data at different depth scales. The statistical features include weighted mean and weighted variance calculated based on the reliability of each data point at different depth scales. The evolutionary gradient features include first-order and / or second-order differences of the data points. The consistency features include at least one of inlet / outlet density difference, inlet / outlet temperature difference, pressure-displacement sensitivity, and torque-speed sensitivity. The extracted features are combined into the original fingerprint vector; Based on the credibility of the data channels corresponding to each feature, the original fingerprint vector is weighted to obtain the weighted current operating condition fingerprint vector. The weighting is achieved by constructing a diagonal weighting matrix based on the aggregated credibility values of the data channels corresponding to each feature, and multiplying the diagonal weighting matrix with the original fingerprint vector to obtain the weighted current operating condition fingerprint vector.
4. The method according to claim 1, characterized in that, The step of inputting the current operating condition fingerprint vector into the regional case retrieval device to retrieve at least one set of historical cases similar to the current operating condition includes: Calculate the weighted distance between the fingerprint vector of the current operating condition and the fingerprint vectors of each historical case in the regional case library; The similarity ranking is determined based on weighted distance, and at least one historical case with the highest similarity is selected to form the set of historical cases.
5. The method according to claim 4, characterized in that, The step of calculating the weighted distance between the current operating condition fingerprint vector and the fingerprint vectors of each historical case in the regional case library includes: The weighted Mahalanobis distance is used to calculate the weighted distance between the fingerprint vector of the current working condition and the fingerprint vectors of each historical case; The step of determining the similarity ranking based on weighted distance and selecting at least one historical case with the highest similarity to form the historical case set includes: Based on the weighted Mahalanobis distance, attention weights are calculated for each historical case, with higher weights for smaller distances. At least one historical case with the highest attention weight is selected to form the historical case set; the process further includes retrieval optimization processing; wherein the retrieval optimization processing includes at least one of the following methods: A two-stage retrieval method is adopted. First, a candidate case set is quickly retrieved from the regional case library based on the low-dimensional representation of the fingerprint vector of the current working condition. Then, the weighted Mahalanobis distance is calculated in the candidate case set. When calculating the weighted Mahalanobis distance, the covariance matrix of the fingerprint vectors of cases in the regional case library or its diagonal approximation matrix is used.
6. The method according to claim 5, characterized in that, The step of generating the prior evolution trajectory of the target drilling parameters and its prior uncertainty based on historical data of the target parameters from at least one similar historical case includes: Based on the attention weights, the historical data of the target parameters of at least one similar historical case are weighted and summed to obtain the prior evolution trajectory. Based on the attention weights and prior evolution trajectories, the weighted variance of the historical data of the target parameters of similar historical cases relative to the prior evolution trajectory is calculated, and a preset lower limit of variance is added to the weighted variance to obtain the prior uncertainty.
7. The method according to claim 1, characterized in that, The step of evaluating the consistency measure between real-time evolutionary trends and prior evolutionary trends based on real-time observations and prior evolutionary trajectories includes: Calculate the first evolution gradient of the real-time observation at the current moment and the second evolution gradient of the prior evolution trajectory at the current moment; Calculate the dot product of the first evolution gradient and the second evolution gradient, and the product of the magnitude of the first evolution gradient and the magnitude of the second evolution gradient; Based on the ratio of the dot product to the product, the directional similarity between the real-time evolution trend and the prior evolution trend is determined, and the directional similarity is mapped to a preset interval to obtain the consistency measure.
8. The method according to claim 7, characterized in that, The step of determining the dynamic fusion weights for prior information and real-time observation information based on consistency metrics, prior uncertainty, and observation uncertainty includes: Calculate the product of the consistency measure and the prior uncertainty, and use it as the first fusion factor; The ratio of the observation uncertainty to the reliability of the real-time observation is calculated and used as the observation noise factor. The sum of the first fusion factor and the observation noise factor is calculated as the second fusion factor; The ratio of the first fusion factor to the second fusion factor is determined as the dynamic fusion weight.
9. The method according to claim 8, characterized in that, The step of collaboratively correcting the numerical values and uncertainties of the prior evolution trajectory based on dynamic fusion weights to obtain the corrected multi-step prediction sequence includes: Calculate the residual between the real-time observation at the current moment and the prior value of the prior evolution trajectory at the current moment, and use it as the current observation residual; For each prediction step, the product of the dynamic fusion weight and the preset step size decay factor is calculated as the step size correction coefficient. The prior values of the prior evolution trajectory at the corresponding future time are offset and corrected by multiplying the step size correction coefficient with the current observation residual, thus obtaining the corrected multi-step prediction mean sequence. Calculate the first correction factor; where the first correction factor is the difference between one and the step size correction coefficient; The first variance component is obtained by multiplying the first correction factor by the value of the prior uncertainty at the corresponding future time. Based on the consistency metric, the degree of trend divergence is determined, and the preset expansion baseline value is scaled based on the degree of trend divergence to obtain the second variance component. The sum of the first variance component and the second variance component is calculated and used as the corrected multi-step prediction variance sequence. The corrected multi-step prediction mean sequence and the corresponding multi-step prediction variance sequence are output as the corrected multi-step prediction sequence.
10. A method for early warning of drilling parameter evolution in ultra-long horizontal wells, characterized in that, include: Obtain a corrected multi-step prediction sequence of the target drilling parameters; wherein, the method for predicting the evolution of drilling parameters for ultra-long horizontal wells as described in any one of claims 1 to 9 is used to obtain the corrected multi-step prediction sequence of the target drilling parameters. Based on the corrected multi-step prediction sequence, calculate the risk probability of at least one future prediction step; If the risk probability exceeds a preset threshold, a warning message will be output.