A drilling non-stationary data stream-oriented continuous learning prediction method and system, device, medium and program product
Patent Information
- Application Number
- CN202610008026.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-05
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-01-05
AI Technical Summary
然而,由于地层属性复杂多变,钻井过程中的操作参数也存在动态波动,这些因素导致钻井数据呈现高度非平稳性
[0017] The online model parameter update method, apparatus, device, medium, and program products provided in this application, after drilling for a period of time using the mechanical drilling rate prediction model, determine the actual mechanical drilling rate that is more suitable for the current working scenario based on data changes. The actual mechanical drilling rate allows for the evaluation of the accuracy of the mechanical drilling rate prediction model's output, making model parameter updates more timely. The streaming data from the previous cycle (i.e., the model input data corresponding to the target mechanical drilling rate) is used as new training samples to update the model parameters online, enabling the model to adapt to dynamically changing downhole working scenarios, thereby improving the accuracy and real-time performance of the model output. During online model parameter updates, the mechanical drilling rate prediction model is retrained using multiple training samples, including the new training samples. A comprehensive objective function, including a weight update regularization term and a prediction loss term, constrains the update magnitude of the model parameters until the comprehensive objective function meets the desired requirements. The weight update regularization term avoids the problem of forgetting learned knowledge during online model parameter updates, achieving knowledge retention and rapid adaptation in dynamic and non-stationary environments, thereby further improving the accuracy of the model output.
Smart Images

Figure CN122087313B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of oil and gas exploration, in particular to a continuous learning prediction method, system, device, medium and program product for drilling non-stationary data streams. Background Art
[0002] In the process of oil and gas exploration and development, drilling engineering is a core key link, and its drilling efficiency directly determines the overall promotion efficiency of oil and gas exploration. As a core indicator affecting drilling efficiency, carrying out drilling engineering with a rate of penetration that is highly adapted to the operation environment can not only improve drilling efficiency and reduce drilling costs, but also effectively reduce the occurrence of complex working conditions and lower drilling risks.
[0003] At present, the determination of rate of penetration mainly relies on physical modeling prediction. This method constructs a physical model corresponding to formation properties and rate of penetration based on physical laws, and calculates the rate of penetration through the physical model. However, due to the complex and changeable formation properties and dynamic fluctuations in operating parameters during the drilling process, these factors cause drilling data to present high non-stationarity. Traditional physical models are difficult to adapt to the data characteristics in dynamic environments, which leads to deviations in the predicted rate of penetration. Summary of the Invention
[0004] The embodiments of the present application provide a continuous learning prediction method, system, device, medium and program product for drilling non-stationary data streams. Through online dynamic updating of the prediction model, the predicted rotation speed can be accurately matched with the actual operation scenario. Meanwhile, by introducing a regularization constraint mechanism, on the basis of adapting to changing operation scenarios, historical learned knowledge is effectively retained, the problem of catastrophic forgetting is avoided, and the prediction result of the finally obtained model has higher accuracy.
[0005] In a first aspect, an embodiment of the present application provides an online updating method for model parameters, comprising: after drilling for a preset time based on a target rate of penetration, acquiring a real rate of penetration; wherein the target rate of penetration is predicted by a pre-trained rate of penetration prediction model based on streaming data collected in the previous cycle during the drilling process; generating a new training sample based on the streaming data of the previous cycle, and setting a label for the new training sample as the real rate of penetration; constructing a comprehensive objective function including a weight update regularization term and a prediction loss term based on a target information matrix; performing online iterative updating on the model parameters of the rate of penetration prediction model based on the value of the comprehensive objective function by using a plurality of training samples including the new training sample and historical training samples.
[0006] In one possible implementation, using multiple training samples including new and historical training samples, the model parameters of the mechanical drilling rate prediction model are iteratively updated online based on the value of the comprehensive objective function. This includes: repeatedly performing the following steps until the value of the comprehensive objective function is less than or equal to a preset function value: inputting multiple training samples including new and historical training samples into the mechanical drilling rate prediction model to obtain predicted values for multiple training samples; calculating the value of the comprehensive objective function based on the difference between the predicted values and the true values of multiple training samples, and the parameter deviation term of each model parameter; the parameter deviation term is used to characterize the deviation of the model parameter variables from the model parameters of the mechanical drilling rate prediction model in the previous period; and updating the model parameters of the mechanical drilling rate prediction model using a preset optimization algorithm to obtain the updated model parameters.
[0007] In one possible implementation, before constructing a comprehensive objective function including a weight update regularization term and a prediction loss term based on the target information matrix, the method further includes: determining the information matrix of the mechanical drilling rate prediction model of the previous cycle as the initial information matrix; for each model parameter of the mechanical drilling rate prediction model, calculating the expectation of the squared log-likelihood gradient of the model parameters based on the new training samples to obtain the first parameter; weighting the first parameter with the elements corresponding to the model parameters in the initial information matrix, and updating the elements corresponding to the model parameters in the initial information matrix with the weighted result to obtain each element in the target information matrix.
[0008] In one possible implementation, the weight update regularization term is determined based on the sum of the products of each element in the target information matrix and the corresponding parameter deviation term. The parameter deviation term is used to characterize the deviation between the model parameter variables and the model parameters of the mechanical drilling rate prediction model in the previous cycle.
[0009] In one possible implementation, the method further includes: determining a target sampling strategy from multiple sampling strategies; sampling multiple historical training samples from a historical training sample set based on the target sampling strategy; and determining the multiple historical training samples and new training samples as multiple training samples to be used in this online iterative update.
[0010] In one possible implementation, the model parameters of the mechanical drilling rate prediction model are iteratively updated online using multiple training samples, including new training samples and historical training samples, based on the value of the comprehensive objective function. This includes: iteratively updating the model parameters of the mechanical drilling rate prediction model online using multiple training samples, including new training samples and historical training samples, based on the value of the comprehensive objective function; calculating the goodness of fit based on the predicted values obtained by inputting multiple training samples into the mechanical drilling rate prediction model; if the goodness of fit does not meet a preset condition, switching the target sampling strategy based on the goodness of fit, and returning to the step of sampling multiple historical training samples from the historical training sample set based on the target sampling strategy to perform online iterative updates again.
[0011] Secondly, embodiments of this application provide a drilling speed prediction method, comprising: acquiring streaming data during the drilling process of the current cycle according to a set cycle; preprocessing the streaming data to generate time series data for the current cycle; inputting the time series data of the current cycle into a mechanical drilling speed prediction model to obtain a target mechanical drilling speed; wherein the model parameters of the mechanical drilling speed prediction model are obtained by online iterative updates based on the method provided in the first aspect above.
[0012] Thirdly, embodiments of this application provide an online model parameter update device, comprising: a real value acquisition module, used to acquire the real mechanical drilling speed after drilling for a preset time based on a target mechanical drilling speed; wherein the target mechanical drilling speed is predicted by a pre-trained mechanical drilling speed prediction model based on streaming data collected during the drilling process in the previous cycle; a new training sample generation module, used to generate new training samples based on the streaming data of the previous cycle, and set the label of the new training samples as the real mechanical drilling speed; a comprehensive objective function determination module, used to construct a comprehensive objective function including a weight update regularization term and a prediction loss term based on the target information matrix; and an online iterative update module, used to perform online iterative updates of the model parameters of the mechanical drilling speed prediction model based on the value of the comprehensive objective function using multiple training samples including new training samples and historical training samples.
[0013] Fourthly, embodiments of this application provide a drilling speed prediction device, comprising: a data acquisition module for acquiring streaming data during the drilling process of the current cycle according to a set cycle; a data processing module for preprocessing the streaming data to generate time-series data for the current cycle; and a model prediction module for inputting the time-series data of the current cycle into a mechanical drilling speed prediction model to obtain a target mechanical drilling speed; wherein the model parameters of the mechanical drilling speed prediction model are obtained by online iterative updates based on the method provided in the first aspect above.
[0014] Fifthly, embodiments of this application provide an electronic device, including: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the methods provided in the first and / or second aspects above.
[0015] Sixthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the first and / or second aspects above.
[0016] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the first and / or second aspects above.
[0017] The online model parameter update method, apparatus, device, medium, and program products provided in this application, after drilling for a period of time using the mechanical drilling rate prediction model, determine the actual mechanical drilling rate that is more suitable for the current working scenario based on data changes. The actual mechanical drilling rate allows for the evaluation of the accuracy of the mechanical drilling rate prediction model's output, making model parameter updates more timely. The streaming data from the previous cycle (i.e., the model input data corresponding to the target mechanical drilling rate) is used as new training samples to update the model parameters online, enabling the model to adapt to dynamically changing downhole working scenarios, thereby improving the accuracy and real-time performance of the model output. During online model parameter updates, the mechanical drilling rate prediction model is retrained using multiple training samples, including the new training samples. A comprehensive objective function, including a weight update regularization term and a prediction loss term, constrains the update magnitude of the model parameters until the comprehensive objective function meets the desired requirements. The weight update regularization term avoids the problem of forgetting learned knowledge during online model parameter updates, achieving knowledge retention and rapid adaptation in dynamic and non-stationary environments, thereby further improving the accuracy of the model output. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] Figure 1 A flowchart illustrating an online model parameter update method provided in this application embodiment;
[0020] Figure 2 A schematic diagram of the architecture of a mechanical drilling rate prediction model provided in an embodiment of this application;
[0021] Figure 3A flowchart illustrating another online model parameter update method provided in this application embodiment;
[0022] Figure 4 A flowchart illustrating another online model parameter update method provided in this application embodiment;
[0023] Figure 5 A flowchart illustrating another online model parameter update method provided in this application embodiment;
[0024] Figure 6 A schematic diagram of the system architecture for the online update method of execution model parameters provided in the embodiments of this application;
[0025] Figure 7 A schematic flowchart illustrating a drilling speed prediction method provided in an embodiment of this application;
[0026] Figure 8 This is a schematic diagram comparing the predicted results with the actual results provided in the embodiments of this application;
[0027] Figure 9 This is a schematic diagram of the structure of an online model parameter update device provided in an embodiment of this application;
[0028] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0029] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0031] First, let me explain the terms used in this application:
[0032] The rate of penetration (ROP) is used to characterize the efficiency of a drill bit in breaking rocks and reflects the economic and technical feasibility of drilling operations.
[0033] The specific application scenario of this application is the real-time prediction of mechanical drilling rate in oil and gas drilling operations. Specifically, during the drilling process, logging-while-drilling equipment collects data in real time, such as formation and drill bit-related data, and predicts the mechanical drilling rate based on this data.
[0034] In oil and gas exploration and development, drilling is a core component, and drilling efficiency determines exploration costs and operational safety. The rate of drilling (RBP), a key indicator of drilling efficiency, can significantly improve efficiency and reduce complex conditions and risks by adapting it to the current operating environment. Therefore, the accuracy of RBP prediction is crucial for guiding the drilling process.
[0035] In actual drilling operations, formation lithology is complex and variable, and the operating parameters of drilling equipment need to be adjusted in real time according to downhole conditions. These factors lead to highly non-stationary data during the drilling process, such as data drift and abrupt changes in formation distribution. Traditional mechanical drilling rate prediction methods are difficult to adapt to the characteristics of data in dynamically changing environments, resulting in poor accuracy of predicted mechanical drilling rates.
[0036] Specifically, traditional mechanical drilling rate prediction methods rely on physical modeling, which involves using historical logging and well logging data to construct a physical model corresponding to formation properties and mechanical drilling rate based on static mapping patterns, and then calculating the mechanical drilling rate through the physical model. Alternatively, another approach is to use machine learning techniques to learn the mapping relationship between formation properties and mechanical drilling rate, and then determine the mechanical drilling rate based on the formation properties.
[0037] However, physical modeling relies on historical, static logging and well logging data, making it difficult to adapt to dynamic formation changes, and the resulting mechanical drilling rate is hard to match actual operational scenarios. Machine learning, on the other hand, assumes a fixed data distribution, and its prediction accuracy drops significantly when data changes abruptly or drifts.
[0038] The online parameter update method provided in this application enables online learning of the mechanical drilling rate prediction model. Specifically, after drilling for a period of time using the mechanical drilling rate predicted by the machine learning model, the accuracy of the prediction results is determined. If the accuracy does not meet the requirements, the model parameters are updated online, constructing a continuously learning mechanical drilling rate prediction model. This achieves accurate representation of the mechanical drilling rate for non-stationary drilling data, thus providing a model foundation for mechanical drilling rate optimization during the drilling process. Simultaneously, during the online parameter update process, a weighted update regularization term is introduced to limit the update magnitude of the model parameters, preventing the model parameters from forgetting the learned knowledge during the update process, i.e., avoiding the problem of catastrophic forgetting. This ensures both the real-time adaptability and stability of the mechanical drilling rate prediction model, as well as knowledge retention.
[0039] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0040] Figure 1 This is a flowchart illustrating an online model parameter update method provided in an embodiment of this application. The online model parameter update method provided in this application can be executed by electronic equipment deployed on drilling tools, such as a controller deployed on the drilling tools, or by electronic equipment with corresponding processing capabilities that is communicatively connected to the drilling tools, such as a field monitoring platform. Figure 1 As shown, the method includes:
[0041] Step S101: After drilling for a preset time based on the target mechanical drilling rate, obtain the actual mechanical drilling rate.
[0042] The target mechanical drilling rate is predicted by a pre-trained mechanical drilling rate prediction model based on the streaming data collected during the drilling process in the previous cycle.
[0043] Mechanical drilling rate prediction models are prediction models based on machine learning architectures, such as recurrent neural networks, convolutional networks, graph neural networks, or Transformers.
[0044] During actual operations, flowing cytometry data is collected at preset intervals. After preprocessing, the data is input into the mechanical drilling rate prediction model, which then outputs the mechanical drilling rate. This mechanical drilling rate is then used as the target for drilling in the next cycle.
[0045] Streaming data refers to multi-dimensional drilling parameter data that is collected and continuously transmitted in real time during the drilling process, including but not limited to parameters such as drilling pressure, rotational speed, torque, pump pressure, flow rate, drill bit diameter, resistivity, and natural gamma.
[0046] Among them, drilling pressure is the vertical pressure of the drill bit on the formation; rotational speed is the rotational speed of the drill bit; torque is the torque required to overcome formation resistance when the drill string rotates; pump pressure is the pressure of the drilling fluid circulation system; flow rate is the volume of drilling fluid passing through the drill string per unit time; drill bit diameter is the outer diameter of the drill bit; resistivity is the ability of the formation rock to impede electric current; and natural gamma is the intensity of gamma rays released by the decay of naturally occurring radioactive elements in the formation.
[0047] Streaming data can be acquired by logging-while-drilling (LWD) equipment deployed on the drilling tool. For example, the LWD equipment includes a downhole drill pressure sensor to acquire drill pressure. The LWD equipment also includes a downhole rotational speed sensor to acquire rotational speed. The LWD equipment also includes a downhole torque sensor to acquire torque. The LWD equipment also includes a pressure transmitter located at the pump outlet to measure drilling fluid pressure. The LWD equipment also includes a flow meter located at the pump inlet to calculate flow rate. The LWD equipment also includes a downhole ultrasonic rangefinder or mechanical caliper to acquire drill bit diameter. The LWD equipment also includes a resistivity logging module that transmits electrical signals to the formation and receives the returned electrical signals, calculating resistivity from the transmitted and received signals. The LWD equipment also includes a natural gamma ray logging module to calculate gamma ray intensity.
[0048] For example, preprocessing streaming data can involve filtering valid streaming data based on logical rules. For instance, streaming data generated when the drill bit is moving vertically downwards can be filtered out, while streaming data generated when the drill bit is not moving vertically downwards (e.g., horizontally) can be deleted. This ensures that the model input data consists entirely of data from the drilling process, improving data quality, avoiding the introduction of noisy data, and thus improving the robustness of the model output. Then, the filtered streaming data is processed using preprocessing techniques such as 3σ outlier removal, linear regression interpolation, and sliding filter to eliminate noisy data and further improve data quality. Finally, the processed data is normalized and serialized using a sliding window to construct time-series data. This time-series data serves as the input to the mechanical drilling rate prediction model.
[0049] 3σ outlier removal is based on a normal distribution, removing data exceeding the mean ± 3 standard deviations, such as outliers caused by sudden changes in drilling pressure. Moving average filtering smooths the streaming data using a moving average or weighted moving window. Moving window serialization divides continuous streaming data into multiple fixed-length time windows; for example, 1000 time steps of streaming data are divided into 100 windows of length 10, and these 100 windows are combined to obtain the time-series data.
[0050] The target mechanical drilling rate is the mechanical drilling rate used in the current cycle, which is the mechanical drilling rate in the previous cycle. The streaming data collected in the drilling process in the previous cycle is preprocessed and then input into the pre-trained mechanical drilling rate prediction model, which outputs the mechanical drilling rate.
[0051] The preset time is a pre-set configurable parameter that can be less than the preset period.
[0052] In this step, after drilling for a preset time with the target mechanical rate of penetration as the target, the drilling tool calculates the actual mechanical rate of penetration by measuring the displacement change of the drill bit during the preset time. The displacement change of the drill bit during the preset time can be collected by sensors (such as depth gauges) installed on the drilling tool.
[0053] Step S102: Based on the streaming data from the previous cycle, generate new training samples and set the label of the new training samples as the real mechanical drilling rate.
[0054] The preset deviation threshold is a pre-set configurable parameter.
[0055] In this step, the input data from the previous cycle that was fed into the mechanical drilling rate prediction model is used as a new training sample, and the actual mechanical drilling rate is used as the label for the new training sample.
[0056] The input data to the mechanical drilling rate prediction model in the previous cycle was determined based on the flow cytometry data collected during the drilling process in the previous cycle.
[0057] Specifically, the streaming data from the previous period is acquired and preprocessed to obtain time-series data. This time-series data is then used as the new training samples.
[0058] By using new training samples, the model parameters of the mechanical drilling rate prediction model are retrained, enabling the mechanical drilling rate prediction model to learn real-time data features, thereby improving the real-time performance of the mechanical drilling rate prediction model.
[0059] Step S103: Based on the target information matrix, construct a comprehensive objective function that includes a weight update regularization term and a prediction loss term.
[0060] The target information matrix, also known as the Fisher information matrix, is used to quantify the sensitivity of a mechanical rate of drilling (MRDB) prediction model to its model parameters. Specifically, each element in the target information matrix corresponds to the importance of a specific parameter in the MRDB prediction model. The target information matrix is stored within the MRDB prediction model so that it can be directly accessed from the model when needed.
[0061] In some embodiments, the target information matrix can be a fixed matrix, that is, during the training process of the mechanical drilling rate prediction model, the information contribution of each parameter to other parameters is calculated based on the training samples used, and finally integrated into a matrix form.
[0062] In other embodiments, the target information matrix can be a recursively updated matrix. That is, during the online update of the model parameters of the mechanical drilling rate prediction model in the current cycle, the target information matrix is recursively updated based on the target information matrix used in the mechanical drilling rate prediction model of the previous cycle and based on new training samples.
[0063] For example, the target information matrix can be determined by calculating the gradient of the log-likelihood with respect to all model parameters for the training samples and / or new training samples, thus obtaining the gradient vector. The gradient vectors of the samples are then multiplied together and averaged to obtain the elements in the target information matrix.
[0064] For example, the target information matrix can be determined by calculating the gradient of the log-likelihood with respect to all model parameters for both training samples and / or new training samples, thus obtaining the gradient vector. The covariance matrix of the gradient vector is then calculated to obtain the elements of the target information matrix.
[0065] The comprehensive objective function is used to measure whether the mechanical drilling rate prediction model has been successfully retrained. By minimizing the comprehensive objective function, the model parameters of the mechanical drilling rate prediction model are optimized, so that the model performs better on the training samples and generalizes to unknown data as much as possible.
[0066] The weight update regularization term is a constraint introduced into the overall objective function. During model training, it constrains the update magnitude of relevant model parameters based on the parameter importance determined by the objective information matrix. For example, when a new task requires adjusting model parameters, the weight update regularization term limits changes to highly important model parameters. By maintaining a memory of historically learned model parameters through the weight update regularization term, the problem of catastrophic forgetting can be avoided.
[0067] Specifically, the weight update regularization term can be implemented by determining the importance of each model parameter based on the target information matrix. Then, a weighted average is applied to the sum of squared changes in each model parameter based on its importance. Finally, the weight update regularization term is determined based on the weighted average.
[0068] For example, the weight update regularization term is the product of the average of the sum of the squares of the changes in the diagonal elements of the target information matrix and the corresponding model parameters, and the regularization coefficient.
[0069] The prediction loss term is a term in the overall objective function used to measure the difference between the predicted result and the actual result. For example, the prediction loss term can be the average of the squares of the interpolations between the predicted result and the actual result.
[0070] In this step, the target information matrix is read from the mechanical drilling rate prediction model, and based on the target information matrix, the weight update regularization term is determined, such as determining the parameters in the weight update regularization term according to the target information matrix. The weight update regularization term and the prediction loss term are added together to obtain the comprehensive objective function.
[0071] By minimizing the comprehensive objective function, we can make the model's predictions as close as possible to the true values, while also ensuring that the changes in the model parameters are as small as possible.
[0072] Step S104: Using multiple training samples, including new training samples and historical training samples, the model parameters of the mechanical drilling rate prediction model are updated online based on the value of the comprehensive objective function.
[0073] The training samples are those used to update the model parameters of the mechanical drilling rate prediction model during this cycle. The training samples include both new and historical training samples. By using the new training samples, the mechanical drilling rate prediction model can learn the latest knowledge, making the model more adaptable to actual operating scenarios.
[0074] Historical training samples are the training samples used by the mechanical drilling rate prediction model during its historical training process. By using historical training samples, the mechanical drilling rate prediction model can learn new knowledge and old knowledge simultaneously when updating, maintain its memory of long-term patterns, and improve the stability of the model's output results.
[0075] Historical training samples can be determined according to a preset sampling strategy. Sampling strategies include, but are not limited to, random sampling strategies, importance sampling strategies, diversity sampling strategies, and balanced sampling strategies.
[0076] The sampling strategy employs several key elements: Random sampling, which involves uniformly and randomly selecting training samples from multiple historical training samples to maintain an unbiased distribution; Importance sampling, which uses weighted sampling based on the importance scores of historical training samples, prioritizing samples with larger prediction errors; Diversity sampling, which selects historical training samples with the greatest data differences to maximize the diversity of training samples and enhance the generalization ability of the mechanical drilling rate prediction model; and Balanced sampling, which partitions the labels of historical training samples to ensure a balanced distribution of training samples across different label intervals.
[0077] In this step, multiple training samples, including new and historical training samples, are used to iteratively update the model parameters of the mechanical drilling rate prediction model online, with the goal of minimizing the value of the comprehensive objective function.
[0078] In this step, the model parameters can be changed. Then, multiple training samples are input into the mechanical drilling rate prediction model, and the value of the comprehensive objective function is calculated based on the model's output and the changed model parameters. If the value of the comprehensive objective function meets the preset iteration termination condition, the corresponding model parameters are determined as the model parameters after online iterative updates.
[0079] The iteration termination conditions include the value of the comprehensive objective function being less than or equal to a preset threshold, the variance of the comprehensive objective function being less than or equal to a preset variance threshold after multiple iterations, or the number of iterations reaching the predicted number of iterations.
[0080] The online model parameter update method provided in this application determines the actual mechanical drilling rate (MRD) that is more suitable for the current working scenario after drilling for a period of time using the MRD prediction model based on data changes. The actual MRD allows for the evaluation of the accuracy of the MRD prediction model's output, making model parameter updates more timely. The streaming data from the previous cycle (i.e., the model input data corresponding to the target MRD) is used as new training samples to update the model parameters online, enabling the model to adapt to dynamically changing downhole working scenarios and thus improving the accuracy and real-time performance of the model output. During online parameter updates, the MRD prediction model is retrained using multiple training samples, including the new training samples. A comprehensive objective function, including a weight update regularization term and a prediction loss term, constrains the update magnitude of the model parameters until the comprehensive objective function meets the desired requirements. The weight update regularization term avoids the problem of forgetting learned knowledge during online parameter updates, achieving knowledge retention and rapid adaptation in dynamic and non-stationary environments, thereby further improving the accuracy of the model output.
[0081] Figure 2 This is a schematic diagram of the architecture of a mechanical drilling rate prediction model provided in an embodiment of this application. Figure 2 As shown, the mechanical drilling rate prediction model uses a GRU-Informer hybrid model architecture as an example. The mechanical drilling rate prediction model is a model structure that combines the GRU (Gated Recurrent Unit) module and the Informer module.
[0082] Figure 2 The mechanical drilling rate prediction model shown employs a Bayesian optimizer during training to efficiently search and iteratively optimize the model's hyperparameters, thereby obtaining a hyperparameter combination that fits the training samples and improving the training effect and generalization ability of the mechanical drilling rate model.
[0083] Specifically, the time series data obtained after preprocessing streaming data Input the mechanical drilling rate prediction model, where T is the length of the time window, t is the current time step, and x... t-T+1 To x t For each time step within the time window, d represents the streaming data, where d is the number of parameters included in the streaming data.
[0084] The mechanical drilling rate prediction model uses streaming data from time step X to x0 in the time series data X. t The data are sequentially input into the GRU module, which extracts short-term dynamic features from the time-series data. Specifically, this can be represented as:
[0085]
[0086] Among them, h t The hidden state at time step t reflects the combined effect of streaming data within a cycle.
[0087] Then, the hidden state obtained from the GRU module output is input into the Informer module of the mechanical drilling rate prediction model. Global dependencies over long time spans are modeled using a multi-head sparse self-attention mechanism. The Informer decoder generates features indicating the mechanical drilling rate in an autoregressive manner, and these features are input into a fully connected layer to obtain the target mechanical drilling rate.
[0088] Specifically, the latest GRU module output at the current time step is combined with a zero-initialization sequence of the same length and prediction range to gradually generate the mechanical drilling rate prediction result. This can be represented as:
[0089]
[0090] in, Z represents the mechanical drilling rate prediction result; Z represents the feature representation of the GRU module output after processing by the Informer module's encoder; H represents the feature representation of the output of the GRU module. current The hidden state at the current time step serves as the initial condition for the decoder in the Informer module.
[0091] By constructing a mechanical drilling rate prediction model using the GRU-Informer hybrid model architecture, the model can efficiently capture the temporal dependencies in time series data, avoid the problem of local information loss, and significantly reduce the cumulative error in long-series predictions and improve the robustness of the model by not omitting local information and grasping the temporal trend.
[0092] Figure 3 This is a flowchart illustrating another online model parameter update method provided in this embodiment. The method provided in this embodiment is... Figure 1 Based on the illustrated embodiment, step S104 has been described in detail, and a step of determining the target information matrix has been added. For example... Figure 3 As shown, the method includes:
[0093] Step S301: After drilling for a preset time based on the target mechanical drilling rate, obtain the actual mechanical drilling rate.
[0094] The target mechanical drilling rate is predicted by a pre-trained mechanical drilling rate prediction model based on the streaming data collected during the drilling process in the previous cycle.
[0095] Step S302: Based on the streaming data from the previous cycle, generate new training samples and set the label of the new training samples as the real mechanical drilling rate.
[0096] In this step, streaming data from the previous period is acquired and preprocessed to generate time-series data for the previous period. The time-series data X is used as the new training sample, and the actual mechanical drilling rate is determined as the label of the new training sample.
[0097] Step S303: Determine the information matrix of the mechanical drilling rate prediction model from the previous cycle as the initial information matrix.
[0098] In this step, the information matrix stored in the mechanical drilling rate prediction model of the previous cycle is obtained, and this information matrix is determined as the initial information matrix.
[0099] Step S304: For each model parameter of the mechanical drilling rate prediction model, calculate the expectation of the squared log-likelihood gradient of the model parameters based on the new training samples to obtain the first parameter.
[0100] In this step, training samples are obtained. This involves the model parameters for the mechanical drilling rate prediction model. Where I = 1, 2, ..., N, and N is the number of model parameters. The time-series data of the training samples and the actual mechanical drilling speeds corresponding to the labels are substituted into a preset formula to calculate the parameters of the model. The expected value of the squared log-likelihood gradient is used to obtain the model parameters. The corresponding first parameter. The larger the first parameter, the more critical the parameter is in the new training samples.
[0101] The preset formula can be expressed as:
[0102]
[0103] Where y represents the actual mechanical drilling speed; Let j represent each element in the training sample, j = 1,2,……,T; For model parameters The corresponding first parameter.
[0104] Step S305: Weight the elements corresponding to the model parameters in the initial information matrix with the first parameter, and update the elements corresponding to the model parameters in the initial information matrix with the weighted result to obtain each element in the target information matrix.
[0105] In this step, a weighted sum is calculated by using preset weighting coefficients to weight the first parameter with the corresponding elements of the model parameter in the initial information matrix. All elements corresponding to the model parameters in the initial information matrix are then updated with the weighted sum, resulting in the updated initial information matrix, which is the target information matrix.
[0106] For example, each element in the target information matrix can be represented as:
[0107]
[0108] in, The model parameters for the mechanical drilling rate prediction model in the previous cycle The corresponding first parameter is each element in the initial information matrix; γ∈(0,1) is a pre-set decay factor used to balance the historical and current first parameters.
[0109] By weighting the elements corresponding to the first parameter and the model parameters in the initial information matrix, a recursively updated information matrix is obtained, which allows the information matrix to retain historical learning knowledge while adapting to the dynamic changes in the actual operation scenario.
[0110] Step S306: Based on the target information matrix, construct a comprehensive objective function that includes a weight update regularization term and a prediction loss term.
[0111] Optionally, the weight update regularization term is determined by the sum of the products of each element in the target information matrix and the corresponding parameter deviation term. The parameter deviation term is used to characterize the deviation between the model parameter variables and the model parameters of the mechanical drilling rate prediction model in the previous period.
[0112] Specifically, the sum of the products of each element in the target information matrix and its corresponding parameter deviation term is determined as the weight update regularization term. Here, the parameter deviation term is the squared deviation of the model parameter variables from the model parameters of the previous cycle's mechanical drilling rate prediction model.
[0113] Weight update regularization term Specifically, it can be expressed as:
[0114]
[0115] in, For each element of the obtained target information matrix; These are the model parameter variables, i.e., the model parameters selected in the current iteration; These are the model parameters of the mechanical drilling rate prediction model from the previous cycle, i.e., the optimal parameters learned from the previous task. The regularization strength is a pre-set configurable parameter.
[0116] The weight update regularization term determined in the above manner increases in value when the update magnitude of more important model parameters is large. This achieves a strong correlation between the update magnitude and the regularization penalty, thereby limiting the restriction magnitude of more important model parameters.
[0117] Predicted loss item Specifically, it can be expressed as:
[0118]
[0119] in, Input the predicted value of the training sample obtained from the mechanical drilling speed prediction model into the m-th training sample; is the true value of the m-th training sample, i.e., the true mechanical drilling speed corresponding to the label; M is the number of training samples.
[0120] The overall objective function L can be expressed as:
[0121]
[0122]
[0123] Step S307: Repeat steps S3071 to S3073 until the value of the comprehensive objective function is less than or equal to the preset function value.
[0124] In this step, steps S3071-S3073 are repeated to achieve online iterative updates of the model parameters until the iteration termination condition is met. In this embodiment, the iteration termination condition is that the value of the comprehensive objective function is less than or equal to a preset function value.
[0125] In some embodiments, the iteration termination condition can be that the value of the comprehensive objective function after a preset number of consecutive iterations is less than or equal to a preset function value. That is, steps S3071-S3073 are repeated until the value of the comprehensive objective function after a preset number of consecutive iterations is less than or equal to the preset function value.
[0126] Step S3071: Input multiple training samples, including new training samples and historical training samples, into the mechanical drilling rate prediction model to obtain the predicted values of multiple training samples.
[0127] In this step, multiple training samples, including new training samples and historical training samples, are input into the mechanical drilling rate prediction model, so that the mechanical drilling rate prediction model predicts the predicted value of the corresponding training sample.
[0128] Step S3072: Calculate the value of the comprehensive objective function based on the difference between the predicted and true values of multiple training samples, and the parameter deviation terms of each model parameter.
[0129] The parameter deviation term is used to characterize the deviation between the model parameter variables and the model parameters of the mechanical drilling rate prediction model in the previous period.
[0130] The differences between the predicted and true values of multiple training samples, along with the values of the parameter bias terms of each model parameter, are substituted into the comprehensive objective function to calculate its value.
[0131] Step S3073: Update the model parameters of the mechanical drilling rate prediction model using a preset optimization algorithm to obtain the updated model parameters.
[0132] In this step, if the value of the comprehensive objective function is greater than the preset function value, the model parameters of the mechanical drilling rate prediction model are updated using a preset optimization algorithm to obtain the updated model parameters. Based on the updated mechanical drilling rate prediction model, step S3071 is executed.
[0133] If the value of the comprehensive objective function is less than or equal to the preset function value, then the online iterative update of the model parameters is completed, and the mechanical drilling rate prediction model constructed with the current model parameters is determined as the model for predicting the mechanical drilling rate in the next cycle.
[0134] The preset optimization algorithm can be stochastic gradient descent, mini-batch stochastic gradient descent, or adaptive learning rate algorithm, etc.
[0135] The accuracy and stability of the mechanical drilling rate prediction model are quantified by the value of the comprehensive objective function, which in turn guides the online iterative update of the model parameters, enabling the model to continuously learn the patterns in the drilling process. At the same time, through the set optimization algorithm, the blindness of model parameter updates is avoided, and the model parameters are gradually brought closer to the optimal parameters, thereby improving the efficiency of online iterative updates.
[0136] Figure 4 This is a flowchart illustrating another online model parameter update method provided in this application embodiment. The method provided in this embodiment is... Figure 1 and Figure 3 Based on the illustrated embodiment, a step of determining a sampling strategy and a step of dynamically switching the sampling strategy are added. For example... Figure 4 As shown, the method includes:
[0137] Step S401: After drilling for a preset time based on the target mechanical drilling rate, obtain the actual mechanical drilling rate.
[0138] The target mechanical drilling rate is predicted by a pre-trained mechanical drilling rate prediction model based on the streaming data collected during the drilling process in the previous cycle.
[0139] Step S402: Based on the streaming data from the previous cycle, generate new training samples and set the label of the new training samples as the real mechanical drilling rate.
[0140] Step S403: Based on the target information matrix, construct a comprehensive objective function that includes a weight update regularization term and a prediction loss term.
[0141] Step S404: Determine the target sampling strategy from multiple sampling strategies.
[0142] Sampling strategies include random sampling strategies, importance sampling strategies, diversity sampling strategies, and balanced sampling strategies.
[0143] In this step, the target sampling strategy can be determined from multiple sampling strategies based on the streaming data from the previous cycle.
[0144] For example, during the first online iterative update, a random sampling strategy is selected as the target sampling strategy.
[0145] In some embodiments, the sampling strategy also includes other sampling strategies. For example, when a high resistivity formation (possibly sandstone) is detected, the sampling weight of historical training samples associated with sandstone drilling rate is increased; when a natural gamma abrupt change (possibly a mudstone-sandstone interface) occurs, the sampling weight of historical training samples at the boundary is increased.
[0146] This approach models the correlation between streaming data and the importance of training samples, making the sampling strategy more aligned with real-world drilling scenarios. For example, prioritizing the playback of high-penetration-rate samples in sandstone formations accelerates the model's adaptive learning to sandstone formations; enhancing boundary sample sampling at the mudstone-sandstone interface improves the model's robustness to abrupt formation changes. Ultimately, this achieves strong coupling between sample selection and formation dynamics, further optimizing the model's predictive stability and adaptability under complex geological conditions.
[0147] Step S405: Based on the target sampling strategy, multiple historical training samples are obtained by sampling from the historical training sample set.
[0148] In this embodiment, the mechanical drilling rate prediction module further includes an experience replay buffer management module. This module is used for the mechanical engineering storage and management of historical training data used by the mechanical drilling rate prediction model during historical training and retraining. Specifically, the experience replay buffer management module stores a historical training sample set, which includes multiple historical training samples.
[0149] In this step, a target sampling strategy is used to sample multiple historical training samples from the historical training sample set.
[0150] For example, if the target sampling strategy is a random sampling strategy, then multiple historical training samples are obtained by sampling from the historical training sample set by uniformly and randomly selecting a preset number of historical training samples from the experience replay buffer management module, that is:
[0151]
[0152] Where B is the number of historical training samples.
[0153] For example, if the target sampling strategy is an importance sampling strategy, then multiple historical training samples are sampled from the historical training sample set, and the importance index of each historical training sample is calculated. The importance index can be expressed as:
[0154]
[0155] in, For historical training samples; The output of the mechanical drilling rate prediction model. The label corresponding to this historical training sample.
[0156] Normalizing the importance index, such as using the softmax function, to determine the probability of that historical training sample being sampled, can be expressed as:
[0157]
[0158] Where B is the number of historical training samples. τ is a temperature parameter used to adjust the degree of influence of importance differences. A smaller τ reinforces the preference for high-error samples, while a larger τ tends towards uniform sampling.
[0159] The importance sampling mechanism can accurately focus on the actual contribution of historical training samples to the optimization of the mechanical drilling rate prediction model. In other words, it prioritizes the selection of training samples with larger prediction errors for iterative updates. This not only strengthens the targeted learning of boundary and difficult training samples, but also effectively reduces the forgetting phenomenon of the mechanical drilling rate prediction model during continuous learning, ultimately improving the adaptability and generalization stability of the mechanical drilling rate prediction model to complex scenarios.
[0160] For example, if the target sampling strategy is a diversity sampling strategy, then multiple historical training samples are sampled from the historical training sample set. A greedy algorithm is used for iterative selection. First, a historical training sample is randomly selected. Then, historical training samples with the maximum and minimum distances to that sample are iteratively selected, guiding the selection of historical training samples to reach the required number of samples. In this way, the diversity of training samples can be maintained, avoiding overfitting.
[0161] For example, if the target sampling strategy is a balanced sampling strategy, then multiple historical training samples are obtained from the historical training sample set. The actual mechanical drilling rate corresponding to the label of each historical training sample is then partitioned, dividing the historical training samples into multiple intervals, such as K intervals. The interval bin for each historical sample can be represented as:
[0162]
[0163] in, The minimum value in the interval. The maximum value in the interval. This indicates the interval where the i-th historical training sample is located.
[0164] Then, a fixed number of historical training samples are uniformly sampled from each interval. For example, let B be the sample set for each interval. k The required number of samples is n. k ,but:
[0165]
[0166] In some embodiments, if the number of historical training samples in some intervals is insufficient, all of them are selected.
[0167] Step S406: Multiple historical training samples and new training samples are identified as the multiple training samples used in this online iterative update.
[0168] Step S407: Using multiple training samples, including new training samples and historical training samples, the model parameters of the mechanical drilling rate prediction model are updated online based on the value of the comprehensive objective function.
[0169] Step S408: Calculate the goodness of fit based on the predicted values obtained by inputting multiple training samples into the mechanical drilling rate prediction model.
[0170] Goodness of fit reflects the stability of the model's output. It can be determined based on the performance of the mechanical drilling rate prediction model over multiple consecutive tests. For example, goodness of fit... The R value can be calculated based on the prediction results of the three most recent mechanical drilling rate prediction models. 2 The change in fractions is definite and can be expressed as:
[0171]
[0172]
[0173] In this step, multiple training samples are input into the mechanical drilling rate prediction model to obtain predicted values, and the predicted values are input into the goodness-of-fit calculation formula to obtain the goodness-of-fit.
[0174] In step S409, if the goodness of fit does not meet the preset conditions, the target sampling strategy is switched and the execution of step S405 is returned. Based on the target sampling strategy, multiple historical training samples are sampled from the historical training sample set to perform online iterative updates again.
[0175] The preset condition can be that the goodness of fit is greater than or equal to the preset value.
[0176] In this step, if the goodness of fit does not meet the preset conditions (e.g., the goodness of fit is less than the preset value), it indicates a decline in the performance of the mechanical drilling rate prediction model. This suggests that the model is better at fitting new knowledge but has forgotten old knowledge, thus affecting its overall generalization ability. In this case, the target sampling strategy is changed. The changed target sampling strategy is then used to sample multiple historical training samples from the training sample set for online iterative updates. This process continues until the goodness of fit meets the preset conditions.
[0177] For example, if the goodness-of-fit Trend is less than the switching threshold, such as 0.05, the target sampling strategy can be changed to the importance sampling strategy to enhance the focus on key forgotten samples.
[0178] For example, if the imbalance ratio of the training sample sticky notes is greater than 3:1, the target sampling strategy is changed to a balanced sampling strategy to ensure that the small sample categories under the long tail distribution can still effectively participate in training.
[0179] For example, if the diversity index of the training samples does not meet the diversity condition, the target sampling strategy is changed to a diversity sampling strategy to enhance the coverage of the training samples and improve the generalization performance of the model.
[0180] By determining the target sampling strategy from multiple sampling strategies, the representativeness and utilization efficiency of historical training samples are improved under limited storage resources. At the same time, the sampling strategy is dynamically switched according to the goodness of fit, realizing the dynamic adjustment of the sampling strategy. It can adaptively handle various working conditions, such as sudden drift, gradual drift and cyclic drift, thereby improving the performance of the model.
[0181] In one possible implementation, after iteratively updating the model parameters of the mechanical drilling rate prediction model online using multiple training samples, including new and historical training samples, based on the value of the comprehensive objective function, a comprehensive score for the new training samples can be calculated. Based on the comprehensive score, it is determined whether to store the new training samples in the historical training sample set.
[0182] Specifically, the importance metric for new training samples is calculated, namely:
[0183]
[0184] Then, calculate the new training sample X. t The diversity metric can be represented by the minimum distance between a new training sample and the closest sample in the selected sample set, i.e.:
[0185]
[0186] in, As a diversity indicator; The set of training samples used; For the feature representation of the new training samples; For training samples The characteristics are represented.
[0187] Feature representation, in machine learning and data modeling, transforms input data into numerical / vector forms that the model can understand and utilize, and is determined based on the chosen model architecture.
[0188] The importance and diversity metrics of the new training samples are weighted to obtain a comprehensive score for the new training samples. This can be expressed as:
[0189]
[0190] Where α is the importance weight, which is a configurable parameter, such as 0.07.
[0191] If the overall score of the new training sample is greater than or equal to the lowest overall score in the historical training sample set, the new training sample will be stored in the historical training sample set, and the historical training sample corresponding to the lowest overall score will be deleted.
[0192] This approach ensures the validity of training samples in the historical training sample set while preventing the unlimited expansion of the historical training sample set.
[0193] In one possible implementation, Figure 5 This is a flowchart illustrating another online model parameter update method provided in an embodiment of this application. Figure 5 As shown, after the first training of the mechanical drilling rate prediction model is completed, the parameters of the mechanical drilling rate prediction model can be initialized, and the target information matrix, the parameter weight vector, and the regularization intensity can be set.
[0194] Based on the streaming data from the previous cycle, new training samples are generated, and the labels for the new training samples are set to the actual mechanical drilling rate.
[0195] The new training samples are input into the mechanical drilling rate prediction model, which performs standard forward propagation to obtain the prediction results.
[0196] For each training sample, calculate the parameter gradient and update the target information matrix using a moving average method.
[0197] Based on the updated target information matrix, the parameter weight vector is dynamically adjusted, for example, by using the diagonal elements of the target information matrix as the elements of the parameter weight vector. The larger the element value in the parameter weight vector, the higher the importance of the corresponding parameter.
[0198] Based on the parameter weight vector, a comprehensive objective function is constructed, which includes a weight update regularization term and a prediction loss term.
[0199] Using multiple training samples, including new and historical training samples, the model parameters of the mechanical drilling rate prediction model are updated online based on the value of the comprehensive objective function.
[0200] Figure 6 This is a schematic diagram of the system architecture for the online update method of the execution model parameters provided in an embodiment of this application. Figure 6 As shown, the system includes a multi-strategy replay sampling module, an experience replay buffer management module, an online elastic weight module, a strategy switching module, and an online learning module.
[0201] After drilling for a preset time based on the target mechanical drilling rate, the actual mechanical drilling rate is acquired. Based on the streaming data from the previous cycle, new training samples are generated, and the labels for the new training samples are set to the actual mechanical drilling rate. The new training samples are then cached in the experience replay buffer management module.
[0202] Then, the multi-strategy replay sampling module determines the target sampling strategy from multiple sampling strategies, and based on the target sampling strategy, samples multiple historical training samples from the historical training sample set. These multiple historical training samples and the new training samples constitute the training samples for this model parameter update.
[0203] Simultaneously, the target information matrix is updated online through the online elastic weighting module, using the information matrix of the mechanical drilling rate prediction model from the previous cycle as the initial information matrix. For each model parameter of the mechanical drilling rate prediction model, the expected value of the squared log-likelihood gradient of the model parameters is calculated based on the new training samples to obtain the first parameter. The first parameter is then weighted with the corresponding elements of the model parameters in the initial information matrix, and the corresponding elements of the model parameters in the initial information matrix are updated with the weighted result to obtain the elements in the target information matrix. Based on the target information matrix, a comprehensive objective function including a weight update regularization term and a prediction loss term is constructed.
[0204] The online learning module uses training samples to iteratively update the model parameters of the mechanical drilling rate prediction model online based on the value of the comprehensive objective function.
[0205] Furthermore, after iteratively updating the model parameters of the mechanical drilling rate prediction model online, the goodness of fit is calculated based on the predicted values obtained by inputting multiple training samples into the mechanical drilling rate prediction model. If the goodness of fit does not meet the preset conditions, the strategy switching module switches the target sampling strategy and returns to the step of sampling multiple historical training samples from the historical training sample set based on the target sampling strategy, so as to perform online iterative updates again.
[0206] Figure 7 This is a flowchart illustrating a drilling speed prediction method provided in an embodiment of this application. Figure 8 As shown, the method includes:
[0207] Step S701: Obtain the flow cytometry data of the drilling process in the current cycle according to the set cycle.
[0208] The set period is a preset configurable parameter.
[0209] In this step, according to a set cycle, streaming data of the drilling process during the current cycle is acquired from the logging-while-drilling equipment deployed on the drilling tool. Streaming data includes, but is not limited to, parameters such as drilling pressure, rotational speed, torque, pump pressure, flow rate, drill bit diameter, resistivity, and natural gamma.
[0210] Step S702: Preprocess the streaming data to generate time series data for the current period.
[0211] In this step, valid streaming data is filtered from the streaming data based on logical rules. For example, streaming data generated when the drill bit is moving vertically downwards is filtered out, while streaming data generated when the drill bit is not moving vertically downwards (such as horizontally) is deleted. This method ensures that the model input data consists entirely of data from the drilling process, improving data quality, avoiding the introduction of noisy data, and thus improving the robustness of the model output results. Then, the filtered streaming data is preprocessed using methods such as 3σ outlier removal, linear regression interpolation, and sliding filter to remove noisy data and further improve data quality. Finally, the processed data is normalized and serialized using a sliding window to construct time-series data. This time-series data serves as the input to the mechanical drilling rate prediction model.
[0212] For example, time series data can be represented as Where the length of the time window is T, d is the number of parameters included in the streaming data, and t is the current time point.
[0213] Step S703: Input the time series data of the current cycle into the mechanical drilling rate prediction model to obtain the target mechanical drilling rate.
[0214] The model parameters of the mechanical drilling rate prediction model are obtained by online iterative updating based on the online model parameter update method provided in the above embodiments.
[0215] In this step, the obtained time-series data is input into the mechanical drilling rate prediction model, which predicts the target mechanical drilling rate based on the model architecture. The target mechanical drilling rate then guides the drilling process of the drilling tools in the next cycle.
[0216] For example, continue to refer to Figure 2 It can convert time series data Input the mechanical drilling rate prediction model, and the mechanical drilling rate prediction model outputs the target mechanical drilling rate. .
[0217] By using a mechanical drilling rate prediction model that updates model parameters online, the mechanical drilling rate can be predicted, making the prediction results more accurate and adaptable to dynamically changing operating scenarios.
[0218] Figure 8 This diagram illustrates the comparison between the predicted results and the actual results provided in the embodiments of this application. Figure 8 As shown, the mechanical drilling rate obtained according to the method provided in this application (see...) Figure 8 (dashed line in the image) and the actual mechanical drilling rate (see...) Figure 8 The results are basically consistent with the solid lines in the diagram, indicating that the accuracy of the obtained mechanical drilling speed is relatively high.
[0219] This application also provides a continuous learning prediction system. This continuous learning prediction system can be deployed on a field monitoring platform, supports GPU acceleration and lightweight inference to meet low-latency prediction requirements.
[0220] The continuous learning prediction system includes a data governance module, a continuous learning module, and a prediction output module.
[0221] The data governance module receives and stores streaming data, and preprocesses it, such as extracting key information through outlier removal, regression interpolation, and sliding filtering, filtering out downhole noise data, and improving the density and quality of the data samples. The continuous learning module executes the online update method for model parameters provided in the above embodiments. The prediction output module inputs the preprocessed streaming data from the data governance module into the mechanical drilling rate prediction model to obtain the real-time predicted value of the mechanical drilling rate, i.e., the target mechanical drilling rate.
[0222] Figure 9 This is a schematic diagram of a model parameter online update device provided in an embodiment of this application. Figure 9 As shown, the online model parameter update device provided in this embodiment includes a true value acquisition module 901, a new training sample generation module 902, a comprehensive objective function determination module 903, and an online iterative update module 904.
[0223] The real value acquisition module 901 is used to acquire the real mechanical drilling rate after a preset drilling time based on the target mechanical drilling rate; wherein, the target mechanical drilling rate is predicted by a pre-trained mechanical drilling rate prediction model based on the streaming data collected during the drilling process in the previous cycle; the new training sample generation module 902 is used to generate new training samples based on the streaming data of the previous cycle and set the label of the new training samples as the real mechanical drilling rate; the comprehensive objective function determination module 903 is used to construct a comprehensive objective function including a weight update regularization term and a prediction loss term based on the target information matrix; the online iterative update module 904 is used to perform online iterative updates of the model parameters of the mechanical drilling rate prediction model based on the value of the comprehensive objective function using multiple training samples including new training samples and historical training samples.
[0224] Optional, online iterative update module 904, specifically used for:
[0225] Repeat the following steps until the value of the comprehensive objective function is less than or equal to the preset function value: Input multiple training samples, including new training samples and historical training samples, into the mechanical drilling rate prediction model to obtain the predicted values of multiple training samples; Calculate the value of the comprehensive objective function based on the difference between the predicted values and the true values of multiple training samples, as well as the parameter deviation term of each model parameter; The parameter deviation term is used to characterize the deviation of the model parameter variables from the model parameters of the mechanical drilling rate prediction model in the previous period; Update the model parameters of the mechanical drilling rate prediction model using a preset optimization algorithm to obtain the updated model parameters.
[0226] Optionally, the online model parameter update device further includes a target information matrix determination module, which is used for:
[0227] The information matrix of the mechanical drilling rate prediction model from the previous cycle is determined as the initial information matrix. For each model parameter of the mechanical drilling rate prediction model, the expected value of the squared log-likelihood gradient of the model parameter is calculated based on the new training samples to obtain the first parameter. The first parameter is weighted with the corresponding elements of the model parameter in the initial information matrix, and the corresponding elements of the model parameter in the initial information matrix are updated with the weighted result to obtain each element in the target information matrix.
[0228] Optionally, the weight update regularization term is determined by the sum of the products of each element in the target information matrix and the corresponding parameter deviation term. The parameter deviation term is used to characterize the deviation between the model parameter variables and the model parameters of the mechanical drilling rate prediction model in the previous period.
[0229] Optionally, the online model parameter update device further includes a sampling strategy determination module, which is used for:
[0230] The target sampling strategy is determined from multiple sampling strategies; based on the target sampling strategy, multiple historical training samples are obtained by sampling from the historical training sample set; the multiple historical training samples and the new training samples are determined as the multiple training samples used in this online iterative update.
[0231] Optional, online iterative update module 904, specifically used for:
[0232] Using multiple training samples, including new and historical training samples, the model parameters of the mechanical drilling rate prediction model are updated online based on the value of the comprehensive objective function. The goodness of fit is calculated based on the predicted values obtained by inputting multiple training samples into the mechanical drilling rate prediction model. If the goodness of fit does not meet the preset conditions, the target sampling strategy is switched, and the process returns to the step of sampling multiple historical training samples from the historical training sample set based on the target sampling strategy for another online iterative update.
[0233] The online model parameter update device provided in this embodiment can execute the online model parameter update method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0234] This application also provides a drilling speed prediction device, which includes a data acquisition module, a data processing module, and a model prediction module.
[0235] The data acquisition module is used to acquire streaming data during the drilling process of the current cycle according to a set cycle; the data processing module is used to preprocess the streaming data to generate time series data for the current cycle; the model prediction module is used to input the time series data of the current cycle into the mechanical drilling rate prediction model to obtain the target mechanical drilling rate; wherein, the model parameters of the mechanical drilling rate prediction model are obtained by online iterative update based on the method provided in the first aspect above.
[0236] The drilling speed prediction device provided in this embodiment can execute the drilling speed prediction method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0237] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 10 As shown, the electronic device provided in this embodiment includes at least one processor 1001 and a memory 1002. Optionally, the electronic device further includes a communication component. The processor 1001, memory 1002, and communication component are connected via a bus.
[0238] In a specific implementation, at least one processor 1001 executes computer execution instructions stored in memory 1002, causing at least one processor 1001 to perform the above-described method.
[0239] The specific implementation process of processor 1001 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0240] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0241] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0242] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0243] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0244] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0245] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0246] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0247] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0248] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0249] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0250] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0251] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0252] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for online updating model parameters, characterized in that, include: After drilling for a preset time based on the target mechanical drilling rate, the actual mechanical drilling rate is obtained; wherein, the target mechanical drilling rate is predicted by a pre-trained mechanical drilling rate prediction model based on the streaming data collected during the drilling process in the previous cycle; Based on the streaming data from the previous cycle, new training samples are generated, and the labels for the new training samples are set to the actual mechanical drilling rate. Based on the target information matrix, a comprehensive objective function is constructed, including a weight update regularization term and a prediction loss term. From multiple sampling strategies, including random sampling, importance sampling, diversity sampling, and balanced sampling, a target sampling strategy is determined based on the streaming data of the previous period. Specifically, when a high resistivity formation is detected based on the streaming data of the previous period, the sampling weight of historical training samples related to sandstone drilling rate is increased; when a natural gamma change is detected, the sampling weight of boundary historical training samples related to mudstone-sandstone interface is increased. Based on the target sampling strategy, multiple historical training samples are sampled from the historical training sample set, and the multiple historical training samples and the new training samples are determined as the multiple training samples used in this online iterative update. Using multiple training samples, including the new training samples and historical training samples, the model parameters of the mechanical drilling rate prediction model are updated online based on the value of the comprehensive objective function; The goodness of fit is calculated based on the predicted values obtained by inputting multiple training samples into the online iteratively updated mechanical drilling rate prediction model, and the changes in the R² scores of the prediction results of the most recent three mechanical drilling rate prediction models. If the goodness of fit does not meet the preset conditions, the target sampling strategy is switched, and the process returns to the step of sampling multiple historical training samples from the historical training sample set based on the target sampling strategy, so as to perform online iterative updates again until the goodness of fit meets the preset conditions.
2. The method according to claim 1, characterized in that, The step of using multiple training samples, including the new training samples and historical training samples, to iteratively update the model parameters of the mechanical drilling rate prediction model online based on the value of the comprehensive objective function includes: Repeat the following steps until the value of the comprehensive objective function is less than or equal to the preset function value: Multiple training samples, including the new training samples and historical training samples, are input into the mechanical drilling rate prediction model to obtain the predicted values of the multiple training samples. The value of the comprehensive objective function is calculated based on the difference between the predicted and actual values of multiple training samples, and the parameter deviation terms of each model parameter; the parameter deviation terms are used to characterize the deviation between the model parameter variables and the model parameters of the mechanical drilling rate prediction model of the previous period. The model parameters of the mechanical drilling rate prediction model are updated using a preset optimization algorithm to obtain the updated model parameters.
3. The method according to claim 1, characterized in that, Before constructing a comprehensive objective function including a weight update regularization term and a prediction loss term based on the target information matrix, the method further includes: The information matrix of the mechanical drilling rate prediction model of the previous cycle is determined as the initial information matrix; For each model parameter of the mechanical drilling rate prediction model, based on the new training samples, the expected value of the squared log-likelihood gradient of the model parameters is calculated to obtain the first parameter; The first parameter is weighted with the elements corresponding to the model parameters in the initial information matrix, and the elements corresponding to the model parameters in the initial information matrix are updated with the weighted result to obtain each element in the target information matrix.
4. The method according to claim 3, characterized in that, The weight update regularization term is determined based on the sum of the products of each element in the target information matrix and the corresponding parameter deviation term. The parameter deviation term is used to characterize the deviation between the model parameter variables and the model parameters of the mechanical drilling rate prediction model in the previous period.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: Based on the prediction error of the mechanical drilling rate prediction model for the new training samples, the importance index of the new training samples is calculated. The diversity index of the new training sample is calculated based on the minimum distance between the feature representation of the new training sample and the feature representation of the most similar sample in the selected sample set. The importance index and the diversity index are weighted to obtain the comprehensive score of the new training sample; If the overall score of the new training sample is greater than or equal to the lowest overall score in the historical training sample set, then the new training sample is stored in the historical training sample set, and the historical training sample corresponding to the lowest overall score is deleted.
6. The method according to any one of claims 1-4, characterized in that, The switching of the target sampling strategy includes at least one of the following: If the goodness of fit is less than the switching threshold, then the target sampling strategy is switched to the importance sampling strategy; If the imbalance ratio of the label distribution of multiple training samples is greater than 3:1, then the target sampling strategy is switched to the balanced sampling strategy. If the diversity index of multiple training samples does not meet the diversity condition, the target sampling strategy will be switched to the diversity sampling strategy.
7. A method for predicting drilling speed, characterized in that, include: According to the set cycle, acquire the flow cytometry data of the drilling process in the current cycle; The streaming data is preprocessed to generate time-series data for the current period; Input the time series data of the current period into the mechanical drilling rate prediction model to obtain the target mechanical drilling rate; The model parameters of the mechanical drilling rate prediction model are obtained by online iterative updating based on the method provided in any one of claims 1-6.
8. A device for online updating model parameters, characterized in that, include: The real value acquisition module is used to acquire the real mechanical drilling rate after drilling for a preset time based on the target mechanical drilling rate; wherein, the target mechanical drilling rate is predicted by a pre-trained mechanical drilling rate prediction model based on the streaming data collected in the drilling process of the previous cycle; The new training sample generation module is used to generate new training samples based on the streaming data of the previous cycle, and to set the label of the new training samples as the actual mechanical drilling rate. The comprehensive objective function determination module is used to construct a comprehensive objective function, including a weight update regularization term and a prediction loss term, based on the objective information matrix. A sampling strategy determination module is used to determine a target sampling strategy based on the streaming data of the previous period from multiple sampling strategies, including random sampling strategy, importance sampling strategy, diversity sampling strategy, and balanced sampling strategy; wherein, when a high resistivity formation is detected based on the streaming data of the previous period, the sampling weight of historical training samples related to sandstone drilling rate is enhanced; when a natural gamma change is detected, the sampling weight of boundary historical training samples related to mudstone-sandstone interface is enhanced. Based on the target sampling strategy, multiple historical training samples are sampled from the historical training sample set, and the multiple historical training samples and the new training samples are determined as the multiple training samples used in this online iterative update. An online iterative update module is used to perform online iterative updates on the model parameters of the mechanical drilling rate prediction model based on the value of the comprehensive objective function using multiple training samples, including the new training samples and historical training samples. The goodness-of-fit calculation module is used to calculate the goodness-of-fit based on the changes in the R² score of the prediction results of the mechanical drilling rate prediction model in the most recent three iterations, based on the predicted values obtained by inputting multiple training samples into the online iteratively updated mechanical drilling rate prediction model. If the goodness of fit does not meet the preset conditions, the target sampling strategy is switched, and the process returns to the step of sampling multiple historical training samples from the historical training sample set based on the target sampling strategy, so as to perform online iterative updates again until the goodness of fit meets the preset conditions.
9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.