Shaft risk prediction method and system, processing equipment and storage medium

Through the combination of the multi-scale Transformer model and the LSTM layer, the problem of insufficient accuracy of wellbore risk prediction in the prior art is solved, and high-precision prediction of wellbore annulus pressure is achieved, which significantly improves the accuracy and adaptability of the prediction.

CN119204687APending Publication Date: 2024-12-27CHINA NATIONAL OFFSHORE OIL (CHINA) CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing wellbore risk prediction methods are not very accurate when processing multi-scale time feature data, especially in capturing long-term dependencies and short-term changes. The traditional model has limited effect in practical applications.

Method used

The multi-scale Transformer model is used to combine self-attention mechanism and LSTM layer to accurately analyze the time series of wellbore production data, select relevant feature data and perform standardization processing, and use multi-head self-attention mechanism and residual connection to capture sequence feature data of different scales. , output the prediction result of the annulus pressure of the wellbore.

Benefits of technology

It significantly improves the accuracy and effectiveness of wellbore risk prediction, can effectively capture data dynamics from short-term subtle changes to long-term trends, and enhances the ability to predict complex dynamic changes environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119204687A_ABST
    Figure CN119204687A_ABST
Patent Text Reader

Abstract

The invention relates to a wellbore risk prediction method and system, processing equipment and a storage medium, and the method is characterized in that the method comprises the steps: obtaining wellbore production data of a to-be-detected wellbore, and carrying out the preprocessing; adopting a statistical analysis method to select feature data in the preprocessed wellbore production data to obtain a plurality of first feature data most related to a target in the wellbore production data of the wellbore to be detected; performing standardization processing on the selected feature data to obtain feature data after standardization processing; the feature data obtained after standardization processing is input into a pre-trained multi-scale Transform model, and a wellbore annulus pressure prediction result of the wellbore to be detected is obtained.According to the wellbore annulus pressure prediction method and device, the Transform model and a multi-scale mechanism are combined, high-precision prediction of the wellbore annulus pressure is achieved by accurately analyzing the time sequence of the wellbore production data, and the wellbore annulus pressure prediction accuracy is improved. The method can be widely applied to the field of wellbore risk prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wellbore risk prediction, and in particular to a wellbore risk prediction method, system, processing equipment and storage medium. Background Art

[0002] As global oil resources are gradually depleted, the reserves and production of onshore oil fields are declining, and the development of deepwater oil and gas resources has become a new frontier in global energy development. However, the high-risk nature of this process, especially in terms of production safety, requires efficient and reliable technical solutions to ensure the safety and economic benefits of operations.

[0003] Some methods are disclosed in the prior art, including: 1) Analytical hierarchy process and risk matrix method, as well as traditional risk assessment methods based on Bayesian networks. However, these methods are mainly based on experience and simple statistical analysis, using prior knowledge to build models, using network structures to represent conditional dependencies between variables, and using probabilistic reasoning to predict the probability of occurrence of different events, thereby qualitatively or quantitatively evaluating wellbore risks, and have strong processing capabilities for uncertainty problems. 2) Using deep neural networks to process time series data, such as LSTM (long short-term memory network) and CNN-LSTM (convolutional layer-long short-term memory network) fusion models, to analyze time series data of the on-site drilling process to detect gas surge events early. However, this method aims to capture long-term dependencies and short-term contextual information in time series data, and has deficiencies in processing long-term dependencies and computational efficiency. 3) The Transformer model uses the self-attention mechanism to process time series data. Its core competitiveness lies in the self-attention mechanism, which enables the model to effectively capture long-distance data dependencies and solves the gradient vanishing or exploding problems faced by traditional sequence processing models such as RNN (recurrent neural network) and LSTM. Multiscale Vision Transformers were proposed for video and image recognition by linking the pioneering idea of ​​multi-scale feature data hierarchy with the transformer model. However, this method focuses on the spatial domain and is specifically designed for computer vision tasks. At the same time, although the existing Transformer model has made some improvements on the long-distance dependency problem, when it is actually applied to wellbore risk prediction, the utilization of multi-scale time feature data is not sufficient, especially in the task of wellbore risk time series prediction, the accuracy is not high. Summary of the invention

[0004] In view of the above problems, an object of the present invention is to provide a wellbore risk prediction method, system, processing equipment and storage medium that can improve the accuracy of wellbore risk prediction.

[0005] To achieve the above objectives, the present invention adopts the following technical solutions: In a first aspect, a wellbore risk prediction method is provided, comprising: Acquire the wellbore production data of the wellbore to be tested and perform preprocessing; Using a statistical analysis method, the characteristic data in the pre-processed wellbore production data are selected to obtain the first several characteristic data most relevant to the target in the wellbore production data of the wellbore to be tested; Performing standardization processing on the selected feature data to obtain standardized feature data; The standardized feature data is input into the pre-trained multi-scale Transformer model to obtain the prediction result of the annular pressure of the wellbore to be tested.

[0006] Further, the obtaining of the wellbore production data of the wellbore to be tested and preprocessing the data includes: Eliminate static value parameters in wellbore production data and feature data whose missing rate exceeds a preset missing rate threshold and whose coverage is lower than a preset coverage threshold; The missing data are filled to obtain the preprocessed wellbore production data.

[0007] Furthermore, a Z-Score standardization processing method is used to standardize the selected feature data.

[0008] Furthermore, the multi-scale Transformer model includes: Input layer, used to input the standardized feature data; The linear transformation layer is used to perform linear transformation on the feature data after standardization; The position encoding embedding layer is used to add the position encoding to the linearly transformed feature data to incorporate the position information of the sequence; A segmentation module, used to segment the feature data after the position code is embedded; The attention layer is used to perform multi-head self-attention mechanism, residual connection and layer normalization on the segmented feature data to obtain sequence feature data of different scales; The length recovery module is used to restore the length of the sequence feature data after the multi-head self-attention mechanism by using the method of repeated elements and connect them to each other; LSTM layer, used to capture long-term and short-term dependencies and supplement sequence feature data that Transformer may ignore; The output layer is used to output the wellbore annulus pressure prediction results based on the supplemented sequence feature data.

[0009] Furthermore, the training process of the multi-scale Transformer model is: Input the standardized feature data into the input layer; The standardized feature data is linearly transformed through the linear transformation layer; The linearly transformed feature data enters the position encoding embedding layer, and the position encoding is added to the linearly transformed feature data to merge the position information of the sequence; The segmentation module segments the feature data after the position code is embedded; The segmented feature data is input into the multi-head self-attention mechanism of the corresponding attention layer; The method of repeated elements is used to restore the length of the sequence feature data after the multi-head self-attention mechanism and connect them to each other; The residual connection and layer normalization of the attention layer are used. The sequence feature data after the length restoration of this layer and the output data of the residual connection and layer normalization of the previous layer are used as the input of the residual connection and layer normalization of this layer. The output data is used as one of the inputs of the residual connection and layer normalization of the next layer, so that each attention layer captures feature data of different scales. The LSTM layer captures long-term and short-term dependencies and supplements the sequence feature data that the Transformer may ignore; The output layer outputs the wellbore annulus pressure prediction results based on the supplemented sequence feature data and completes the training of the multi-scale Transformer model.

[0010] Furthermore, the sequence feature data after the current layer restores the length is:

[0011] in, The sequence feature data after the length is restored for the current layer; The operation represents the sequence Repeat for each element of Second-rate, is the output of the attention layer, is the number of segments in each attention layer.

[0012] In a second aspect, a wellbore risk prediction system is provided, comprising: A data acquisition module, used to acquire the wellbore production data of the wellbore to be tested and perform preprocessing; A data selection module is used to select characteristic data in the preprocessed wellbore production data by using a statistical analysis method to obtain the first several characteristic data most relevant to the target in the wellbore production data of the wellbore to be tested; A standardization processing module is used to perform standardization processing on the selected feature data to obtain the standardized feature data; The prediction module is used to input the standardized feature data into the pre-trained multi-scale Transformer model to obtain the prediction result of the wellbore annulus pressure of the wellbore to be tested.

[0013] Furthermore, the multi-scale Transformer model includes: Input layer, used to input the standardized feature data; The linear transformation layer is used to perform linear transformation on the feature data after standardization; The position encoding embedding layer is used to add the position encoding to the linearly transformed feature data to incorporate the position information of the sequence; A segmentation module, used to segment the feature data after the position code is embedded; The attention layer is used to perform multi-head self-attention mechanism, residual connection and layer normalization on the segmented feature data to obtain sequence feature data of different scales; The length recovery module is used to restore the length of the sequence feature data after the multi-head self-attention mechanism by using the method of repeated elements and connect them to each other; LSTM layer, used to capture long-term and short-term dependencies and supplement sequence feature data that Transformer may ignore; The output layer is used to output the wellbore annulus pressure prediction results based on the supplemented sequence feature data.

[0014] In a third aspect, a processing device is provided, comprising computer program instructions, wherein the computer program instructions, when executed by the processing device, are used to implement the steps corresponding to the above-mentioned wellbore risk prediction method.

[0015] In a fourth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the above-mentioned wellbore risk prediction method.

[0016] The present invention adopts the above technical solution, which has the following advantages: 1. The present invention combines the Transformer model and the multi-scale mechanism to achieve high-precision prediction of the wellbore annulus pressure by accurately analyzing the time series of wellbore production data.

[0017] 2. The present invention adopts multi-scale time feature data analysis, optimizes the self-attention mechanism, and uses advanced statistical methods to perform precise feature data selection and data preprocessing, effectively capturing various data dynamics from short-term subtle changes to long-term trends, and can significantly improve the accuracy and effectiveness of wellbore risk prediction.

[0018] 3. The present invention proposes a multi-scale Transformer model, which is specially designed for wellbore risk prediction. By dividing the time series data into different scale segments, the model can independently apply the self-attention mechanism at each scale. This not only enhances the model's ability to capture short-term subtle changes, but also enhances the understanding of long-term trends, significantly improving the accuracy of wellbore annular pressure prediction, especially in predicting complex dynamic changes.

[0019] 4. The present invention determines the characteristic data most relevant to wellbore risk prediction through statistical analysis methods, such as the Pearson correlation coefficient method, which can not only optimize the input of the model, but also enhance the accuracy of the prediction. At the same time, in the preprocessing stage, the present invention uses a variety of methods to process the noise and missing values ​​in the original data to ensure the quality of the characteristic data.

[0020] 5. The present invention proposes the adjustment of the self-attention mechanism, the selection of segment length and the inter-layer connection strategy specific to wellbore risk prediction. The setting of multi-head attention enables the model to process multiple data feature data at the same time and capture the complex interactive relationship in the wellbore production data. By selecting the appropriate segment length, the model can capture data dependencies at different time scales. The optimization of the inter-layer connection strategy ensures the flow and integration of information in the deep network, avoids the problem of gradient disappearance, and enhances the learning ability and stability of the model.

[0021] In summary, the present invention can be widely used in the field of wellbore risk prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Throughout the accompanying drawings, the same reference numerals are used to represent the same components. In the accompanying drawings: Figure 1 is a schematic diagram of the structure of a multi-scale Transformer model provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of residual connection and layer normalization provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0024] It should be understood that the terms used in the text are only for the purpose of describing specific example embodiments, and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used in the text may also be represented to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of the stated characteristic data, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other characteristic data, steps, operations, elements, parts, and / or their combinations. The method steps, processes, and operations described in the text are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0025] Although the terms first, second, third, etc. can be used in the text to describe multiple elements, components, regions, layers and / or sections, these elements, components, regions, layers and / or sections should not be limited by these terms. These terms can only be used to distinguish an element, component, region, layer or section from another region, layer or section. Unless the context clearly indicates, terms such as "first", "second" and other numerical terms do not imply order or sequence when used in the text. Therefore, the first element, component, region, layer or section discussed below can be referred to as the second element, component, region, layer or section without departing from the teaching of the example embodiments.

[0026] Multiscale analysis: Multiscale analysis can provide a more comprehensive perspective when dealing with complex data, such as changes in time series. By analyzing data at multiple time scales, both rapid subtle changes and slow long-term trends can be captured simultaneously, leading to a deeper understanding and prediction of the dynamic changes in the wellbore environment.

[0027] Transformer model: The Transformer model is widely used in many fields due to its powerful data processing capabilities and efficient learning mechanism, especially in processing long time series data. Its self-attention mechanism enables the model to focus on the relationship between any two points in the sequence, improving the accuracy and efficiency of processing time series data.

[0028] In the prior art, although there are methods for risk prediction using artificial intelligence technology, such as LSTM-based models, these methods are often limited by the memory capacity of the model when processing complex time series data, making it difficult to capture long-term dependencies or respond quickly to short-term emergencies, and the scope of application of the solutions has many limitations. For example, traditional methods are subjective and have limited adaptability when processing complex data. Although deep learning methods perform well in data mining, they are insufficient in processing long-term dependencies and computational efficiency. Although the Transformer model has made some improvements on the long-distance dependency problem, when it is actually applied to wellbore risk prediction, the use of multi-scale time feature data is not sufficient, especially in the task of wellbore risk time series prediction. The embodiment of the present invention provides a wellbore risk prediction method, including: obtaining the wellbore production data of the wellbore to be tested and preprocessing it; using the Pearson correlation coefficient method to select the feature data in the preprocessed wellbore production data to obtain the first several feature data most relevant to the target in the wellbore production data of the wellbore to be tested; standardizing the selected feature data to obtain the standardized feature data; inputting the standardized feature data into a pre-trained multi-scale Transformer model to obtain the wellbore annulus pressure prediction result of the wellbore to be tested. The present invention combines the advantages of the Transformer's self-attention mechanism and multi-scale time analysis, with the aim of improving the accuracy of wellbore risk prediction, and by effectively capturing short-term and long-term data dependencies, it is more suitable for the rapidly changing deepwater oil and gas development environment. By introducing a multi-scale processing mechanism, the present invention can analyze the different levels of time series data more carefully, provide a more comprehensive and accurate risk assessment, and provide technical support for the safe production of deepwater oil and gas wells.

[0029] Example 1 This embodiment provides a wellbore risk prediction method, comprising the following steps: 1) Preprocess the wellbore production data to ensure that the acquired wellbore production data is clean, uniform in format and available. The wellbore production data includes characteristic data such as annular pressure, oil pressure, bottom hole temperature and bottom hole pressure, specifically: 1.1) Static value parameters in wellbore production data (such as wellbore number, production method number, etc.) and feature data with a missing rate exceeding 80% and a coverage lower than the preset coverage threshold are eliminated.

[0030] 1.2) Use interpolation, backward filling or forward filling to fill the missing data and obtain the preprocessed wellbore production data.

[0031] 2) The Pearson correlation coefficient method is used to select the feature data in the preprocessed wellbore production data to obtain the first several feature data in the wellbore production data that are most relevant to the target, thereby achieving data dimensionality reduction. The subsequent process only processes the selected several feature data.

[0032] Specifically, for the problem of high dimension of feature data in the wellbore production data set, the present invention adopts the Pearson correlation coefficient method to optimize the feature data in the preprocessed wellbore production data, and find the top seven feature data most relevant to the target, so as to ensure the feature data quality of the data. The Pearson correlation coefficient is: (1) in, For variables and Pearson correlation coefficient between them; is the length of the time series, and The index is A single sample point; and Variables and The Pearson correlation coefficient ranges from -1 to 1. The larger the absolute value of the coefficient, the stronger the linear relationship between the variables.

[0033] 3) For the problem of non-standardized units, several selected feature data are subjected to Z-Score standardization to obtain standardized feature data.

[0034] Specifically, the Z-Score standardization processing method can unify the magnitude of each drilling characteristic data to avoid different parameter influencing factors due to different data magnitudes. The formula is: (2) in, It is the original data after the feature data is filtered; is the average value of the data; is the standard deviation. After standardization, the obtained data is clean, in a uniform format and usable, which is conducive to inputting it into the model for training.

[0035] 4) If Figure 1 As shown in the figure, a multi-scale Transformer model is constructed, and the constructed multi-scale Transformer model is trained based on the standardized feature data, specifically: 4.1) Build a multi-scale Transformer model.

[0036] Specifically, the multi-scale Transformer model includes an input layer, a linear transformation layer, a position encoding embedding layer, a segmentation module, an attention layer, a length recovery module, an LSTM layer, and an output layer.

[0037] The input layer is used to input the standardized feature data.

[0038] The linear transformation layer is used to perform linear transformation on the standardized feature data.

[0039] The position encoding embedding layer is used to add position encoding to the linearly transformed feature data to incorporate the position information of the sequence and ensure that the model can recognize the temporal position relationship within the sequence.

[0040] The segmentation module is used to segment the feature data after the position encoding is embedded.

[0041] The attention layer is used to perform multi-head self-attention mechanism, residual connection and layer normalization on the segmented feature data to obtain sequence feature data of different scales.

[0042] The length recovery module is used to restore the length of the sequence feature data after the multi-head self-attention mechanism by adopting the method of repeating elements and connecting them to each other.

[0043] The LSTM layer is used to capture long-term and short-term dependencies, enhance the modeling capability of temporal dependency information of sequence feature data, and supplement the sequence feature data that the Transformer may ignore.

[0044] The output layer is used to output the wellbore annulus pressure prediction results based on the supplemented sequence feature data.

[0045] 4.2) Based on the standardized feature data, the constructed multi-scale Transformer model is trained: 4.2.1) Input the standardized feature data into the input layer.

[0046] 4.2.2) The standardized feature data is linearly transformed through a linear transformation layer to map the dimension of the feature data to a higher feature data space.

[0047] Specifically, consider the feature data after standardization as ,in, is the batch size, is the length of the time series, is the dimension of the feature data for each time step. The feature data input to the input layer passes through the linear transformation layer to obtain the feature data after linear transformation. for: (3) in, and are the weights and biases of the linear transformation layer respectively; is the mapping dimension.

[0048] 4.2.3) The linearly transformed feature data enters the position encoding embedding layer, and the position encoding is added to the linearly transformed feature data to merge the position information of the sequence to ensure that the model can recognize the temporal position relationship within the sequence. The formula is: (4) (5) in, Encodes the even-indexed positions for sine function calculations; Encodes the even-indexed positions for the cosine function calculations; is the position of the time step in the sequence; Is the dimension index.

[0049] 4.2.4) The segmentation module segments the feature data after the position code is embedded.

[0050] Specifically, before the data is input into each attention layer, it will go through a segmentation process, in which the segment length increases with each subsequent attention layer. The segmentation process ensures that the model can capture feature data at multiple scales. Shorter segments enable the model to capture short-term, fine-grained temporal feature data, which is very important for understanding rapid changes in the sequence. On the contrary, longer segments enable the model to understand long-term, coarse-grained temporal feature data, which helps the model grasp the overall trend and pattern of the sequence, so that the model can form a comprehensive, multi-level understanding of the time series.

[0051] After segmentation, the segment length of each feature data follows the binary series, and the length of each segment is {2, 4, 8, ..., 2 n This approach allows the model to gradually focus on wider parts of the feature data as it passes through the attention layers, thereby capturing feature data and patterns across different time scales.

[0052] 4.2.5) The segmented feature data is input into the multi-head self-attention mechanism of the corresponding attention layer, where the number of heads is set to 2: (6) in, is the attention layer, and the output result is the averaged attention layer score, which is used to extract the temporal local features at the current time scale; Respectively from derived query matrix, keyword matrix, and value matrix; is the dimension of the keyword vector, is the softmax function applied along the rows to obtain the normalized attention scores.

[0053] 4.2.6) If Figure 2 As shown, the method of repeating elements is used to restore the length of the sequence feature data after the multi-head self-attention mechanism and connect them to each other for further processing: (7) in, The sequence feature data after the length is restored for the current layer; The operation represents the sequence Repeat for each element of Second-rate, is the output of the attention layer, is the number of segments in each attention layer, ensuring that the output sequence The length of is the same as the length of the original sequence.

[0054] 4.2.7) Using the residual connection and layer normalization of the attention layer, the sequence feature data after the length is restored in this layer and the output data of the residual connection and layer normalization in the previous layer are used as the input of the residual connection and layer normalization in this layer, and the output data is used as one of the inputs of the residual connection and layer normalization in the next layer. Among them, the residual connection and layer normalization input of the first layer are the feature data after the original position encoding is embedded and the sequence feature data after the length is restored in the first layer: (8) in, The sequence feature data after restoring the length of the current layer is added to the output of the previous layer and then normalized. In this way, each attention layer can capture feature data of different scales and enhance the learning ability of the model through residual connections.

[0055] 4.2.8) The LSTM layer captures long-term and short-term dependencies, enhances the modeling capability of temporal dependency information of sequence feature data, and can supplement sequence feature data that Transformer may ignore.

[0056] 4.2.9) The output layer outputs the wellbore annulus pressure prediction results based on the supplemented sequence feature data, completing the training of the multi-scale Transformer model.

[0057] 5) Obtain the wellbore production data of the wellbore to be tested and perform preprocessing.

[0058] 6) The Pearson correlation coefficient method is used to select the feature data in the preprocessed wellbore production data to obtain the first several feature data most relevant to the target in the wellbore production data of the wellbore to be tested.

[0059] 7) Perform Z-Score normalization on the selected feature data to obtain the normalized feature data.

[0060] 8) The standardized feature data is input into the trained multi-scale Transformer model to obtain the prediction result of the annular pressure of the wellbore to be tested.

[0061] Example 2 This embodiment provides a wellbore risk prediction system.

[0062] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.

[0063] Example 3 This embodiment provides a processing device corresponding to the wellbore risk prediction method provided in Embodiment 1. The processing device can be applicable to a client processing device, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of Embodiment 1.

[0064] The processing device includes a processor, a memory, a communication interface and a bus, and the processor, the memory and the communication interface are connected through the bus to complete mutual communication. The memory stores a computer program that can be run on the processing device, and the processing device executes the wellbore risk prediction method provided in this embodiment 1 when running the computer program.

[0065] In some implementations, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage.

[0066] In some other implementations, the processor may be a central processing unit (CPU), a digital signal processor (DSP), or other general-purpose processors of various types, which are not limited herein.

[0067] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0068] Those skilled in the art will understand that the structure of the above-mentioned computing device is only a partial structure related to the solution of the present invention, and does not constitute a limitation on the computing device to which the solution of the present invention is applied. The specific computing device may include more or fewer components, or combine certain components, or have a different arrangement of components.

[0069] Example 4 This embodiment provides a computer program product corresponding to the wellbore risk prediction method provided in Example 1. The computer program product may include a computer-readable storage medium on which computer-readable program instructions for executing the wellbore risk prediction method described in Example 1 are loaded.

[0070] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.

[0071] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0072] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0073] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0074] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0075] The above embodiments are only used to illustrate the present invention, wherein the structure, connection mode and manufacturing process of each component may be changed. Any equivalent transformations and improvements based on the technical solution of the present invention should not be excluded from the protection scope of the present invention.

Claims

1. A wellbore risk prediction method, characterized in that: include: Acquire the wellbore production data of the wellbore to be tested and perform preprocessing; Using a statistical analysis method, the characteristic data in the pre-processed wellbore production data are selected to obtain the first several characteristic data most relevant to the target in the wellbore production data of the wellbore to be tested; Performing standardization processing on the selected feature data to obtain standardized feature data; The standardized feature data is input into the pre-trained multi-scale Transformer model to obtain the prediction result of the annular pressure of the wellbore to be tested.

2. A wellbore risk prediction method according to claim 1, characterized in that: The step of obtaining the wellbore production data of the wellbore to be tested and performing preprocessing includes: Eliminate static value parameters in wellbore production data and feature data whose missing rate exceeds a preset missing rate threshold and whose coverage is lower than a preset coverage threshold; The missing data are filled to obtain the preprocessed wellbore production data.

3. A wellbore risk prediction method according to claim 1, characterized in that: The Z-Score standardization method is used to standardize several selected feature data.

4. A wellbore risk prediction method according to claim 1, characterized in that: The multi-scale Transformer model includes: Input layer, used to input the standardized feature data; The linear transformation layer is used to perform linear transformation on the feature data after standardization; The position encoding embedding layer is used to add the position encoding to the linearly transformed feature data to incorporate the position information of the sequence; A segmentation module, used to segment the feature data after the position code is embedded; The attention layer is used to perform multi-head self-attention mechanism, residual connection and layer normalization on the segmented feature data to obtain sequence feature data of different scales; The length recovery module is used to restore the length of the sequence feature data after the multi-head self-attention mechanism by using the method of repeated elements and connect them to each other; LSTM layer, used to capture long-term and short-term dependencies and supplement sequence feature data that Transformer may ignore; The output layer is used to output the wellbore annulus pressure prediction results based on the supplemented sequence feature data.

5. A wellbore risk prediction method according to claim 4, characterized in that: The training process of the multi-scale Transformer model is: Input the standardized feature data into the input layer; The standardized feature data is linearly transformed through the linear transformation layer; The linearly transformed feature data enters the position encoding embedding layer, and the position encoding is added to the linearly transformed feature data to merge the position information of the sequence; The segmentation module segments the feature data after the position code is embedded; The segmented feature data is input into the multi-head self-attention mechanism of the corresponding attention layer; The method of repeated elements is used to restore the length of the sequence feature data after the multi-head self-attention mechanism and connect them to each other; The residual connection and layer normalization of the attention layer are used. The sequence feature data after the length restoration of this layer and the output data of the residual connection and layer normalization of the previous layer are used as the input of the residual connection and layer normalization of this layer. The output data is used as one of the inputs of the residual connection and layer normalization of the next layer, so that each attention layer captures feature data of different scales. The LSTM layer captures long-term and short-term dependencies and supplements the sequence feature data that the Transformer may ignore; The output layer outputs the wellbore annulus pressure prediction results based on the supplemented sequence feature data and completes the training of the multi-scale Transformer model.

6. A wellbore risk prediction method according to claim 5, characterized in that: The sequence feature data after the current layer restores the length is: in, The sequence feature data after the length is restored for the current layer; The operation represents the sequence Repeat for each element of Second-rate, is the output of the attention layer, is the number of segments in each attention layer.

7. A wellbore risk prediction system, characterized in that: include: A data acquisition module, used to acquire the wellbore production data of the wellbore to be tested and perform preprocessing; A data selection module is used to select characteristic data in the preprocessed wellbore production data by using a statistical analysis method to obtain the first several characteristic data most relevant to the target in the wellbore production data of the wellbore to be tested; A standardization processing module is used to perform standardization processing on the selected feature data to obtain the standardized feature data; The prediction module is used to input the standardized feature data into the pre-trained multi-scale Transformer model to obtain the prediction result of the wellbore annulus pressure of the wellbore to be tested.

8. A wellbore risk prediction system according to claim 7, characterized in that: The multi-scale Transformer model includes: Input layer, used to input the standardized feature data; The linear transformation layer is used to perform linear transformation on the feature data after standardization; The position encoding embedding layer is used to add the position encoding to the linearly transformed feature data to incorporate the position information of the sequence; A segmentation module, used to segment the feature data after the position code is embedded; The attention layer is used to perform multi-head self-attention mechanism, residual connection and layer normalization on the segmented feature data to obtain sequence feature data of different scales; The length recovery module is used to restore the length of the sequence feature data after the multi-head self-attention mechanism by using the method of repeated elements and connect them to each other; LSTM layer, used to capture long-term and short-term dependencies and supplement sequence feature data that Transformer may ignore; The output layer is used to output the wellbore annulus pressure prediction results based on the supplemented sequence feature data.

9. A processing device, characterized in that: It includes computer program instructions, wherein the computer program instructions, when executed by a processing device, are used to implement the steps corresponding to the wellbore risk prediction method described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the wellbore risk prediction method according to any one of claims 1 to 6.

Citation Information

Cited By

  • System dynamics tunnel construction environment dynamic evaluation method and system

    CN120975583A