A method for interval prediction of optical fiber temperature measurement data based on improved Transformer

By improving the Transformer model and quantile regression module, the interval range of permanent fiber temperature measurement data is predicted, which solves the problem of low prediction accuracy in the existing technology, and achieves more accurate production well output analysis and adjustment guidance.

CN119738060APending Publication Date: 2025-04-01HANG ZHOU RUI LI SHENG DIAN JI SHU GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510077393.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The prior art is difficult to effectively predict the interval range of permanent fiber temperature measurement data, which affects the analysis and adjustment of production well output in well logging.

Method used

The improved Transformer model is used for feature extraction, long-term dependencies are captured, and interval prediction is carried out in combination with quantile regression module to obtain the upper and lower boundary range of fiber temperature data.

Benefits of technology

The accuracy and calculation efficiency of fiber temperature measurement data prediction can better analyze the output changes of future production wells and guide the well logging and regulation production system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119738060A_ABST
    Figure CN119738060A_ABST
Patent Text Reader

Abstract

The present invention provides a method for interval prediction of permanent optical fiber temperature measurement data based on Transformer and quantile regression. The permanent optical fiber is correctly connected to the system. The system sequentially performs data acquisition, Transformer model training for feature extraction, and quantile regression module for interval prediction, and finally obtains the predicted temperature data of the entire well section of the permanent optical fiber. The prediction results are analyzed by professional logging interpretation software, and the interpretation results are obtained as guidance for future production logging. The beneficial effects of the present invention are: using the Transformer model, the computing efficiency is improved through parallelization, and the long-term dependency problem is better solved. The use of quantile regression does not require a priori assumptions, and the upper and lower bounds of the model can be obtained using its regression model, which has better effects; compared with traditional interval predictions, it does not require the distribution of estimated errors and assumed errors, and is easy to use. A new solution is provided for the prediction of the temperature of the entire well section of a permanent optical fiber well with long-term continuous measurement, which can provide certain guidance for production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of permanent optical fiber temperature measurement data prediction, and mainly relates to a method for predicting intervals of optical fiber temperature measurement data based on an improved Transformer. Background Art

[0002] The principle of distributed optical fiber temperature measurement technology is to use the Raman scattering effect to measure the temperature changes distributed along the optical fiber. The laser emits a beam of light, which enters the temperature-sensitive optical fiber after being modulated by the optical module. By detecting the backscattered light information in the optical fiber, the temperature signal distributed along the optical fiber can be obtained.

[0003] Distributed fiber optic temperature signal logging is a technology that uses optical fiber to sense temperature signals from different formations to analyze surrounding formation characteristics or downhole events. It has the advantages of strong real-time monitoring results and high reliability of interpretation results. At present, optical fiber is permanently deployed in production wells due to its stability, becoming permanent fiber optic logging, which is used to continuously monitor temperature data in production logging for a long time. However, the formation temperature will change with the production process, terrain changes and surrounding environmental changes. It is difficult to effectively judge the future output status of the production well by observing its changes through manual experience. Now, the Transformer model and quantile regression are combined to predict the changes in the temperature of the production layer in production logging, so as to provide guidance for the subsequent logging and production system adjustment to complete the production work more effectively. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and to provide a method for predicting the interval of temperature measurement data based on an improved Transformer optical fiber.

[0005] The problem solved by the present invention is: to predict the temperature interval of the permanent optical fiber through the Transformer model and quantile regression, and to make high-precision predictions through the Transformer model, which is completely based on the self-attention mechanism. Its high degree of parallelization can improve the computational efficiency and capture long-term dependency problems. Then, the upper and lower bounds of the model can be obtained through quantile regression, and the interval range of the optical fiber temperature data of the entire well section can be predicted, which is used for the analysis of the production of the generated layer section in the well logging.

[0006] The object of the present invention is achieved through the following technical solution: A method for improving Transformer optical fiber temperature measurement data interval prediction, comprising the following steps:

[0007] (1) Equipment connection: The equipment side is normally connected to the permanent optical fiber for data collection to ensure that the interface is unified and free of foreign matter;

[0008] (2) Data collection: Use a distributed optical fiber temperature measurement system to connect the temperature measurement optical cable to collect and save the permanent optical fiber temperature signal data for a long time;

[0009] (3) Feature extraction: The permanently placed optical fiber temperature signal data continuously collected in step (2) is subjected to feature extraction using the Transformer model to capture the characteristics of long-term dependencies for point prediction;

[0010] (4) Interval prediction: Based on the characteristic data in step (3), a quantile regression module is used to perform regression prediction, and based on the confidence interval range, the prediction result of the permanent optical fiber temperature signal data and its upper and lower interval range are obtained;

[0011] (5) Capacity analysis: Quantitatively analyze the future production of production wells based on the prediction results in step (4).

[0012] Furthermore, the Transformer model has the following specific steps:

[0013] The Transformer model includes a position embedding module, a multi-head attention module and a feedforward network module. The maximum number of Transformer training times is set to 300, the initial learning rate is 0.001, the maximum position encoding length is 256, the number of heads in the self-attention mechanism is 4, the number of channels of the key of each head is 4×32, and several consecutive sets of permanent optical fiber temperature data are taken as input and put into the position embedding module.

[0014]

[0015] Where PE represents position Embedding, pos is the position of the current temperature in the distributed fiber data, d is the latitude of PE, i is the i-th time step, and d model is the fiber temperature length.

[0016] The input of the self-attention network needs to add a position encoding variable:

[0017]

[0018] Where: Represents the load information of a single node. Then the linear transformation matrix W is used q , W k , W v Calculate Q, K, V, that is:

[0019]

[0020] Where: The vector matrix representing the input temperature, Q and K are the calculation matrices of the query vector and key vector, which are used to calculate the correlation between temperature data, and V is the calculation matrix of the value vector representing the historical data.

[0021] Transformer's multi-head attention mechanism can highlight the key features between feature vectors. The attention calculation formula is:

[0022]

[0023] Where: d is the model dimension; H is the number of attention heads, softmax is the normalization function, Q and K are the calculation matrices of the query vector and key vector, and H att The result of self-attention.

[0024] Furthermore, the quantile regression comprises the following specific steps:

[0025] The quantile regression module determines the regression model by studying the conditional quantile relationship between the independent variable and the dependent variable. It can calculate the conditional quantile of the response variable from the explanatory variable. c The distribution function of the random variables S, S can be expressed as:

[0026] F(s)=P(S≤s)

[0027] Then for any quantile τ, τ∈[0,1], we have:

[0028] F -1 (τ)=inf{s:F(s)≥τ}

[0029] Where F -1 (τ) is the τth quantile of S; inf(s) is the infimum of the set s.

[0030] In the linear quantile regression model, the τth conditional quantile Q of the response variable S under the explanatory variable U is s (τ|U) is:

[0031]

[0032] Where β(τ) is the regression coefficient vector at the τ quantile.

[0033] β(τ) is different at different quantiles, so once β(τ) is determined, the regression model is also determined. In addition, the relevant parameters of β(τ) can be solved by the loss function of the following formula, namely:

[0034]

[0035] Where ρ τ(μ) is the test function, which is obtained by making ρ τ (μ) is minimized to solve the model regression coefficient β(τ). Test function ρ t (μ) is:

[0036] ρ τ (μ)=μ(τ-I(μ))

[0037]

[0038] The beneficial effects of the present invention are:

[0039] 1. The Transformer model is used, which is a model based entirely on the self-attention mechanism. Its main structure is position encoding, encoder, decoder, and feedforward network. By improving computational efficiency through parallel processing, the dependency relationship between data over a long period of time can be obtained, which can better solve the problem of long-term dependency.

[0040] 2. Quantile regression does not require prior assumptions. The upper and lower bounds of the model can be obtained using its regression model, which has a better effect.

[0041] 3. Compared with traditional interval prediction, quantile regression does not require the distribution of estimation errors and assumption errors, and is easy to use. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the process of the present invention.

[0043] Figure 2 The figure is a flow chart of the network structure.

[0044] Figure 3 This is the flow chart of the Transformer module.

[0045] Figure 4 Schematic diagram of the Transformer module.

[0046] Figure 5 This is the regression fit plot for quantile regression data.

[0047] Figure 6 is an error histogram with 20 bins.

[0048] Figure 7 This is a comparison chart of the prediction results of the training set.

[0049] Figure 8 This is a comparison chart of the prediction results of the test set. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the technical solution of the present invention, the preferred implementation scheme of the present invention is described below in conjunction with the accompanying drawings and specific examples.

[0051] The present invention provides a method for predicting intervals of temperature measurement data based on an improved Transformer optical fiber. The process is as follows: Figure 1 As shown in the figure, after confirming that the temperature-sensitive optical fiber is correctly connected, the device first performs a temperature stability test on the internal constant temperature module. After ensuring that the temperature is stable within a certain period of time, the system collects and demodulates the original optical signal into temperature signal data and collects data for a long time. Then, by setting the initialization parameters of the Transformer model, the feature points of the long-term dependency relationship of the continuous long-term permanent optical fiber temperature data are predicted. Then, the quantile regression model is used at the end of the network structure for regression prediction. The network structure is shown in Figure 2 As shown, through the pre-set confidence interval, the prediction result of the permanent optical fiber temperature and its upper and lower interval range are obtained. Finally, the prediction result is analyzed by professional logging interpretation software, and the interpretation result is used as a guide for future production logging.

[0052] 1. Feature extraction:

[0053] First, set the initialization parameters of the Transformer model. Set the maximum number of Transformer training times to 300, the initial learning rate to 0.001, the maximum position encoding length to 512, the number of heads in the self-attention mechanism to 4, and the number of channels of each head key to 4×64. The specific process inside the Transformer model can be found in Figure 3 Figure 4 Input: several sets of permanent optical fiber temperature data, output: Transformer prediction samples.

[0054] The Transformer model includes a position embedding module, a multi-head attention module and a feedforward network module. The maximum number of Transformer training times is set to 300, the initial learning rate is 0.001, the maximum position encoding length is 256, the number of heads in the self-attention mechanism is 4, the number of channels of the key of each head is 4×32, and several consecutive sets of permanent optical fiber temperature data are taken as input and put into the position embedding module.

[0055]

[0056] Where PE represents position Embedding, pos is the position of the current temperature in the distributed fiber data, d is the latitude of PE, i is the i-th time step, and d model is the fiber temperature length.

[0057] The input of the self-attention network needs to add a position encoding variable:

[0058]

[0059] Where: Represents the load information of a single node. Then the linear transformation matrix W is used q , W k , W v Calculate Q, K, V, that is:

[0060]

[0061] Where: The vector matrix representing the input temperature, Q and K are the calculation matrices of the query vector and key vector, which are used to calculate the correlation between temperature data, and V is the calculation matrix of the value vector representing the historical data.

[0062] Transformer's multi-head attention mechanism can highlight the key features between feature vectors. The attention calculation formula is:

[0063]

[0064] Where: d is the model dimension; H is the number of attention heads, softmax is the normalization function, Q and K are the calculation matrices of the query vector and key vector, and H att The result of self-attention.

[0065] 2. Interval prediction:

[0066] Use the quantile regression module for regression prediction and set the confidence interval range, here set to 95% to 97%, to get the prediction result and its upper and lower interval range, and calculate the RMSE index and the final prediction value based on the interval prediction. The final regression curve is shown in Figure 5 , where the error histogram is shown in Figure 6 This sample uses the real data of the entire section of the high-temperature well, and the prediction results are compared in Figure 7 , Figure 8 As shown. Input Transformer prediction sample, output: RMSE indicator and final prediction value.

[0067] The quantile regression module determines the regression model by studying the conditional quantile relationship between the independent variable and the dependent variable. It can calculate the conditional quantile of the response variable from the explanatory variable. c The distribution function of the random variables S, S can be expressed as:

[0068] F(s)=P(S≤s)

[0069] Then for any quantile τ, τ∈[0,1], we have:

[0070] F -1(τ)=inf{s:F(s)≥τ}

[0071] Where F -1 (τ) is the τth quantile of S; inf(s) is the infimum of the set s.

[0072] In the linear quantile regression model, the τth conditional quantile Q of the response variable S under the explanatory variable U is s (τ|U) is:

[0073]

[0074] Where β(τ) is the regression coefficient vector at the τ quantile.

[0075] β(τ) is different at different quantiles, so once β(τ) is determined, the regression model is also determined. In addition, the relevant parameters of β(τ) can be solved by the loss function of the following formula, namely:

[0076]

[0077] Where ρ τ (μ) is the test function, which is obtained by making ρ τ (μ) is minimized to solve the model regression coefficient β(τ). Test function ρ τ (μ) is:

[0078] ρ τ (μ)=μ(τ-I(μ))

[0079]

[0080] 3. Capacity analysis:

[0081] The predicted and generated fiber optic temperature signal data of the entire well section are quantitatively analyzed through special fiber optic logging software, and the interpretation results are used to guide future production logging.

[0082] It is understandable that, for those skilled in the art, any equivalent replacement or change to the technical solution and inventive concept of the present invention should fall within the protection scope of the claims attached to the present invention.

Claims

1. A method for interval prediction of optical fiber temperature measurement data based on improved Transformer, characterized in that: The steps include: (1) Equipment connection: The equipment side is normally connected to the permanent optical fiber for data collection; (2) Data collection: Use a distributed optical fiber temperature measurement system to connect the temperature measurement optical cable to collect and save the permanent optical fiber temperature signal data for a long time; (3) Feature extraction: The permanently placed optical fiber temperature signal data continuously collected in step (2) is subjected to feature extraction using the Transformer model to capture the characteristics of long-term dependencies for point prediction; (4) Interval prediction: Based on the characteristic data in step (3), a quantile regression module is used to perform regression prediction, and based on the confidence interval range, the prediction result of the permanent optical fiber temperature signal data and its upper and lower interval range are obtained; (5) Capacity analysis: Quantitatively analyze the future production of production wells based on the prediction results in step (4).

2. The method for interval prediction of temperature measurement data based on improved Transformer optical fiber according to claim 1, characterized in that: The Transformer model is used to extract the features of long-term continuous permanent optical fiber temperature signal data, capture the characteristics of long-term dependencies, and predict the temperature range. The specific steps are as follows: The Transformer model includes a position embedding module, a multi-head attention module, and a feedforward network module. Several sets of continuous permanent optical fiber temperature data are taken as input and put into the position embedding module. Where PE represents position Embedding, pos is the position of the current temperature in the distributed fiber data, d is the latitude of PE, i is the i-th time step, and d model is the fiber temperature length; The input of the self-attention network needs to add a position encoding variable: Where: Represents the load information of a single node, and then uses the linear transformation matrix W q , W k , W v Calculate Q, K, V, that is: Where: The vector matrix representing the input temperature, Q and K are the calculation matrices of the query vector and key vector, which are used to calculate the correlation between temperature data, and V is the calculation matrix of the value vector representing the historical data; Transformer's multi-head attention mechanism highlights the key features between feature vectors. The attention calculation formula is: Where: d is the model dimension; H is the number of attention heads, softmax is the normalization function, Q and K are the calculation matrices of the query vector and key vector, and H att The result of self-attention.

3. The method for interval prediction of temperature measurement data based on improved Transformer optical fiber according to claim 2 is characterized in that: The quantile regression module is used for regression prediction. The specific steps are as follows: The quantile regression module determines the regression model through the conditional quantile relationship between the independent variable and the dependent variable, and realizes the conditional quantile calculation of the response variable estimated by the explanatory variable; if there are c explanatory variables U={U1,U2,…,U c The distribution function of} acting on random variables S, S is expressed as: F(s)=P(S≤s) Then for any quantile τ, τ∈[0,1], we have: F -1 (τ)=inf{s:F(s)≥τ} Where F -1 (τ) is the τth quantile of S; inf(s) is the infimum of the set s; In the linear quantile regression model, the τth conditional quantile Q of the response variable S under the explanatory variable U is s (τ|U) is: Where β(τ) is the regression coefficient vector at the τ quantile; The β(τ) at different quantiles is different. The regression model is determined by determining β(τ). The relevant parameters of β(τ) are solved by the loss function of the following formula, namely: Where ρ τ (μ) is the test function, which is obtained by making ρ τ (μ) is minimized to solve the model regression coefficient β(τ); test function ρ τ (μ) is: r τ (μ)=μ(τ-I(μ)) 4. The method for interval prediction of temperature measurement data based on improved Transformer optical fiber according to claim 3 is characterized in that: Capacity analysis, the specific steps are: The predicted and generated fiber optic temperature signal data of the entire well section are quantitatively analyzed through special fiber optic logging software, and the interpretation results are used to guide future production logging.