A repeated fracturing oil well production transformer prediction method based on dynamic chunking
By optimizing the block processing of the Transformer model through the dynamic Chunking method, the problem of insufficient flexibility in the prediction of repeated fracturing production in oil wells is solved, the prediction accuracy and computational efficiency are improved, and the adaptability to new data is enhanced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2026-03-31
AI Technical Summary
Existing Transformer models cannot flexibly adapt to different ranges of information richness in predicting production from repeated fracturing of oil wells, resulting in insufficient prediction accuracy and high computational cost.
The dynamic chunking method is adopted to generate the optimal boundary by dynamically adjusting the size and number of blocks and combining the joint probability of cohesion and interval decoupling. This optimizes the block processing of the Transformer model, improves prediction accuracy and reduces computational cost.
It improves prediction accuracy, reduces computational costs, enhances model adaptability and generalization ability to new data, and improves global prediction accuracy in regular or irregular periodic calculations.
Smart Images

Figure CN119962745B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of reservoir production enhancement technology, specifically to a Transformer method for predicting the production of repeatedly fractured oil wells based on dynamic chunking. Background Technology
[0002] Time series analysis studies observations collected over fixed time intervals that are correlated with each other. In recent years, inspired by the great success of Transformer in fields such as computer vision and natural language processing, several Transformer variants specifically for time series forecasting have been proposed, and time series Transformer models for predicting the production of repeated fracturing in oil wells have been developed.
[0003] For time series prediction, the Transformer architecture can process all time points in the input sequence in parallel. It is not dependent on a fixed-length input, can extract global features from the input sequence, and can adapt to more complex prediction tasks by adding multi-head attention layers and stacking multiple encoder layers. These characteristics give the Transformer a significant advantage over traditional RNN models.
[0004] Since the attention module in the classic Transformer architecture is defined within a local scope, the time series needs to be pre-divided into different scopes before entering the attention domain; that is, a chunking scheme needs to be determined. A simple solution is to use a fixed chunking scheme, where all scopes have a fixed size. However, this rigid chunking cannot adapt to information-rich scopes of varying sizes. To further enhance flexibility, the model should be able to dynamically determine the scope chunking scheme, allowing for any number and size of scopes, achieving fully automated chunking processing. Summary of the Invention
[0005] To address the aforementioned problems, this invention provides a Transformer-based method for predicting production in repeatedly fractured oil wells based on dynamic chunking. This method offers linear computational complexity, maintains flexibility in regular or irregular periodic calculations, improves prediction accuracy while reducing computational costs, and makes the system easier to deploy and maintain.
[0006] The present invention adopts the following technical solution:
[0007] A Transformer-based method for predicting production in repeatedly fractured oil wells based on dynamic chunking includes the following steps:
[0008] Step 1: Data collection and definition of dynamic chunking;
[0009] Step 2: Establish the joint probability of cohesion and spacing decoupling;
[0010] Step 3: Generate dynamic boundaries and determine the cohesion and spacing decoupling of dynamic intervals;
[0011] Step 4: Calculate the optimal boundary and complete the dynamic optimal chunking;
[0012] Step 5: Transformer prediction of well re-fracture production based on optimal Chunking.
[0013] Furthermore, step 1 specifically includes the following sub-steps:
[0014] Step 101: Data Collection and Preparation. Collect production data from oil wells after repeated fracturing from the oil production plant, and clean and preprocess the raw data;
[0015] Step 102: Define dynamic Chunking.
[0016] Time series Through the boundary ( and ) is divided into ranges ,in .
[0017] Furthermore, step 2 specifically includes the following sub-steps:
[0018] Step 201: Define cohesion and spacing decoupling;
[0019] Meaningful units in a time series (such as a season or period) typically exhibit self-cohesion while remaining independent of other units. Let... Representing the cohesion of the interval, let Spacing decoupling represents the boundary (split decoupling characterizes coupling). A good partitioning scheme should have high cohesion and low coupling.
[0020] Step 202: Establish the joint probability of cohesion and spacing decoupling.
[0021] definition and joint probability for:
[0022] (1)
[0023] In equation (1), It generates cohesive regions. The probability of; yes The probability of a decoupling boundary at a given interval; in particular: .
[0024] Furthermore, step 3 specifically includes the following sub-steps:
[0025] Step 301: Generate dynamic boundaries;
[0026] As shown in formula (1), given the initial boundary It will be based on probability Generate the next boundary This probability follows Truncated Poisson priors:
[0027] (2)
[0028] In equation (2), ; It is the cut-off length; It is the truncated normalization factor. Parameter It is a length penalty factor, and a larger one is... Rewards over a longer period, with smaller amounts The reward period is relatively short.
[0029] Step 302: Determine the cohesion of the dynamic interval;
[0030] The cohesion of an interval can be assessed by measuring whether a randomly selected element within that interval pays attention to elements within the same interval. The probability of this process is expressed as:
[0031] (3)
[0032] In equation (3), ,in It is the global attention matrix over the entire time series.
[0033] Step 303: Determine the interval decoupling;
[0034] By measuring the degree to which two adjacent intervals do not concern each other (i.e., intervals) Is it correct? (With less attention paid), the interval decoupling of the interval can be evaluated, and the probability of this process is expressed as:
[0035] (4)
[0036] In equation (4), Represents the non-attention matrix .
[0037] Furthermore, step 4 specifically includes the following sub-steps:
[0038] Step 401: Calculate the optimal boundary;
[0039] A good segmentation scheme should possess high cohesion and low coupling. According to the interval generation model, finding the optimal segmentation scheme is equivalent to finding the boundary that maximizes the joint probability. :
[0040] (5)
[0041] Step 402: Complete dynamic chunking;
[0042] Assumption At a specific boundary On the cutoff strategy, Therefore, formula (5) follows Bertsekas's optimality principle and has the following suboptimal structure:
[0043] (6)
[0044] The constraint condition of formula (6) is given. .
[0045] Furthermore, step 5 specifically includes the following sub-steps:
[0046] Step 501: Initialize the Transformer encoder module;
[0047] Initialization parameters include the number of encoder and decoder layers, the number of multi-head self-attention mechanisms, and the dimension of hidden units.
[0048] Step 502: Input the optimal Chunking time series;
[0049] Step 503: Model training, evaluation, and optimization;
[0050] The model is trained using the partitioned training set data, evaluated on the validation and test sets, and optimized based on the evaluation results, adjusting parameters such as model structure and learning rate.
[0051] Step 504: On-site deployment.
[0052] The trained Transformer model is deployed to the production environment to provide production prediction services for repeated fracturing of oil wells.
[0053] The beneficial effects of this invention are: the introduction of a dynamic chunking mechanism allows the model to automatically adjust the size and number of chunks based on data characteristics, thereby accurately capturing key information and improving the accuracy and reliability of predictions. Furthermore, dynamic chunking makes the model more efficient when processing large-scale datasets, while enhancing its generalization ability to new and unseen data and its robustness to outlier data. This adaptive chunking strategy also optimizes the model's ability to learn long-term dependencies, improves global prediction accuracy, and provides strong technical support for predicting production from repeated fracturing in oil wells. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments will be briefly described below. Obviously, the drawings described below only relate to some embodiments of the present invention and are not intended to limit the present invention.
[0055] Figure 1 This is a technical roadmap for the present invention;
[0056] Figure 2 A schematic diagram of the dynamic chunking operation logic;
[0057] Figure 3 This refers to the situation where the predicted value deviates from the true value before dynamic chunking;
[0058] Figure 4 This refers to the situation where the predicted value deviates from the true value after dynamic chunking;
[0059] Figure 5 For the overall prediction effect. Detailed Implementation
[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] like Figures 1 to 5 As shown, this invention provides a technical solution: a Transformer-based method for predicting the production of repeatedly fractured oil wells based on dynamic chunking, comprising the following steps:
[0062] Step 1: Data collection and definition of dynamic chunking, specifically including the following steps:
[0063] (1) Data Collection and Preparation. Production data after repeated fracturing of oil wells were collected from the oil production plant, and the raw data were cleaned and preprocessed. The collected data was from well 8337 in block W of Xinjiang Oilfield (pseudonym). The basic dataset is shown in Table 1:
[0064]
[0065] Table 1 Basic Dataset
[0066] (2) Define dynamic Chunking.
[0067] Time series Through the boundary ( and ) is divided into ranges ,in .
[0068] Step 2: Establish the joint probability of cohesion and spacing decoupling, which includes the following steps:
[0069] (1) Define cohesion and spacing decoupling;
[0070] Meaningful units in a time series (such as a season or period) typically exhibit self-cohesion while remaining independent of other units. Let... Representing the cohesion of the interval, let Spacing decoupling represents the boundary (split decoupling characterizes coupling). A good partitioning scheme should have high cohesion and low coupling.
[0071] (2) Establish the joint probability of cohesion and spacing decoupling.
[0072] Step 3: Generate dynamic boundaries and determine the cohesion and spacing decoupling of dynamic intervals, specifically including the following steps:
[0073] (1) Generate dynamic boundaries;
[0074] (2) Determine the cohesion of the dynamic interval by measuring whether a randomly selected element in the interval pays attention to elements in the same region;
[0075] (3) Determine the interval decoupling. Evaluate the interval decoupling by measuring the degree to which two adjacent intervals do not concern each other.
[0076] Step 4: Calculate the optimal boundary and complete the dynamic optimal chunking, which includes the following steps:
[0077] (1) Calculate the optimal boundary;
[0078] (2) Complete dynamic chunking;
[0079] Step 5: Transformer prediction of well re-fracture production based on optimal chunking, specifically including the following steps:
[0080] (1) Initialize the Transformer encoder module;
[0081] Initialization parameters include the number of encoder and decoder layers, the number of multi-head self-attention mechanisms, and the dimension of hidden units.
[0082] (2) Input the optimal Chunking time series;
[0083] (3) Model training, evaluation, and optimization;
[0084] The model is trained using the partitioned training set data, evaluated on the validation and test sets, and optimized based on the evaluation results, adjusting parameters such as model structure and learning rate.
[0085] (4) On-site deployment.
[0086] The trained Transformer model is deployed to the production environment to provide production prediction services for repeated fracturing of oil wells.
[0087] The situation where the predicted value deviates from the true value before dynamic chunking, such as Figure 3 As shown, the predicted value deviates from the true value after dynamic chunking as follows: Figure 4 As shown, the overall prediction effect is as follows: Figure 5 As shown.
[0088] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A dynamic chunking based repeated fracturing oil well production Transformer prediction method, characterized in that, The method comprises the following steps: Step 1: data collection and definition of dynamic Chunking; Step 2: establishment of joint probability of cohesion and interval decoupling; specifically comprising: Step S201: definition of cohesion and interval decoupling; Step S202: Establish a joint probability that is decoupled from cohesion and separation, joint probability is: wherein: represents an initial boundary, represents a next boundary; represents cohesion of the interval within a time series; represents interval decoupling of the particular boundary over the entire boundary; refers to the segmented time series segment; refers to the immediately preceding previous segment; is the probability of generating a next boundary; is the probability of generating a cohesive interval ; is the probability of an interval decoupling boundary, ; represents the total number of intervals divided, Step 3: generation of dynamic boundaries and determination of cohesion and interval decoupling of dynamic intervals; specifically comprising: Step S301: Generating dynamic boundaries, given an initial boundary, the next boundary is generated with a probability that follows a truncated Poisson prior: wherein: denotes the truncated length; ; is the length penalty factor; is the normalization factor for truncation; Step S302: determination of the cohesion degree of the dynamic interval, the cohesion degree of the interval can be evaluated by measuring whether a randomly selected element in the interval pays attention to the elements in the same area, and the probability of this process is represented as: In the formula: wherein is a global attention matrix over the entire time series, Step S303: determination of interval decoupling, the interval decoupling of the interval can be evaluated by measuring the degree to which two adjacent intervals do not pay attention to each other, and the probability of this process is represented as: In the formulae: represents a non-attention matrix, , Step 4: calculation of optimal boundaries, completion of dynamic Chunking; Step 5: repeated fracturing production Transformer prediction of oil wells based on optimal Chunking.
2. The method of claim 1, wherein, The step 1 specifically comprises the following sub-steps: Step S101: data collection and preparation; Step S102: definition of dynamic Chunking.
3. The method of claim 1, wherein, The step 4 specifically comprises the following sub-steps: Step S401: calculation of optimal boundaries; Step S402: completion of dynamic Chunking.
4. The method of claim 1, wherein, The step 5 specifically comprises the following sub-steps: Step S501: initialization of the Transformer encoder module; Step S502: input of the time series of optimal Chunking; Step S503: model training, evaluation and tuning; Step S504: field deployment.
Citation Information
Patent Citations
Micro-service extraction method and system based on consistent graph clustering
CN118093439A
Refractured well yield prediction method based on convolution self-attention Transformer
CN118484994A