Method for measuring parameters of oil-water two-phase flow in oil well
By embedding a multivariate time-series prediction model with multi-scale patches into a transformer, and combining microwave signals and neural networks, the problem of measuring water cut in oil-water two-phase flow under low flow velocity and high water cut conditions was solved, achieving high-precision water cut prediction and optimizing the oil well production process.
Patent Information
- Application Number
- CN202411993057.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing technologies face significant challenges in measuring the water cut of oil-water two-phase flow under low flow velocity and high water cut conditions. Traditional methods lack accuracy and stability under complex operating conditions, making it difficult to effectively optimize the oil well exploitation process and resource management.
A multivariate time-series prediction model based on multi-scale patch embedding transformer is adopted. Through feature extraction module and improved Transformer encoder, combined with microwave signal and neural network, oil-water two-phase flow parameters are measured.
It improves the accuracy and reliability of water cut prediction, effectively captures short-term changes and long-term trends in time series, enhances the ability to model complex time series data, and optimizes the oil well extraction process.
Smart Images

Figure CN119889513B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of oil well production dynamic monitoring, and particularly relates to an oil-water two-phase flow parameter measurement method for oil wells. BACKGROUND
[0002] Oil-water two-phase flow widely exists in the development and production process of oilfields, and is closely related to economic development and technological progress. Accurate measurement of its water cut is crucial for improving recovery efficiency, resource utilization and production optimization. However, traditional measurement methods such as conductivity method and capacitance method face challenges in accuracy and stability under complex working conditions. The conductivity method and the capacitance method usually use low-frequency signals, and the sensitivity is affected by flow rate and electrode position. Under high flow rate and high water cut conditions, measurement errors occur, while the microwave method is widely used in oil-water two-phase flow phase content and flow parameter measurement fields due to its non-contact, wide measurement range, sensitivity to water molecules and good reliability.
[0003] Due to long-term water injection development in China's oilfields, some oil wells show low flow rate and high water cut production characteristics. The oil-water two-phase flow under low flow rate is affected by the slip effect, and the flow rate of oil-water medium shows nonlinear and complex flow pattern characteristics, increasing the difficulty of water cut measurement. Further research on oil-water two-phase flow water cut measurement of oil wells can optimize the production process of oil wells, reduce operating costs and efficiently manage oilfield resources, which is of great significance.
[0004] With the introduction of soft measurement methods, two-phase flow measurement technology has been greatly promoted, especially the continuous progress in the field of deep learning, which further expands the application of multiphase flow soft measurement models. For water cut measurement of low flow rate and high water cut oil-water two-phase flow, it is essentially a complex nonlinear solving process, so it is particularly necessary to introduce neural network-based algorithms to solve this problem. The dynamic characteristics of oil-water two-phase flow are complex, and the microwave signal is not only affected by local dynamic characteristics such as oil-water interface disturbance and turbulence, but also reflects global trends such as changes in water cut with time, flow rate and pressure. Through soft measurement technology, multi-dimensional data obtained by the sensor can be represented in multiple scales, so as to more accurately and efficiently extract feature information of multiphase flow.
[0005] Therefore, there is an urgent need for an oil-water two-phase flow parameter measurement method for oil wells combining microwave signals, soft measurement technology and neural networks. SUMMARY
[0006] In view of the deficiencies of the prior art, the purpose of the present application is to provide a multi-element time series prediction model based on multi-scale patch embedding transformer.
[0007] Another purpose of the present application is to provide an oil-water two-phase flow parameter measurement method for oil wells.
[0008] The object of the present application is achieved by the technical solutions described below.
[0009] A multi-element time series prediction model based on a multi-scale patch embedding transformer comprises a first feature extraction module, a second feature extraction module, a third feature extraction module and a pooling layer connected in sequence, the first feature extraction module, the second feature extraction module and the third feature extraction module are feature extraction modules respectively;
[0010] Each feature extraction module comprises a patch embedding module and an improved Transformer encoder; the input of the patch embedding module is an input signal, and the output is a plurality of patch embedding features; the input of the improved Transformer encoder is the patch embedding features, and the output is fusion features;
[0011] The input signal of the patch embedding module in the first feature extraction module is an amplitude voltage signal and a phase voltage signal, and the patch embedding features output by the patch embedding module in the first feature extraction module are first scale patch embedding features; the fusion features output by the improved Transformer encoder in the first feature extraction module are X1;
[0012] The input signal of the patch embedding module in the second feature extraction module is X1, the patch embedding features output by the patch embedding module in the second feature extraction module are second scale patch embedding features, and the fusion features output by the improved Transformer encoder in the second feature extraction module are X2;
[0013] The input signal of the patch embedding module in the third feature extraction module is X2, the patch embedding features output by the patch embedding module in the second feature extraction module are third scale patch embedding features, and the fusion features output by the improved Transformer encoder in the second feature extraction module are X3;
[0014] The pooling layer adopts an average pooling operation to perform average pooling on the fusion features X3, and outputs a water cut prediction value;
[0015] The amplitude voltage signal and the phase voltage signal are obtained by collecting oil and water two-phase fluid of an oil well in the same time period.
[0016] In the above multi-element time series prediction model, the patch embedding module in the feature extraction module sequentially performs normalization processing, sliding window segmentation, linear projection and position coding on the input signal to obtain a plurality of patch embedding features; the sliding window segmentation in the patch embedding module adopts a sliding window method to non-overlappingly segment the input signal to obtain a patch with a length P, wherein the length P of the sliding window is set, T is the length of the input signal; linear projection is used to project all patches obtained by dividing the sliding window into a high-dimensional space; position encoding is used to add corresponding position encoding in each patch to obtain a plurality of patch embedding features.
[0017] In the above multi-variate time series prediction model, the dimension of the high-dimensional space is D=512.
[0018] In the above multi-variate time series prediction model, the input of the improved Transformer encoder is all patch embedding features output by the patch embedding module, and the calculation process of the improved Transformer encoder includes steps 1-3.
[0019] Step 1: calculate each patch embedding feature using a multi-head self-attention mechanism to obtain queries Q, keys K and values V, wherein each patch embedding feature corresponds to a group of queries Q, keys K and values V;
[0020] Step 2: using the time reduction attention mechanism to sequentially downsample the keys K and values V of all patch embedding features, and according to the queries Q, downsampled keys K and downsampled values V of all patch embedding features obtained in step 1, calculating the inner product corresponding to each patch embedding feature, updating the calculated inner product to the corresponding patch embedding feature, to obtain a plurality of first patch embedding features;
[0021] Step 3: input all first patch embedding features into a feedforward neural network and output weighted features through the feedforward neural network, and weight the weighted features and the plurality of first patch embedding features to obtain fusion features.
[0022] In the above multi-variate time series prediction model, the patch length P in the first feature extraction module is P1, P1=500, the dimension of the first scale patch embedding feature is N1xD, N1 is the number of patches obtained by the patch embedding module in the first feature extraction module, and the structure of the feedforward neural network in the improved Transformer encoder in the first feature extraction module is a single-layer fully connected layer.
[0023] In the above multi-variate time series prediction model, the patch length P in the second feature extraction module is P2, P2=200, the dimension of the second scale patch embedding feature is N2xD, N2 is the number of patches obtained by the patch embedding module in the second feature extraction module, and the structure of the feedforward neural network in the improved Transformer encoder in the second feature extraction module is a single-layer fully connected layer.
[0024] In the multivariate time series prediction model, the patch length P in the third feature extraction module is P3, P3=50, the dimension of the third scale patch embedding feature is N3xD, N3 is the number of patches obtained by the patch embedding module in the third feature extraction module, the dimension of X3 is T, and the structure of the feedforward neural network in the improved Transformer encoder includes an input layer, a first hidden layer, a second hidden layer and an output layer connected in turn, and the number of neurons of the input layer, the first hidden layer, the second hidden layer and the output layer is N3xD, 10240, 6400 and T respectively.
[0025] An oil well oil-water two-phase flow parameter measurement method, comprising:
[0026] The test set is input into the trained multivariate time series prediction model based on multi-scale patch embedding transformer to obtain the water cut prediction value corresponding to each sample in the test set.
[0027] In the oil well oil-water two-phase flow parameter measurement method, the method for obtaining the trained multivariate time series prediction model based on multi-scale patch embedding transformer includes: inputting the training set into the multivariate time series prediction model based on multi-scale patch embedding transformer for training, calculating the loss function value according to the water cut prediction value and the water cut true value, training the samples of each batch of training set, inputting the verification set into the multivariate time series prediction model based on multi-scale patch embedding transformer for water cut prediction after each training round, and calculating whether the loss function value decreases; if the loss function value of the verification set does not improve for 10 consecutive rounds, an early stopping mechanism is triggered, the training is terminated, and the parameters with the best performance of the verification set are saved as the trained multivariate time series prediction model based on multi-scale patch embedding transformer.
[0028] In the oil well oil-water two-phase flow parameter measurement method, the maximum training round is 200, the loss function value is the mean square error function, the initial learning rate is 0.0001, and the cosine annealing scheduler is used for learning rate scheduling.
[0029] Compared with the prior art, the beneficial effects of the present application are:
[0030] 1.The multi-element time series prediction model based on multi-scale patch embedding transformer of the present application adopts a first feature extraction module, a second feature extraction module and a third feature extraction module to sequentially extract features of the multi-element time series at three different time scales, gradually aggregating features at different time scales, which are global and local features, possessing multi-scale characteristics, and processing the features through average pooling to obtain a water cut prediction value.The multi-element time series prediction model based on multi-scale patch embedding transformer effectively captures short-term changes and long-term trends in the time series, ultimately obtains a water cut prediction result, and has high prediction accuracy.
[0031] 2.The multi-element time series prediction model based on multi-scale patch embedding transformer of the present application adopts an improved Transformer encoder, which introduces a time reduction attention mechanism in the Transformer encoder, reduces the computational load while maintaining the ability to capture the global, making the multi-element time series prediction model based on multi-scale patch embedding transformer more efficient in processing longer time series and enhancing its modeling ability for complex time series data. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 Figure 1 is a schematic diagram of the multi-element time series prediction model based on multi-scale patch embedding transformer. DETAILED DESCRIPTION
[0033] The oil well oil-water two-phase flow parameter measurement method of the present application will be described in detail below in conjunction with the accompanying drawings.
[0034] Example 1
[0035] A feature extraction module includes a patch embedding module and an improved Transformer encoder, the patch embedding module sequentially performs normalization processing (Liu Z, Cheng M, Li Z, et al. Adaptive normalization for non-stationary time series forecasting: A temporal slice perspective [J]. Advances in Neural Information Processing Systems, 2024, 36.) on the input signal, sliding window segmentation, linear projection (Yang X, Wang S, Hu W. Research on linear projection method of local structure self-adaptation [J]. Computer Science, 2024, 51(S2): 637-643.) and position coding to obtain a plurality of patch embedding features.
[0036] The sliding window partition in the patch embedding module adopts a sliding window method to non-overlappingly partition the normalized input signal to obtain patches with a length of P, wherein the length P of the sliding window is set, and T is the length of the input signal.
[0037] Linear projection is used to project all patches obtained by sliding window partition to a high-dimensional space, and the dimension of each patch in the high-dimensional space is D=512.
[0038] Position encoding is used to add corresponding position encoding in each patch to complete patch enhancement to obtain a plurality of patch embedding features. Position encoding can enhance the sequential perception ability of the feature extraction module for time series.
[0039] The input of the improved Transformer encoder is all patch embedding features output by the patch embedding module, and the output of the improved Transformer encoder is fusion features;
[0040] The calculation process of the improved Transformer encoder includes steps 1-3:
[0041] Step 1, for each patch embedding feature, a multi-head self-attention mechanism (Vaswani A. Attention is all you need [J]. Advances in Neural Information Processing Systems, 2017.) is used to calculate to obtain queries Q, keys K and values V, wherein each patch embedding feature corresponds to a group of queries Q, keys K and values V;
[0042] Step 2, the time reduction attention mechanism (Cheng M, Liu Q, Liu Z, et al. Form time: Hierarchical multi-scale representations for multivariate time series classification [C] / / Proceedings of the ACM Web Conference 2023. 2023: 1437-1445.) is used to sequentially downsample the keys K and values V of all patch embedding features, and according to the queries Q obtained in step 1, the downsampled keys K and the downsampled values V, the inner product corresponding to each patch embedding feature is calculated, and the calculated inner product is updated to the corresponding patch embedding feature to obtain a plurality of first patch embedding features. The number of first patch embedding features is the same as the number of patch embedding features output by the patch embedding module;
[0043] Step 3, embed all the first patch embedding features into a feedforward neural network (Islam S, Elmekki H, Elsebai A, et al. A comprehensive survey on applications of transformers for deep learning tasks [J]. Expert Systems with Applications, 2024, 241: 122666.) and output weighted features through the feedforward neural network, weight the weighted features and the plurality of first patch embedding features to obtain the fusion features.
[0044] Wherein, the improved Transformer encoder can capture global dependencies, the feedforward neural network introduces a nonlinear transformation through a nonlinear activation function ReLU (He J, Li L, Xu J, et al. ReLU deep neural networks and linear finite elements [J]. arXiv preprint arXiv: 1807.03973, 2018.) to enhance the feature expression ability and provide more rich feature representation; the time reduction attention mechanism (TRA) reduces the computational amount of the multi-head self-attention mechanism and reduces the model operation complexity.
[0045] Embodiment 2
[0046] Based on embodiment 1, as shown in Figure 1 A multi-element time series prediction model based on multi-scale patch embedding transformer, comprising: a first feature extraction module, a second feature extraction module, a third feature extraction module and a pooling layer connected in turn, the first feature extraction module, the second feature extraction module and the third feature extraction module are respectively the feature extraction module in embodiment 1.
[0047] The input signal of the patch embedding module in the first feature extraction module is the amplitude voltage signal and the phase voltage signal, and the patch embedding feature output by the patch embedding module in the first feature extraction module is the first scale patch embedding feature, the dimension of the first scale patch embedding feature is N1 x D, N1 is the number of patches obtained by the patch embedding module in the first feature extraction module; the fusion feature output by the improved Transformer encoder in the first feature extraction module is X1, the dimension of X1 is T, and the structure of the feedforward neural network in the improved Transformer encoder in the first feature extraction module is a single-layer fully connected layer.
[0048] The input signal of the patch embedding module in the second feature extraction module is X1, the patch embedding feature output by the patch embedding module in the second feature extraction module is the second scale patch embedding feature, the dimension of the second scale patch embedding feature is NxD, N2 is the number of patches obtained by the patch embedding module in the second feature extraction module; the fusion feature output by the improved Transformer encoder in the second feature extraction module is X2, the dimension of X2 is T, and the structure of the feedforward neural network in the improved Transformer encoder in the second feature extraction module is a single-layer fully connected layer.
[0049] The input signal of the patch embedding module in the third feature extraction module is X2, the patch embedding feature output by the patch embedding module in the third feature extraction module is the third scale patch embedding feature, the dimension of the third scale patch embedding feature is NxD, N3 is the number of patches obtained by the patch embedding module in the third feature extraction module; the fusion feature output by the improved Transformer encoder in the third feature extraction module is X3, the dimension of X3 is T, and the structure of the feedforward neural network in the improved Transformer encoder in the third feature extraction module includes an input layer, a first hidden layer, a second hidden layer and an output layer connected in turn, and the number of neurons of the input layer, the first hidden layer, the second hidden layer and the output layer is N3xD, 10240, 6400 and T respectively.
[0050] The pooling layer adopts an average pooling operation to perform average pooling on the fusion feature X3, and outputs the moisture content prediction value.
[0051] The amplitude voltage signal and the phase voltage signal are obtained by collecting oil well oil-water two-phase fluid in the same time period.
[0052] The patch length P in the first feature extraction module is P1, P1=500; the patch length P in the second feature extraction module is P2, P2=200; and the patch length P in the third feature extraction module is P3, P3=50.
[0053] Example 3
[0054] The amplitude voltage signal and the phase voltage signal are obtained by a microwave sensor installed on the oil well pipeline, and the working frequency of the microwave sensor is set to 1.2GHz, wherein the microwave sensor can use a sensor with corresponding functions, for example, the microwave sensor can use the double-helix microwave sensor in CN202311628606.5.
[0055] The sampling frequency of the microwave sensor is 1kHz, and the amplitude voltage signal and the phase voltage signal in 1 hour are collected every 12 hours, a total of 24 times.
[0056] The collected signals are divided into non-overlapping segments using a sliding window, the collected signals are time-aligned amplitude voltage signals and phase voltage signals, the length of the sliding window is 3000, and the signals are divided into 28800 parts, each part being a sample, and all samples form a fluid data set.
[0057] When the microwave sensor collects the amplitude voltage signal and the phase voltage signal, the oil-water two-phase fluid in the oil well is artificially sampled and artificially tested to obtain the test value. The test value corresponding to each sample is taken as the true value of the water cut of the sample.
[0058] The fluid data set is divided into a training set, a validation set and a test set according to a ratio of 8:1:1.
[0059] Example 4
[0060] A training method of a multi-element time series prediction model based on a multi-scale patch embedding transformer includes the following steps:
[0061] The training set in Example 3 is input into the multi-element time series prediction model based on a multi-scale patch embedding transformer in Example 2 for training. The loss function value is calculated according to the water cut prediction value and the true value of the water cut. 32 samples of each batch of training set are trained for 200 rounds. After each training round, the validation set in Example 3 is input into the multi-element time series prediction model for water cut prediction, and whether the loss function value decreases is calculated: if the loss function value of the validation set does not improve for 10 consecutive rounds, the early stopping mechanism is triggered, the training is terminated, and the parameters with the best performance on the validation set are saved as the trained multi-element time series prediction model.
[0062] The loss function value is calculated using mean square error (MSE).
[0063] The hyperparameters are set as follows: the initial learning rate is 0.0001, the learning rate scheduling is using a cosine annealing scheduler (Tang Z, Wei W, Luo W, et al. Semantic segmentation of remote sensing images by fusing cosine annealing and hollow convolution[J]. Remote Sensing, 2023, 27(11): 2579-2592.), and the learning rate is gradually reduced according to the training rounds.
[0064] Example 5
[0065] An oil-water two-phase flow parameter measurement method includes:
[0066] The test set in Example 3 is input into the trained multi-element time series prediction model based on a multi-scale patch embedding transformer obtained in Example 4 to obtain the water cut prediction value corresponding to each sample in the test set. The mean square error (MSE), mean absolute error (MAE), mean absolute percentage error (MAPE) and determination coefficient (R 2to comprehensively evaluate the performance of the trained multi-scale patch embedding transformer-based multivariate time series prediction model.
[0067] Embodiment 6
[0068] An oil-water two-phase flow water cut measurement method is basically consistent with Embodiment 5, the only difference is that the improved Transformer encoder in all feature extraction modules is replaced by a transformer encoder (Islam S, Elmekki H, Elsebai A, et al. A comprehensive survey on applications of transformers for deep learning tasks [J]. Expert Systems with Applications, 2024, 241: 122666.).
[0069] Embodiment 7
[0070] An oil-water two-phase flow water cut measurement method is basically consistent with Embodiment 5, the only difference is that the improved Transformer encoder in all feature extraction modules is replaced by a CNN-LSTM module (Zha W, Liu Y, Wan Y, et al. Forecasting monthly gas field production based on the CNN-LSTM model [J]. Energy, 2022, 260: 124889.).
[0071] The mean square error MSE, mean absolute error MAE, mean absolute percentage error MAPE and determination coefficient R 2 Four statistical indicators are used to evaluate the performance of the trained multi-scale patch embedding transformer-based multivariate time series prediction model, and the results are as follows:
[0072] Table 1
[0073] Model MSE MAE MAPE R Example 7 0.00495 0.0775 9.86% 92.3% Example 6 0.00378 0.0534 8.93% 89.5% Example 5 0.00257 0.0416 6.29% 94.6%
[0074] As shown in Table 1, in the oil-water two-phase flow water cut prediction task, the trained multi-scale patch embedding transformer-based multivariate time series prediction model aggregates features from different time scales, effectively captures short-term changes and long-term trends in time series, more efficiently processes longer time series, enhances the modeling ability of complex time series, and improves the accuracy and reliability of water cut prediction.
[0075] The above has made the exemplary description to the present application, should indicate that, in not departing from the core of the present application, any simple change, modification or other field technicians can not spend the equivalent replacement of creative labor falls into the protection scope of the present application.
Claims
1. A multivariate time series prediction model based on multi-scale patch embedding transformer, characterized in that, include: The first feature extraction module, the second feature extraction module, the third feature extraction module, and the pooling layer are connected in sequence. The first feature extraction module, the second feature extraction module, and the third feature extraction module are feature extraction modules. Each feature extraction module includes a patch embedding module and an improved Transformer encoder. The patch embedding module takes the input signal as input and outputs multiple patch embedding features. The improved Transformer encoder takes the patch embedding features as input and outputs fused features. The improved Transformer encoder takes as input all patch embedding features output by the patch embedding module, and its computation process includes steps 1 through 3: Step 1: Calculate the query A, key A, and value A for each patch embedding feature using a multi-head self-attention mechanism. Each patch embedding feature corresponds to a set of query A, key A, and value A. Step 2: Using a time-reduced attention mechanism, downsample the key A and value B of all patch embedding features sequentially. Based on the query A, the downsampled key A, and the downsampled value B of all patch embedding features obtained in Step 1, calculate the inner product corresponding to each patch embedding feature. Update the calculated inner product to the corresponding patch embedding feature to obtain multiple first patch embedding features. Step 3: Input all the first patch embedding features into the feedforward neural network and output the weighted features from the feedforward neural network. Then, weight the weighted features with the multiple first patch embedding features to obtain the fused features. The input signals of the patch embedding module in the first feature extraction module are amplitude voltage signal and phase voltage signal. The patch embedding feature output by the patch embedding module in the first feature extraction module is the first-scale patch embedding feature. The fused feature output by the improved Transformer encoder in the first feature extraction module is... ; The input signal of the patch embedding module in the second feature extraction module is The patch embedding features output by the patch embedding module in the second feature extraction module are the second-scale patch embedding features, and the fused features output by the improved Transformer encoder in the second feature extraction module are... ; The input signal of the patch embedding module in the third feature extraction module is The patch embedding features output by the patch embedding module in the second feature extraction module are the third-scale patch embedding features, and the fused features output by the improved Transformer encoder in the second feature extraction module are... ; The pooling layer uses average pooling operation to fuse features. Perform average pooling and output the predicted moisture content value; The amplitude voltage signal and the phase voltage signal were obtained from the oil-water two-phase fluid of the oil well during the same time period.
2. The multivariate time series prediction model according to claim 1, characterized in that, The patch embedding module in the feature extraction module performs normalization, sliding window segmentation, linear projection and position encoding on the input signal in sequence to obtain multiple patch embedding features; The sliding window segmentation in the patch embedding module uses the sliding window method to perform non-overlapping segmentation of the input signal, resulting in... A length of The patch, which sets the length of the sliding window. T is the length of the input signal; linear projection is used to project all patches obtained from the sliding window segmentation into a higher-dimensional space. Positional encoding is used to add the corresponding positional code to each patch, resulting in multiple patch embedding features.
3. The multivariate time series prediction model according to claim 1, characterized in that, The dimension of high-dimensional space is .
4. The multivariate time series prediction model according to claim 1, characterized in that, Patch length in the first feature extraction module for , The dimension of the first-scale patch embedding feature is × , The number of patches obtained by the patch embedding module in the first feature extraction module is denoted as , and the structure of the feedforward neural network in the improved Transformer encoder in the first feature extraction module is a single fully connected layer.
5. The multivariate time series prediction model according to claim 1, characterized in that, Patch length in the second feature extraction module for , The dimension of the second-scale patch embedding feature is × , The number of patches obtained by the patch embedding module in the second feature extraction module is denoted as , and the structure of the feedforward neural network in the improved Transformer encoder in the second feature extraction module is a single fully connected layer.
6. The multivariate time series prediction model according to claim 1, characterized in that, Patch length in the third feature extraction module for , The dimension of the third-scale patch embedding feature is × , This represents the number of patches obtained from the patch embedding module in the third feature extraction module. The dimension is The improved feedforward neural network structure in the Transformer encoder includes an input layer, a first hidden layer, a second hidden layer, and an output layer connected in sequence. The number of neurons in each of the input layer, the first hidden layer, the second hidden layer, and the output layer are respectively... × 10240, 6400 and .
7. A method for measuring oil-water two-phase flow parameters in an oil well, characterized in that, include: The test set is input into the multivariate time-series prediction model based on multi-scale patch embedding transformer of any one of claims 1 to 6 after training, to obtain the water content prediction value corresponding to each sample in the test set.
8. The method according to claim 7, characterized in that, A method for obtaining a trained multivariate time-series prediction model based on multi-scale patch embedding transformer includes: inputting the training set into the multivariate time-series prediction model based on multi-scale patch embedding transformer for training; calculating the loss function value based on the predicted water content and the true water content; training the samples of each batch of training set; after each training round, inputting the validation set into the multivariate time-series prediction model based on multi-scale patch embedding transformer for water content prediction and calculating whether the loss function value decreases; if the loss function value of the validation set does not improve within 10 consecutive rounds, an early stopping mechanism is triggered to terminate the training, and the parameters with the best performance on the validation set are saved as the trained multivariate time-series prediction model based on multi-scale patch embedding transformer.
9. The method according to claim 8, characterized in that, The maximum number of training rounds is 200.
10. The method according to claim 8, characterized in that, The loss function is the mean squared error function.
11. The method according to claim 8, characterized in that, The initial learning rate is 0.0001.
12. The method according to claim 8, characterized in that, The learning rate scheduler uses a cosine annealing scheduler.
Citation Information
Patent Citations
Device for measuring water content of oil-water two-phase flow of oil well and soft measurement method
CN117630051A
Time sequence prediction method and device based on multi-scale patch parallel prediction network
CN118735059A