Trust factor-based time step calibration method for Tranformer prediction model of yield of refractured well
By introducing trust factor and sliding window methods into the Transformer prediction model, the model output is calibrated in real time, which solves the problem that the initial output is largely deviated from the real value when Transformer predicts the output of repeated fracturing oil wells, and improves the training efficiency and prediction accuracy of the model.
Patent Information
- Application Number
- CN202411732152.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-04
AI Technical Summary
When using Transformer to predict the output of repeated fracturing oil wells, the initial prediction output based solely on the sliding window method often has a large deviation from the real value, which makes it difficult to form a round of training and takes a long time to repeatedly train.
The time-step calibration method of the repeat fracturing well yield Transformer prediction model based on trust factor is adopted. Through the combination of sliding window method and real-time calibration mechanism, the model output is calibrated in real-time to reduce the deviation between the initial prediction and the real-time output.
It effectively reduces the deviation between the initial prediction and the real output, improves the training efficiency of the model, reduces unnecessary computing power investment, reduces costs, and improves efficiency.
Smart Images

Figure CN119558193A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of reservoir production enhancement and transformation, and in particular to a time-step calibration method for a Transformer prediction model of a re-fracturing well production based on a trust factor. Background Art
[0002] At present, the real-time calibration methods of deep learning model output results include temperature scaling, Bayesian calibration, post-processing calibration and online learning. Temperature scaling adjusts the "temperature" parameter of the output probability, which can smooth the model's prediction distribution and thus improve the prediction reliability; Bayesian calibration updates the model output based on prior knowledge and real-time data, and can provide more accurate predictions under high uncertainty conditions; post-processing calibration processes the model output through linear regression or other regression models, mapping it to the true value space to reduce prediction errors; online learning updates the model parameters in real time when new data arrives, adapting it to the new data distribution and continuously improving the accuracy of the model.
[0003] In the process of using Transformer to predict the production of re-fractured oil wells, the initial output based solely on the sliding window method often has a large deviation from the true value, which makes it difficult to form a round of training and requires a long time to train repeatedly. In order to solve this problem, it is necessary to calibrate the model output in real time during the training process, correct the wrong fitting direction of the model in time, and achieve the fastest and best model training with the least computing power consumption. Summary of the invention
[0004] In view of the above problems, the present invention provides a time-step calibration method for the Transformer prediction model of re-fracturing well production based on trust factors. By combining the sliding window method and the real-time calibration mechanism, the deviation between the initial prediction and the actual production can be effectively reduced, the training efficiency of the model can be improved, unnecessary computing power investment can be reduced, and costs can be reduced and efficiency can be increased.
[0005] The present invention adopts the following technical solutions:
[0006] A time-step calibration method for a Transformer prediction model of a re-fracturing well production based on a trust factor comprises the following steps:
[0007] Step 1: Data preparation and token input;
[0008] Step 2: Tokens embedding and position embedding;
[0009] Step 3: Select the sliding window size;
[0010] Step 4: Initial prediction value calibration;
[0011] Step 5: Repeat the calibration until the accuracy meets the expectations.
[0012] Furthermore, the step 1 specifically includes the following sub-steps:
[0013] Step 101: Data Collection and Preparation:
[0014] Collect historical production data of oil well re-fracturing, and clean and pre-process the raw data.
[0015] Step 102: Tokens input:
[0016] The processed data is converted into Tokens, denoted as X = {x1, x2, ..., x T}, where T is the time step, x t is the observed output at time t.
[0017] Furthermore, the step 2 specifically includes the following sub-steps:
[0018] Step 201: Tokens embedding:
[0019] Using the embedding matrix W e Convert Tokens to embedding vectors:
[0020] E(x t )=W e x t (1)
[0021] In formula (1), E(x t ) represents the embedding vector.
[0022] Step 202: Position Embedding:
[0023] Add position embedding to each Tokens to capture the position information of the time series:
[0024]
[0025] In formula (2), PE(t) represents the position embedding; i is the embedding dimension index; and d is the embedding dimension.
[0026] Furthermore, the step 3 specifically includes the following sub-steps:
[0027] Step 301: Define the sliding window:
[0028] In each prediction, the production of the previous N observations is used to predict the production of the observation point, and the sliding window method is used to construct features and labels from the observed time series:
[0029] X window ={Xt-N+1 ,X t-N+2 ,...,X t} (3)
[0030] In formula (3), X window Represents the data within the window;.
[0031] Step 302: Select the optimal sliding window size:
[0032] The present invention combines the actual size of the data set and takes S=7, 8, 9, 10, 11, and 12 for comparison.
[0033] Furthermore, the step 4 specifically includes the following sub-steps:
[0034] Step 401: Initial prediction:
[0035] Based on the optimal window size, the Transformer architecture encoder is used to generate initial predictions
[0036]
[0037] In formula (4), f represents the prediction function, which is the Transformer architecture encoder in the present invention.
[0038] Step 402: Initial calibration based on trust factor:
[0039]
[0040] In formula (5), α is the trust factor, which represents the degree of trust in the predicted result and the true value; represents the calibration of the initial prediction value.
[0041] Furthermore, the step 5 specifically includes the following sub-steps:
[0042] Step 501: Update window data:
[0043] Combine the calibrated value of the Nth observation with the values of the previous N-1 observations to predict the next point:
[0044]
[0045] Step 502: Repeat the calibration until the accuracy meets the expectation:
[0046] Iterate steps 4 and 5 until the error of the predicted value ξ Meet the expected accuracy:
[0047]
[0048] In formula (7), the error threshold ξ is set threshold , when ξ<ξ threshold The introduction of the trust factor not only optimizes the model during the training process, but also gradually accumulates calibration experience, thereby improving the overall prediction accuracy.
[0049] The beneficial effects of the present invention are:
[0050] By combining the sliding window method and the real-time calibration mechanism, the deviation between the initial prediction and the actual output can be effectively reduced, the training efficiency of the model can be improved, unnecessary computing power investment can be reduced, and costs can be reduced and efficiency can be increased. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present invention, but are not intended to limit the present invention.
[0052] Figure 1 It is the technical roadmap of the present invention;
[0053] Figure 2 Comparison of different sliding window prediction performance evaluation indicators;
[0054] Figure 3 This is the situation where the predicted value before calibration deviates from the true value;
[0055] Figure 4 This is the situation where the predicted value after calibration deviates from the true value;
[0056] Figure 5 For the overall prediction effect. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] like Figures 1 to 5 As shown, the present invention provides a technical solution: a time-step calibration method for a Transformer prediction model of a re-fracturing well production based on a trust factor, comprising the following steps:
[0059] Step 1: Data preparation and token input, including the following steps:
[0060] (1) Data collection and preparation. The data collected from the production statistics system of the oil production plant is the 8337 well in the W block (pseudonym) of Xinjiang Oilfield. The collected basic data set is shown in Table 1:
[0061]
[0062] Table 1 Basic data set
[0063] (2) Tokens input, the production data is converted into multiple time series subsequences of length 7, in the form of sliding windows, and the production of the previous 7 months is used to predict the production of the next month. The converted data is as follows
[0064] As shown in Table 2:
[0065]
[0066] Table 2 Production sequence data of well 8337 in block W
[0067] Step 2: Tokens embedding and position embedding, including the following steps:
[0068] (1) Tokens embedding;
[0069] (2) Position embedding.
[0070] Step 3: Select the sliding window size, including the following steps:
[0071] (1) Define the sliding window and define the sliding window size in the form of Table 2;
[0072] (2) Select the optimal sliding window size. Set the sliding window size to 7, 8, 9, 10, 11, and 12 to compare the prediction errors. The comparison of prediction performance evaluation indicators of different sliding windows is as follows: Figure 2 As shown, the optimal window size is 9.
[0073] Step 4: Initial prediction value calibration, including the following steps:
[0074] (1) Initial prediction;
[0075] (2) Initial calibration based on trust factor.
[0076] Step 5: Repeat the calibration until the accuracy meets the expectations, including the following steps:
[0077] (1) Update window data;
[0078] (2) Repeat the calibration until the accuracy meets the expectation. The deviation of the predicted value from the true value before calibration is as follows: Figure 3 As shown in the figure, the deviation of the predicted value from the true value after calibration is as follows Figure 4 As shown in Figure 5 shown.
[0079] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A time-step calibration method for a Transformer prediction model of re-fracturing well production based on a trust factor, characterized in that: The following steps are involved: Step 1: Data preparation and token input; Step 2: Tokens embedding and position embedding; Step 3: Select the sliding window size; Step 4: Initial prediction value calibration; Step 5: Repeat the calibration until the accuracy meets the expected level.
2. The time-step calibration method of the Transformer prediction model for re-fracturing well production based on trust factor according to claim 1 is characterized in that: The step 1 specifically includes the following sub-steps: Step 101: Data collection and preparation; Step 102: Tokens input.
3. The time-step calibration method of the Transformer prediction model for re-fracturing well production based on trust factor according to claim 1 is characterized in that: The step 2 specifically includes the following sub-steps: Step 201: Tokens embedding; Step 202: Position embedding.
4. The method for time-step calibration of the Transformer prediction model for re-fracturing well production based on trust factor according to claim 1, characterized in that: The step 3 specifically includes the following sub-steps: Step 301: define a sliding window; Step 302: Select an optimal sliding window size.
5. The method for time-step calibration of the Transformer prediction model for re-fracturing well production based on trust factor according to claim 1, characterized in that: The step 4 specifically includes the following sub-steps: Step 401: initial prediction; Step 402: Initial calibration based on trust factor.
6. The method for time-step calibration of the Transformer prediction model for re-fracturing well production based on trust factor according to claim 1, characterized in that: The step 5 specifically includes the following sub-steps: Step 501: Update window data; Step 502: Repeat the calibration until the accuracy meets expectations.