A method, device, equipment and medium for training a water injection well working condition diagnosis model

By constructing a water injection well working condition diagnosis model, using time characteristics and local feature extraction networks for training and update, the problem that water injection well working condition diagnosis in the existing technology depends on subjective experience, and efficient and intelligent working condition diagnosis is achieved, and oil field operation efficiency is improved.

CN119760470APending Publication Date: 2025-04-04CHINA NATIONAL OFFSHORE OIL (CHINA) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411808897.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the existing technology, the diagnosis of water injection well conditions mainly depends on the subjective experience of technicians. The level of intelligent diagnosis is low, resulting in frequent production accidents and low oil field operation efficiency.

Method used

A water injection well condition diagnostic model training method is adopted. By constructing a model composed of a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier, multi-training samples are constructed using the operation data of the water injection well within N consecutive time steps, and the model is trained and updated to improve the level of intelligent diagnosis.

Benefits of technology

It realizes intelligent monitoring and diagnosis of water injection well working conditions, improves diagnosis accuracy and efficiency, reduces dependence on expert experience, avoids production accidents, and improves oil field operation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760470A_ABST
    Figure CN119760470A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of water injection well fault diagnosis, and discloses a water injection well working condition diagnosis model training method, device, equipment and medium. The water injection well working condition diagnosis model formed by coupling a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier can be first constructed, and then multiple training samples are constructed according to the operation data of the water injection well in N consecutive time steps. The water injection well working condition diagnosis model is trained and updated based on the multiple training samples to obtain a trained water injection well working condition diagnosis model. The trained water injection well working condition diagnosis model of the present invention can be used for intelligent diagnosis of the working condition of the water injection well, effectively improving the level of intelligent diagnosis of the working condition of the water injection well.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of water injection well fault diagnosis, and in particular to a water injection well working condition diagnosis model training method, device, equipment and medium. Background Art

[0002] During oil field development, relevant technologies can inject water into the reservoir through special water injection wells to maintain or restore reservoir pressure, enhance driving force, and increase the production rate and recovery rate of the reservoir.

[0003] The normal operation of water injection wells is crucial to maintaining reservoir pressure and improving oil recovery. Timely and accurate monitoring and diagnosis of water injection well conditions to achieve pre-warning, in-process guidance and post-event disposal can effectively avoid production accidents and improve oilfield operation efficiency.

[0004] At present, the diagnosis of water injection well operating conditions generally relies on technicians' subjective experience, and the level of intelligent diagnosis is low. Summary of the invention

[0005] The present invention provides a method, device, equipment and medium for training a water injection well working condition diagnosis model, which are used to solve the defect that the working condition diagnosis of water injection wells in related technologies generally relies on the subjective experience of technicians and has a low level of intelligent diagnosis, thereby improving the level of intelligent diagnosis.

[0006] In a first aspect, the present invention provides a method for training a water injection well working condition diagnosis model, wherein the water injection well working condition diagnosis model to be trained includes a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier; Obtain the operation data of the water injection well in N consecutive time steps; where N is an integer greater than 1; Constructing multiple training samples according to the operation data of the water injection well in each time step; Inputting the multiple training samples into a time feature extraction network to extract time features, thereby obtaining time feature data; and inputting the multiple training samples into a local feature extraction network to extract local features, thereby obtaining local feature data; Inputting the time feature data and the local feature data into the feature stitching layer for feature stitching to obtain feature stitching data; Inputting the feature splicing data into the classifier to perform working condition classification to obtain a classification result; Based on the difference between the classification result and the true result, the time feature extraction network, the local feature extraction network and the classifier are updated to obtain a trained water injection well working condition diagnosis model.

[0007] Optionally, constructing multiple training samples according to the operation data of the water injection well in each time step includes: For the operation data of the water injection well in any of the time steps, preprocess the operation data of the water injection well in the time step to obtain the processed operation data of the water injection well in the time step, and construct a training sample according to the processed operation data of the water injection well in the time step; The constructed training samples are combined to construct the multiple training samples.

[0008] Optionally, each of the time steps is M consecutive days, and two adjacent time steps are 2M consecutive days that do not overlap each other; wherein M is an integer not less than 1; The step of constructing a training sample according to the processed operation data of the water injection well within the time step comprises: Sorting the processed operation data of the injection wells every day in the time step in chronological order to obtain a corresponding array as the training sample corresponding to the time step; The combining of the constructed training samples to construct the multiple training samples includes: The training samples corresponding to each of the time steps are sorted in chronological order to obtain a corresponding array as the multiple training samples.

[0009] Optionally, the multiple training samples are input into a feature extraction network to extract features to obtain target feature data, including: Inputting the multiple training samples into the feature extraction network, so that the feature extraction network sequentially extracts features from each of the multiple training samples to obtain sample feature data corresponding to each of the training samples; Arranging the sample feature data corresponding to each of the training samples in sequence according to the arrangement order of the training samples in the multiple training samples, so as to obtain a corresponding array as the target feature data; Wherein, the feature extraction network is the temporal feature extraction network or the local feature extraction network; When the feature extraction network is the time feature extraction network, the feature extraction is time feature extraction, the sample feature data is sample time feature data, and the target feature data is the time feature data; When the feature extraction network is the local feature extraction network, the feature extraction is local feature extraction, the sample feature data is sample local feature data, and the target feature data is the local feature data.

[0010] Optionally, the step of inputting the time feature data and the local feature data into the feature stitching layer to perform feature stitching to obtain feature stitching data includes: The time feature data and the local feature data are input into the feature splicing layer so that the feature splicing layer: determines the sample time feature data arranged at the end of the time feature data, and determines the sample local feature data arranged at the end of the local feature data, splices the sample time feature data arranged at the end and the sample local feature data arranged at the end, obtains corresponding splicing data and uses it as the feature splicing data.

[0011] Optionally, based on the difference between the classification result and the true result, the time feature extraction network, the local feature extraction network and the classifier are updated to obtain a trained water injection well working condition diagnosis model, including: The loss function value is determined based on the difference between the classification result and the true result, and the network weights in the time feature extraction network, the local feature extraction network and the classifier are updated according to the loss function value, the gradient descent method and the back propagation method. The hyperparameters in the water injection well working condition diagnosis model to be trained are optimized based on the Bayesian optimization algorithm to obtain a trained water injection well working condition diagnosis model.

[0012] Optionally, the operating data includes at least one of injection volume, oil pressure, casing pressure and apparent water absorption index, the operating condition categories of the water injection well include normal production, formation blockage, water distributor blockage and oil pipe leakage, the time feature extraction network includes a multi-layer bidirectional long short-term memory network BiLSTM and a dimension rearrangement layer connected in sequence, and the local feature extraction network includes a multi-layer fully convolutional network FNC and a pooling layer connected in sequence.

[0013] In a second aspect, the present invention provides a water injection well working condition diagnosis model training device, wherein the water injection well working condition diagnosis model to be trained includes a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier; the device includes: An acquisition unit, used for acquiring operation data of the water injection well within N consecutive time steps; wherein N is an integer greater than 1; A construction unit, used for constructing multiple training samples according to the operation data of the water injection well in each time step; A first extraction unit, used for inputting the plurality of training samples into a time feature extraction network to extract time features and obtain time feature data; A second extraction unit, used for inputting the plurality of training samples into the local feature extraction network to extract local features and obtain local feature data; An input unit, used for inputting the time feature data and the local feature data into the feature splicing layer to perform feature splicing to obtain feature splicing data; A classification unit, used for inputting the feature splicing data into the classifier to perform working condition classification and obtain a classification result; An updating unit is used to update the time feature extraction network, the local feature extraction network and the classifier based on the difference between the classification result and the true result to obtain a trained water injection well working condition diagnosis model.

[0014] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the water injection well operating condition diagnosis model training method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the water injection well operating condition diagnosis model training method of the first aspect or any corresponding embodiment thereof.

[0016] The water injection well working condition diagnosis model training method, device, equipment and medium provided by the present invention can first construct a water injection well working condition diagnosis model coupled by a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier, and then construct multiple training samples according to the operation data of the water injection well in N consecutive time steps, and train and update the water injection well working condition diagnosis model based on the multiple training samples to obtain a trained water injection well working condition diagnosis model. The trained water injection well working condition diagnosis model of the present invention can be used for intelligent diagnosis of water injection well working conditions, effectively improving the level of intelligent diagnosis of water injection well working conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A flow chart of a method for training a water injection well operating condition diagnosis model provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a BiLSTM network provided in an embodiment of the present invention; Figure 3A schematic diagram of the structure of an FCN network provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a water injection well operating condition diagnosis model provided by an embodiment of the present invention; Figure 5 A schematic diagram of the structure of a water injection well operating condition diagnosis model training device provided by an embodiment of the present invention; Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.

[0020] Deep learning technology is widely used in industrial fault diagnosis. Deep learning technology can analyze historical data, discover data patterns, and apply it to the diagnosis of water injection well conditions, which can reduce the reliance on expert experience, realize automatic monitoring and diagnosis of water injection well conditions, and greatly improve the accuracy and efficiency of diagnosis.

[0021] Combine the following Figure 1-Figure 4 The present invention describes the water injection well operating condition diagnosis model training method.

[0022] like Figure 1 As shown, this embodiment proposes a first method for training a water injection well working condition diagnosis model. The water injection well working condition diagnosis model to be trained includes a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier. The method may include the following steps: S101. Obtaining operation data of a water injection well in N consecutive time steps, where N is an integer greater than 1.

[0023] The specific duration of the time step can be set by the technical personnel according to the actual situation, for example, it can be set to 1 day, 5 days or 10 days, or it can be set to 20 hours, 40 hours or 60 hours.

[0024] The operation data may include certain operation parameter values ​​of the water injection well. Optionally, the operation data includes at least one of injection volume, oil pressure, casing pressure and apparent water absorption index.

[0025] Specifically, this embodiment can collect the operation data of the water injection well in each time step of N consecutive time steps.

[0026] S102. Construct multiple training samples according to the operation data of the water injection well in each time step.

[0027] The multiple training samples may be constructed by combining multiple training samples.

[0028] Specifically, this embodiment uses the operation data of the water injection well in each time step to construct multiple training samples.

[0029] S103: Input multiple training samples into a time feature extraction network to extract time features and obtain time feature data.

[0030] Among them, the time feature extraction network can be a network used to extract time features.

[0031] Optionally, the temporal feature extraction network includes a plurality of sequentially connected bidirectional long short-term memory networks (Bidirectional Long Short-Term Memory, BiLSTM) and a dimension rearrangement layer.

[0032] Specifically, in this embodiment, multiple training samples can be input into the time feature extraction network, so that the time feature extraction network extracts time features from the multiple training samples, and obtains time feature data of the multiple training samples output by the time feature extraction network.

[0033] S104: Input multiple training samples into a local feature extraction network to extract local features and obtain local feature data.

[0034] The local feature extraction network may be a network used to extract local features.

[0035] Optionally, the local feature extraction network may include multiple layers of fully convolutional networks (FCN) and pooling layers connected in sequence.

[0036] Specifically, in this embodiment, multiple training samples can be input into the local feature extraction network, so that the local feature extraction network performs local feature extraction in the multiple training samples, and obtains local feature data of the multiple training samples output by the local feature extraction network.

[0037] S105, inputting the time feature data and the local feature data into the feature stitching layer for feature stitching to obtain feature stitching data.

[0038] Specifically, this embodiment can use the feature splicing layer to splice the time feature data and local feature data of multiple training samples to obtain corresponding feature splicing data.

[0039] S106, inputting the feature splicing data into a classifier to perform working condition classification and obtain a classification result.

[0040] The classification result may be the working condition of the water injection well determined by the classifier for working condition diagnosis based on the feature splicing data. Optionally, the working condition categories of the water injection well include normal production, formation blockage, water distributor blockage and oil pipe leakage.

[0041] Specifically, in this embodiment, the feature splicing data can be input into a classifier, so that the classifier performs working condition classification based on the feature splicing data, that is, performs working condition diagnosis on the water injection well to obtain corresponding classification results.

[0042] S107. Based on the difference between the classification result and the true result, the time feature extraction network, the local feature extraction network and the classifier are updated to obtain a trained water injection well working condition diagnosis model.

[0043] Among them, the true result is the actual working condition of the injection well in N consecutive time steps.

[0044] Specifically, this embodiment can calculate the corresponding loss function value based on the classification result and the true result, and update the time feature extraction network, the local feature extraction network and the classifier based on the loss function value to update the water injection well working condition diagnosis model to be trained, and obtain an updated water injection well working condition diagnosis model. Then, a new multi-training sample is constructed, and the updated water injection well working condition diagnosis model is continuously trained and updated using the new multi-training sample until a water injection well working condition diagnosis model that meets the model performance requirements is obtained and used as a trained water injection well working condition diagnosis model.

[0045] It should be noted that the hybrid model of this embodiment improves data characterization and fitting capabilities and enhances prediction accuracy. Bayesian optimization achieves efficient hyperparameter selection and avoids empirical limitations. It greatly improves diagnostic efficiency and accuracy and meets the needs of smart oil fields.

[0046] The water injection well working condition diagnosis model training method proposed in this embodiment can first construct a water injection well working condition diagnosis model coupled by a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier, and then construct multiple training samples based on the operation data of the water injection well in N consecutive time steps, and train and update the water injection well working condition diagnosis model based on the multiple training samples to obtain a trained water injection well working condition diagnosis model. The trained water injection well working condition diagnosis model can be used for intelligent diagnosis of water injection well working conditions, effectively improving the level of intelligent diagnosis of water injection well working conditions.

[0047] based on Figure 1 This embodiment proposes a second method for training a water injection well operating condition diagnosis model. In this method, step S102 may include: For the operation data of the water injection well in any time step, pre-process the operation data of the water injection well in the time step to obtain the processed operation data of the water injection well in the time step, and construct a training sample according to the processed operation data of the water injection well in the time step; The constructed training samples are combined to construct multiple training samples.

[0048] The preprocessing may include the identification and elimination of abnormal data, and may also include standardization processing, such as z-score standardization processing. For the operation data of the water injection well in any time step, this embodiment can identify and eliminate the abnormal data in the operation data of the water injection well in the time step, and perform standardization processing on the remaining normal data to obtain the corresponding processed operation data.

[0049] Optionally, each time step is M consecutive days, and two adjacent time steps are 2M consecutive days that do not overlap each other, where M is an integer not less than 1.

[0050] Construct a training sample based on the processed run data of the injection well within the time step, including: Sort the processed operation data of the injection wells every day in the time step in chronological order to obtain the corresponding array and use it as the training sample corresponding to the time step; The constructed training samples are combined to construct multiple training samples, including: The training samples corresponding to each time step are sorted in chronological order to obtain the corresponding array as multiple training samples.

[0051] The specific value of M can be set by technicians according to actual conditions, such as 5 days, and is not limited in this embodiment.

[0052] Specifically, there are M days in each time step, and this embodiment preprocesses the operation data of each day in a time step, that is, M processed operation data can be obtained. Among them, one processed operation data is obtained after this embodiment preprocesses the operation data of a certain day in a time step.

[0053] Specifically, after preprocessing the operation data of the water injection well in a time step to obtain the corresponding M processed operation data, the M processed operation data can be sorted according to the time sequence of the M processed operation data to obtain the corresponding array as a training sample. For example, when a time step is 5 days, the embodiment can obtain the processed operation data A1, A2, A3, A4 and A5 of the first day, second day, third day, fourth day and fifth day in the time step after preprocessing, and then the processed operation data of the first day, second day, third day and fourth day in the time step can be sorted according to the time sequence to obtain the array [A1, A2, A3, A4, A5] as a training sample.

[0054] Specifically, after constructing the training samples corresponding to each time step, the present embodiment can sort the training samples corresponding to each time step in chronological order to obtain a corresponding array as multiple training samples.

[0055] Specifically, multiple training samples are input into the feature extraction network for feature extraction to obtain target feature data, including: Inputting multiple training samples into a feature extraction network, so that the feature extraction network sequentially extracts features from each training sample in the multiple training samples to obtain sample feature data corresponding to each training sample; According to the arrangement order of the training samples in the multiple training samples, the sample feature data corresponding to each training sample is arranged in turn to obtain a corresponding array as the target feature data; Among them, the feature extraction network is a temporal feature extraction network or a local feature extraction network; When the feature extraction network is a time feature extraction network, the feature extraction is time feature extraction, the sample feature data is sample time feature data, and the target feature data is time feature data; When the feature extraction network is a local feature extraction network, the feature extraction is local feature extraction, the sample feature data is sample local feature data, and the target feature data is local feature data.

[0056] Optionally, the time feature data and the local feature data are input into a feature stitching layer for feature stitching to obtain feature stitching data, including: The time feature data and the local feature data are input into the feature splicing layer, so that the feature splicing layer: determines the sample time feature data arranged at the end in the time feature data, and determines the sample local feature data arranged at the end in the local feature data, splices the sample time feature data arranged at the end and the sample local feature data arranged at the end, obtains the corresponding splicing data and uses it as the feature splicing data.

[0057] It should be noted that the sample time feature data arranged at the end of the time feature data has the memory of the previous sample time feature data, and the sample local feature data arranged at the end of the local feature data also has the memory of the previous sample local feature data. In order to effectively reduce the amount of data calculation, this embodiment can only splice the sample time feature data arranged at the end of the time feature data and the sample local feature data arranged at the end of the local feature data to obtain the corresponding spliced ​​data as the feature spliced ​​data.

[0058] The water injection well operating condition diagnosis model training method proposed in this embodiment can construct multiple training samples based on the operating data of the water injection well in N consecutive time steps, and can use multiple training samples to train the water injection well operating condition diagnosis model, thereby enhancing the model convergence speed, improving the model training effect, and enhancing the model performance.

[0059] based on Figure 1 This embodiment proposes a third method for training a water injection well operating condition diagnosis model. In this method, the above step S107 includes: The loss function value is determined based on the difference between the classification result and the true result. The network weights in the temporal feature extraction network, the local feature extraction network and the classifier are updated according to the loss function value, the gradient descent method and the back propagation method. The hyperparameters in the water injection well condition diagnosis model to be trained are optimized based on the Bayesian optimization algorithm to obtain a trained water injection well condition diagnosis model.

[0060] Specifically, in the present embodiment, during the training of the water injection well operating condition diagnosis model, hyperparameter optimization can be performed based on the Bayesian optimization algorithm to determine the optimal hyperparameter combination and improve the model performance of the water injection well operating condition diagnosis model.

[0061] In order to better illustrate the training method of the water injection well working condition diagnosis model, this embodiment proposes the following example 1 for introduction, and example 1 includes the following steps: S1. Collect the historical production data and corresponding operating data of water injection wells and construct an operating condition sample set. The historical production data of water injection wells include injection volume, oil pressure, casing pressure and apparent water absorption index, a total of four dimensions. The operating conditions of water injection wells include: normal production, formation blockage, water distributor blockage and oil pipe leakage.

[0062] S2. The collected dynamic data of water injection wells are segmented, anomaly removed and standardized to obtain a normalized time series, where the time series length is 5 and the data is standardized using the z-score standardization method.

[0063] S3. Build a hybrid neural network model consisting of a multi-layer BiLSTM network and a multi-layer FCN network, including: S31. Build a BiLSTM network, including the number of LSTM layers, number of neurons, and neuron drop rate. The structure of the BiLSTM network is shown below. Figure 2 shown. Figure 2 LSTM_cell is the basic unit in the BiLSTM network structure. ht, Yt, Xt are the input, output and hidden state of the neuron at time t.

[0064] S32, build FCN network, including the number of convolutional layers, the number of convolutional layer filters, the size of convolutional layer filters, the calculation method of pooling layer, activation function design, and fully connected layer design. The structure of FCN network is shown as follows Figure 3 shown.

[0065] S33, build an optimizer, including batch size, number of iterations, maximum learning rate, weight decay coefficient, and number of early stops. Construct a hybrid neural network model containing a multi-layer BiLSTM network and a multi-layer FCN network, and use it as the injection well condition diagnosis model to be trained. The model structure is shown in the figure below: Figure 4 shown. Figure 4 In the figure, BiLSTM is a bidirectional long short-term memory network, Dropout is a random dropout, ConvlD is a one-dimensional convolutional layer, BN+ReLU is a batch normalization + rectified linear unit, and the connected ConvlD and BN+ReLU form an FNC network. Global Pooling is global pooling, Concat is concatenation or series connection, and Softmax is a softmax function. It should be noted that there is also a dimension rearrangement layer between Dropout and Concat, which is used to rearrange the dimensions of the data.

[0066] S34. Concatenate the output tensors of the bidirectional LSTM network and the FCN network.

[0067] S4, inputting the dynamic data pre-processed in step S2 into the hybrid neural network model constructed in step S3 for training, and obtaining a water injection well working condition prediction model, specifically including: S41. Input the preprocessed time series data into the BiLSTM-FCN neural network, and pass through the bidirectional long short-term memory layer, convolution layer, pooling layer, and fully connected layer in sequence, and finally obtain the probability of the time series corresponding to each working condition.

[0068] S42, according to the probability of each working condition corresponding to the time series, obtain the working condition classification result, and finally output the working condition classification result; S43, using the gradient descent method to find the minimum value of the loss function, and using the back propagation method to update the network weights; S5: Set the objective function, optimization times, hyperparameter search space and other parameters of Bayesian optimization, and use the Bayesian optimization algorithm to iteratively search for the optimal hyperparameters, including: S51, setting the accuracy of the working condition classification as the objective function of Bayesian optimization; S52. Define the hyperparameter search space of the neural network model, including training batch size, number of model iterations, number of convolutional layer filters, size of convolutional layer filters, maximum learning rate, LSTM drop rate, number of LSTM hidden layer neurons, number of LSTM layers, weight decay coefficient, and number of early stopping times; S53, assuming a priori distribution of hyperparameters, setting the number of sampling times; S54, based on the current hyperparameters, the neural network model is trained using the back propagation method to obtain the loss function value of the validation set; S55. Update the posterior distribution of hyperparameters using Bayes’ rule; S56. Sample according to the new posterior distribution to obtain the next round of hyperparameter combinations; S57, iteratively solve the global optimal hyperparameters to obtain the optimized BiLSTM-FCN model; S6: Preprocess the collected new dynamic data, input it into the trained model, and output the prediction results of the water injection well working conditions, which specifically includes the following processes: S61, preprocessing the collected raw data; S62, inputting the preprocessed data into the optimized BiLSTM-FCN working condition diagnosis model; S63, the model outputs the prediction category of the current working condition, i.e., formation blockage, water distributor blockage or oil pipe leakage; S64. Give the prediction result of the current water injection well operating condition.

[0069] Further examples to illustrate the implementation steps: 1) A total of 800 groups of samples of water injection well conditions were collected from the production site; 2) Classify the collected working condition samples according to known fault types and perform data preprocessing; 3) Divide the classified data set into training set, validation set and test set in a ratio of 6:2:2; 4) Obtain time series data, including daily data of four dimensions: injection volume, oil pressure, casing pressure, and apparent water absorption index. The length of the time series is 5 days. Every 16 samples are combined to form a time series data with dimensions of [16,5,4], i.e., multiple training samples.

[0070] Subsequently, the time series data, i.e., multiple training samples, are input into a 2-layer BiLSTM network for processing. Each BiLSTM layer has 50 hidden units, forming a tensor of dimension [16, 5, 100]. Then, the dimensions are rearranged through a Permute layer, i.e., a dimension rearrangement layer, and the dimensions of the data are rearranged into [16, 100, 5], i.e., time feature data, and then input into the feature concatenation layer to take the output of the last time step [16, 100]. It should be noted that the Dropout layer will only be involved in the processing when the model is updated, and neurons are discarded at a discard rate of 0.84 to reduce overfitting during the training process.

[0071] In addition, the time series data, i.e., multiple training samples, are input into a convolutional block, which first passes through a convolutional layer with a kernel size of 5 and an output channel of 16, and then passes through batch normalization and ReLU activation function (this convolutional layer, batch normalization, and ReLU activation function constitute an FNC network). Next, the data passes through a convolutional layer with a kernel size of 4 and an output channel of 32, and then undergoes batch normalization and ReLU activation function again (this convolutional layer, batch normalization, and ReLU activation function constitute another FNC network). The data then passes through a convolutional layer with a kernel size of 1 and an output channel of 16, and then undergoes batch normalization and ReLU activation function for the last time (this convolutional layer, batch normalization, and ReLU activation function constitute another FNC network). Then, the global average pooling layer, i.e., the pooling layer, pools the data from the dimension [16,16,5] to [16,16,1], i.e., the local feature data. After pooling, the data reshaping layer in the feature concatenation layer is used to perform a Reshape operation to change the dimension from [16, 16, 1] to [16, 16]. Subsequently, the time feature data [16, 100] and the local feature data [16, 16] output at the last time step are connected together through the connection layer in the feature concatenation layer to obtain [16, 116]. Finally, these features are processed by a classifier including a linear fully connected layer, and are mapped to 4 different working condition categories to generate a prediction result with a dimension of [16, 4]. It should be noted that everything between the connection layer and the softmax function constitutes a classifier (excluding the connection layer).

[0072] 5) The objective function of the Bayesian optimization method is accuracy, and the parameter search space is: the training batch size ranges from 8 to 16, the number of model iterations ranges from 100 to 500, the number of convolutional layer filters ranges from 8 to 64, the convolutional layer filter size ranges from 1 to 5, the maximum learning rate ranges from 0.0001 to 0.01, the LSTM dropout rate ranges from 0.1 to 0.9, the number of LSTM hidden layer neurons ranges from 10 to 100, the number of LSTM layers ranges from 1 to 10, the weight decay coefficient ranges from 0.05 to 0.15, and the number of early stopping times ranges from 5 to 10. For each set of hyperparameters, the model is trained using the training data, and the model performance is evaluated using the validation data. The accuracy of the model on the validation dataset is calculated as the value of the objective function. Based on the obtained accuracy, the Bayesian optimization algorithm will try different hyperparameter combinations to find the hyperparameters that maximize the accuracy.

[0073] 6) The hyperparameter training model with the highest accuracy was used, and the production dynamic data collected on site was input into the neural network. The predicted diagnosis result was formation blockage, which was consistent with the actual working condition results.

[0074] It is understandable that this embodiment can predict and diagnose the working condition of water injection wells based on the Bayesian optimization BiLSTM-FCN neural network, using the optimized neural network model. The present invention can accurately diagnose different types of water injection well faults and realize intelligent monitoring and diagnosis of water injection well working conditions.

[0075] This embodiment can construct a neural network structure including a BiLSTM layer and an FCN layer by collecting sample data of the working conditions of the water injection wells, wherein the BiLSTM layer is used to capture the dependency of the time series data, and the FCN layer is used to extract local features. The Bayesian optimization algorithm is used to optimize the hyperparameters of the neural network model to improve the prediction accuracy of the model. The collected dynamic data is input, and the optimized neural network model is used to predict and diagnose the working conditions of the water injection wells. This embodiment can accurately diagnose different types of water injection well faults, realize intelligent monitoring and diagnosis of the working conditions of water injection wells, avoid production accidents, and increase oil field output.

[0076] The water injection well working condition diagnosis model training method proposed in this embodiment can automatically learn data rules through neural networks, reduce dependence on expert experience, and improve analysis efficiency. The bidirectional BiLSTM network is used to learn the dependencies of time series, and the full convolutional network is used to learn the local features of time series. The combination of the two improves the analysis and expression capabilities of dynamic data. Bayesian optimization of hyperparameters is used to achieve intelligent global search, making parameter selection more automated and efficient. This embodiment can achieve automatic, efficient, and intelligent analysis to meet the needs of intelligent oil fields for water injection well monitoring.

[0077] like Figure 5 As shown, this embodiment proposes a water injection well working condition diagnosis model training device, and the water injection well working condition diagnosis model to be trained includes a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier. The device may include: The acquisition unit 501 is used to acquire the operation data of the water injection well in N consecutive time steps; wherein N is an integer greater than 1; A construction unit 502 is used to construct multiple training samples according to the operation data of the water injection well in each time step; The first extraction unit 503 is used to input multiple training samples into the time feature extraction network to extract time features and obtain time feature data; The second extraction unit 504 is used to input multiple training samples into the local feature extraction network to extract local features and obtain local feature data; An input unit 505 is used to input the time feature data and the local feature data into a feature splicing layer for feature splicing to obtain feature splicing data; The classification unit 506 is used to input the feature splicing data into the classifier to classify the working conditions and obtain the classification result; The updating unit 507 is used to update the time feature extraction network, the local feature extraction network and the classifier based on the difference between the classification result and the true result to obtain a trained water injection well working condition diagnosis model.

[0078] It should be noted that the processing of the acquisition unit 501, the construction unit 502, the first extraction unit 503, the second extraction unit 504, the input unit 505, the classification unit 506 and the updating unit 507 and the beneficial effects thereof can be respectively referred to in Figure 1 Steps S101 to S107 in the above are not described in detail.

[0079] Optionally, the construction unit 502 is further configured to: For the operation data of the water injection well in any time step, pre-process the operation data of the water injection well in the time step to obtain the processed operation data of the water injection well in the time step, and construct a training sample according to the processed operation data of the water injection well in the time step; The constructed training samples are combined to construct multiple training samples.

[0080] Optionally, each time step is M consecutive days, and two adjacent time steps are 2M consecutive days that do not overlap each other; where M is an integer not less than 1; The construction unit 502 is further configured to: For the operation data of the water injection well in any time step, the operation data of the water injection well in the time step is preprocessed to obtain the processed operation data of the water injection well in the time step, and the processed operation data of the water injection well every day in the time step are sorted in chronological order to obtain the corresponding array and serve as the training sample corresponding to the time step; The training samples corresponding to each time step are sorted in chronological order to obtain the corresponding array as multiple training samples.

[0081] The above inputs multiple training samples into the feature extraction network for feature extraction to obtain target feature data, which is set as: Inputting multiple training samples into a feature extraction network, so that the feature extraction network sequentially extracts features from each training sample in the multiple training samples to obtain sample feature data corresponding to each training sample; According to the arrangement order of the training samples in the multiple training samples, the sample feature data corresponding to each training sample is arranged in turn to obtain a corresponding array as the target feature data; Among them, the feature extraction network is a temporal feature extraction network or a local feature extraction network; When the feature extraction network is a time feature extraction network, the feature extraction is time feature extraction, the sample feature data is sample time feature data, and the target feature data is time feature data; When the feature extraction network is a local feature extraction network, the feature extraction is local feature extraction, the sample feature data is sample local feature data, and the target feature data is local feature data.

[0082] Optionally, the input unit 505 is further used for: The time feature data and the local feature data are input into the feature splicing layer, so that the feature splicing layer: determines the sample time feature data arranged at the end in the time feature data, and determines the sample local feature data arranged at the end in the local feature data, splices the sample time feature data arranged at the end and the sample local feature data arranged at the end, obtains the corresponding splicing data and uses it as the feature splicing data.

[0083] Optionally, the updating unit 507 is further configured to: The loss function value is determined based on the difference between the classification result and the true result. The network weights in the temporal feature extraction network, the local feature extraction network and the classifier are updated according to the loss function value, the gradient descent method and the back propagation method. The hyperparameters in the water injection well condition diagnosis model to be trained are optimized based on the Bayesian optimization algorithm to obtain a trained water injection well condition diagnosis model.

[0084] Optionally, the operating data includes at least one of injection volume, oil pressure, casing pressure and apparent water absorption index, the operating condition categories of the water injection well include normal production, formation blockage, water distributor blockage and oil pipe leakage, the time feature extraction network includes a multi-layer bidirectional long short-term memory network BiLSTM and a dimension rearrangement layer connected in sequence, and the local feature extraction network includes a multi-layer fully convolutional network FNC and a pooling layer connected in sequence.

[0085] The water injection well working condition diagnosis model training device proposed in this embodiment can first construct a water injection well working condition diagnosis model formed by coupling a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier, and then construct multiple training samples based on the operation data of the water injection well in N consecutive time steps, and train and update the water injection well working condition diagnosis model based on the multiple training samples to obtain a trained water injection well working condition diagnosis model. The trained water injection well working condition diagnosis model can be used for intelligent diagnosis of the working condition of the water injection well, effectively improving the level of intelligent diagnosis of the working condition of the water injection well.

[0086] The water injection well operating condition diagnosis model training device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0087] The embodiment of the present invention also provides a computer device having the above Figure 5 The water injection well operating condition diagnosis model training device shown.

[0088] See also Figure 6 , a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0089] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0090] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0091] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0092] The memory 20 may include a volatile memory, such as a random access memory. The memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive. The memory 20 may also include a combination of the above-mentioned types of memory.

[0093] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0094] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for training a water injection well operating condition diagnosis model, characterized in that: The water injection well working condition diagnosis model to be trained includes a time feature extraction network, a local feature extraction network, a feature concatenation layer and a classifier; Obtain the operation data of the water injection well in N consecutive time steps; where N is an integer greater than 1; Constructing multiple training samples according to the operation data of the water injection well in each time step; Inputting the multiple training samples into a time feature extraction network to extract time features, thereby obtaining time feature data; and inputting the multiple training samples into a local feature extraction network to extract local features, thereby obtaining local feature data; Inputting the time feature data and the local feature data into the feature stitching layer for feature stitching to obtain feature stitching data; Inputting the feature splicing data into the classifier to perform working condition classification to obtain a classification result; Based on the difference between the classification result and the true result, the time feature extraction network, the local feature extraction network and the classifier are updated to obtain a trained water injection well working condition diagnosis model.

2. The method according to claim 1, characterized in that The step of constructing multiple training samples according to the operation data of the water injection well in each time step includes: For the operation data of the water injection well in any of the time steps, preprocess the operation data of the water injection well in the time step to obtain the processed operation data of the water injection well in the time step, and construct a training sample according to the processed operation data of the water injection well in the time step; The constructed training samples are combined to construct the multiple training samples.

3. The method according to claim 2, characterized in that Each of the time steps is M consecutive days, and two adjacent time steps are 2M consecutive days that do not overlap each other; wherein M is an integer not less than 1; The step of constructing a training sample according to the processed operation data of the water injection well within the time step comprises: Sorting the processed operation data of the injection wells every day in the time step in chronological order to obtain a corresponding array as the training sample corresponding to the time step; The combining of the constructed training samples to construct the multiple training samples includes: The training samples corresponding to each of the time steps are sorted in chronological order to obtain a corresponding array as the multiple training samples.

4. The method according to claim 3, characterized in that Inputting the multiple training samples into a feature extraction network to extract features and obtain target feature data, including: Inputting the multiple training samples into the feature extraction network, so that the feature extraction network sequentially extracts features from each of the multiple training samples to obtain sample feature data corresponding to each of the training samples; Arranging the sample feature data corresponding to each of the training samples in sequence according to the arrangement order of the training samples in the multiple training samples, so as to obtain a corresponding array as the target feature data; Wherein, the feature extraction network is the temporal feature extraction network or the local feature extraction network; When the feature extraction network is the time feature extraction network, the feature extraction is time feature extraction, the sample feature data is sample time feature data, and the target feature data is the time feature data; When the feature extraction network is the local feature extraction network, the feature extraction is local feature extraction, the sample feature data is sample local feature data, and the target feature data is the local feature data.

5. The method according to claim 4, characterized in that The step of inputting the time feature data and the local feature data into the feature stitching layer for feature stitching to obtain feature stitching data includes: The time feature data and the local feature data are input into the feature splicing layer so that the feature splicing layer: determines the sample time feature data arranged at the end of the time feature data, and determines the sample local feature data arranged at the end of the local feature data, splices the sample time feature data arranged at the end and the sample local feature data arranged at the end, obtains corresponding splicing data and uses it as the feature splicing data.

6. The method according to claim 1, characterized in that Based on the difference between the classification result and the true result, the time feature extraction network, the local feature extraction network and the classifier are updated to obtain a trained water injection well working condition diagnosis model, including: The loss function value is determined based on the difference between the classification result and the true result, and the network weights in the time feature extraction network, the local feature extraction network and the classifier are updated according to the loss function value, the gradient descent method and the back propagation method. The hyperparameters in the water injection well working condition diagnosis model to be trained are optimized based on the Bayesian optimization algorithm to obtain a trained water injection well working condition diagnosis model.

7. The method according to any one of claims 1 to 6, characterized in that The operation data includes at least one of injection volume, oil pressure, casing pressure and apparent water absorption index. The operating conditions of the water injection well include normal production, formation blockage, water distributor blockage and oil pipe leakage. The time feature extraction network includes a multi-layer bidirectional long short-term memory network BiLSTM and a dimension rearrangement layer connected in sequence. The local feature extraction network includes a multi-layer fully convolutional network FNC and a pooling layer connected in sequence.

8. A water injection well operating condition diagnosis model training device, characterized in that: The water injection well working condition diagnosis model to be trained includes a time feature extraction network, a local feature extraction network, a feature splicing layer and a classifier; the device includes: An acquisition unit, used for acquiring operation data of the water injection well within N consecutive time steps; wherein N is an integer greater than 1; A construction unit, used for constructing multiple training samples according to the operation data of the water injection well in each time step; A first extraction unit, used for inputting the plurality of training samples into a time feature extraction network to extract time features and obtain time feature data; A second extraction unit, used for inputting the plurality of training samples into the local feature extraction network to extract local features and obtain local feature data; An input unit, used for inputting the time feature data and the local feature data into the feature splicing layer to perform feature splicing to obtain feature splicing data; A classification unit, used for inputting the feature splicing data into the classifier to perform working condition classification and obtain a classification result; An updating unit is used to update the time feature extraction network, the local feature extraction network and the classifier based on the difference between the classification result and the true result to obtain a trained water injection well working condition diagnosis model.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the water injection well operating condition diagnosis model training method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the water injection well operating condition diagnosis model training method according to any one of claims 1 to 7.