Stratigraphic contrast semantic segmentation method and system based on attention mechanism

By introducing a semantic segmentation method for stratigraphic correlation using spatial and channel attention mechanisms, the problem of high computational complexity in multi-well stratigraphic correlation is solved, achieving rapid and accurate stratigraphic division and improving the efficiency of oil and gas exploration.

CN120974333APending Publication Date: 2025-11-18CHINA NAT PETROLEUM CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410607418.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing technologies have high computational complexity in multi-well stratigraphic correlation and cannot improve the correlation effect as the number of wells increases. They also lack learning ability, resulting in low efficiency in stratigraphic division.

Method used

A stratigraphic correlation semantic segmentation method based on attention mechanism is adopted, which introduces spatial attention mechanism and channel attention mechanism, and uses the semantic segmentation network U2-Net for training. Combined with label smoothing loss function and threshold optimization algorithm, the accuracy and efficiency of stratigraphic segmentation are improved.

Benefits of technology

It enables rapid and accurate stratigraphic division using fewer wells and less time, improving the accuracy and efficiency of stratigraphic correlation, and is suitable for intelligent multi-well analysis in oil and gas exploration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120974333A_ABST
    Figure CN120974333A_ABST
Patent Text Reader

Abstract

The invention discloses a stratigraphic contrast semantic segmentation method and system based on an attention mechanism, and the method comprises the steps: carrying out the processing of collected logging curve data and hierarchical data, and obtaining a sample curve and label data; based on the sample curve and the label data, a semantic segmentation network U2-Net is adopted as a reference model, a space attention mechanism and a channel attention mechanism are introduced for training, and a pre-training model is obtained; based on a space attention mechanism and a channel attention mechanism, the pre-training model extracts key position features and channel features of the to-be-measured well logging curve to achieve hierarchical category recognition of the to-be-measured well logging curve, and a hierarchical category result of the to-be-measured well logging curve is obtained; threshold constraint is carried out on the layering category result of the to-be-measured well logging curve, and a final layering category result of the to-be-measured well logging curve is obtained. According to the method, the space attention mechanism and the channel attention mechanism are introduced, horizon prediction is carried out at a high speed, and strata can be accurately and efficiently divided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of oil and gas exploration, and particularly relates to a stratum correlation semantic segmentation method and system based on an attention mechanism. BACKGROUND

[0002] Stratum correlation is an important part of reservoir description and multi-well evaluation in oil and gas field exploration and development work. In block geological evaluation, multi-well layering and stratum correlation account for more than half of the total evaluation workload. Realizing multi-well intelligent layering and stratum correlation can improve the accuracy of horizon division and greatly improve work efficiency, and is the key to intelligent analysis and evaluation of reservoirs.

[0003] There are many stratum correlation methods, and logging curves have high longitudinal resolution and can reflect the property changes of strata from different aspects. Therefore, using logging curves to divide and correlate strata has an absolute advantage; logging curves are essentially one-dimensional continuous data, and stratum correlation is a segmentation of one-dimensional data into segments with different semantics (i.e., different strata), which can be modeled as a one-dimensional semantic segmentation task.

[0004] In the prior art, an algorithm based on curve shape similarity is used for stratum correlation, but when the number of wells is large, the calculation complexity is high and the application effect is limited. In addition, this kind of method has no learning ability and cannot improve the correlation effect as the number of correlation wells increases; with the vigorous development of deep learning, it is gradually common to apply deep learning methods to the logging curve stratum correlation task. SUMMARY

[0005] The present application aims to provide a stratum correlation semantic segmentation method and system based on an attention mechanism, which realizes model training using fewer wells and less time, and horizon prediction at a faster speed, and can accurately and efficiently divide strata by introducing spatial attention mechanisms and channel attention mechanisms.

[0006] To achieve the above-mentioned purpose, the embodiments of the present application provide a stratum correlation semantic segmentation method based on an attention mechanism, comprising:

[0007] Processing the collected logging curve data and layering data to obtain sample curves and label data;

[0008] Based on the sample curves and label data, a semantic segmentation network U 2 -Net is used as a benchmark model and spatial attention mechanisms and channel attention mechanisms are introduced for training to obtain a pre-trained model;

[0009] Based on the spatial attention mechanism and the channel attention mechanism, the pre-training model realizes hierarchical category recognition of the to-be-tested well logging curve by extracting key position features and channel features of the to-be-tested well logging curve, and obtains a hierarchical category result of the to-be-tested well logging curve.

[0010] The hierarchical category result of the to-be-tested well logging curve is subjected to threshold constraint to obtain a final hierarchical category result of the to-be-tested well logging curve.

[0011] Further, the collected well logging curve data and hierarchical data are processed to obtain sample curves and label data, including:

[0012] The well logging curve data in the collection area is collected, well logging curves suitable for stratum correlation are selected and preprocessed to obtain preprocessed well logging curve data, that is, the sample curves are obtained;

[0013] The label data is obtained according to the hierarchical category data table; wherein the label data represents the hierarchical category corresponding to the sample curve;

[0014] The sample curve and the hierarchical category data table are combined to generate sample label data; the sample label data includes the sample curve and the label data;

[0015] The preprocessing includes invalid data processing, data alignment processing, multi-information fusion processing and data standardization processing.

[0016] Further, the spatial attention mechanism and the channel attention mechanism are introduced for training, including:

[0017] In the benchmark model, the spatial attention mechanism and the channel attention mechanism are introduced into the shallow encoder stage and the deep encoder stage of the benchmark model respectively to form a plurality of U-shaped spatial attention encoder stages USAE-H and a plurality of U-shaped channel attention encoder stages UCAE; wherein H represents height;

[0018] The network structure of the encoder stage USAE-H has an input channel number C in , an output channel number C out1 and C out2 , and a channel number M of the intermediate layer.

[0019] The network structure of the encoder stage UCAE has an input channel number C in , an output channel number C out1 and C out2 , and a channel number M of the intermediate layer.

[0020] Further, based on the spatial attention mechanism and the channel attention mechanism, the pre-training model realizes hierarchical category recognition of the to-be-tested well logging curve by extracting key position features and channel features of the to-be-tested well logging curve, and obtains a hierarchical category result of the to-be-tested well logging curve, including:

[0021] When the pre-training model predicts the to-be-tested well logging curve, each encoder stage USAE-H extracts features of the first feature curve x output by the previous stage, extracts key position features of the first feature curve x, and outputs the spatial attention adjusted feature curve to the corresponding U-shaped decoder stage;

[0022] Wherein, each encoder stage USAE-H outputs the second feature curve y1 to the next encoder stage USAE-H or UCAE, and outputs the feature curve y2 to the corresponding U-shaped decoder stage;

[0023] The pre-training model uses each encoder stage UCAE to extract features of the second feature curve y1 output by the previous encoder stage USAE-H or UCAE, and outputs to the next encoder stage UCAE or the corresponding U-shaped decoder stage;

[0024] Each U-shaped decoder stage splices and reconstructs the feature curve before receiving the feature curve output by the previous stage, and outputs the reconstructed feature curve to the next U-shaped decoder stage, while processing the reconstructed feature curve through convolution and activation function to obtain an intermediate probability map;

[0025] All intermediate probability maps are input into a feature map fusion model for fusion processing to obtain a total probability map, and the total probability map is subjected to category recognition to obtain a hierarchical category result of the to-be-tested well logging curve.

[0026] Further, each encoder stage USAE-H extracts features of the first feature curve x output by the previous stage to extract key position features of the first feature curve x, and outputs the spatial attention adjusted feature curve to the corresponding decoder stage, including:

[0027] Each encoder stage USAE-H inputs the first feature curve x output by the previous stage, converts the feature curve x(L×C in ) into an intermediate feature curve F1(x) with a channel number of C out1 by using a normal convolution layer to extract local features of the first feature curve x; wherein the first feature curve x is the feature curve x(L×C in );

[0028] input the intermediate feature curve F1(x) into a U-shaped symmetric encoder-decoder structure with a height of H for multi-scale feature extraction and coding to obtain multi-scale logging curve information U(F1(x));

[0029] fuse the local features and the multi-scale features through F1(x)+U(F1(x)) to obtain a feature curve y1(LxC out1 ) and output to a next encoder stage USAE-H or UCAE; wherein the feature curve y1(LxC out1 ) is a second feature curve y1.

[0030] Meanwhile, input the second feature curve y1 into a spatial attention module SAM for extraction to obtain key position features of the second feature curve y1.

[0031] Further, input the second feature curve y1 into the spatial attention module SAM for extraction to obtain key position features of the second feature curve y1, including:

[0032] respectively perform maximum pooling and average pooling operations on the feature curve y1(LxC out1 ) in the channel dimension to obtain two feature curves and wherein, represents a maximum-pooled feature in the channel dimension, represents an average-pooled feature in the channel dimension;

[0033] concatenate and convolve and in the channel dimension in sequence to obtain a feature vector y m (LxC), and obtain a spatial attention feature vector M m (LxC) based on the feature vector y s (LxC) through a sigmoid activation function;

[0034] multiply the spatial attention feature vector M s (LxC) with the feature curve y1(LxC out1 ) to obtain a spatial attention-adjusted feature curve y2(LxC out2 ) and output to a corresponding U-shaped decoder stage; wherein the feature curve y2(LxC out2 ) includes key position features of the second feature curve y1.

[0035] Further, use each encoder stage UCAE to extract features of the second feature curve y1 output by a previous encoder stage USAE-H or UCAE and output to a next encoder stage UCAE or a corresponding U-shaped decoder stage, including:

[0036] Each encoder stage UCAE inputs a second feature curve y1, converts the input feature curve y1(LxC out1 ) into an intermediate feature curve F2(x) with a channel number of C out1 using a convolutional layer for local feature extraction of the second feature curve y1; wherein the second feature curve y1 is the feature curve y1(LxC out1 );

[0037] F2(x) is input into a U-shaped symmetric encoder-decoder structure for multi-scale feature extraction and encoding to obtain multi-scale feature curve information U(F2(x));

[0038] F2(x)+U(F2(x)) is used to fuse local features and multi-scale features to obtain a feature curve y3(LxC out1 ) and output to the next encoder stage UCAE, while the feature curve y3(LxC out1 ) is input into a channel attention module CAM to obtain key channel features of the feature curve y3(LxC out1 ) and output to the corresponding U-shaped decoder stage; or,

[0039] When the current encoder stage UCAE is the last U-shaped channel attention encoder stage UCAE, F2(x)+U(F2(x)) is used to fuse local features and multi-scale features to obtain a feature curve y3(LxC out1 ), the feature curve y3(LxC out1 ) is input into a channel attention module CAM to obtain key channel features of the feature curve y3(LxC out1 ) and output to the next U-shaped decoder stage.

[0040] Further, the feature curve y3(LxC out1 ) is input into a channel attention module CAM to obtain key channel features of the feature curve y3(LxC out1 ) and output, including:

[0041] In the spatial dimension, maximum pooling and average pooling operations are respectively performed on the feature curve y3(LxC out1 ) to obtain two feature curves and wherein, represents the maximum pooled feature in the spatial dimension, represents the average pooled feature in the spatial dimension;

[0042] The two feature curves and The input is fed into a shared multilayer perceptron to obtain two feature curves of size 1×C. The two feature curves of size 1×C are then summed element-wise and a sigmoid operation is performed to generate a channel attention feature vector M. c (1×C);

[0043] Channel attention feature vector M c (1×C) and the one-dimensional characteristic curve y3(L×C) out1 Multiply by , and obtain the one-dimensional feature curve y4(L×C) for channel attention adjustment. out2 ), that is, to obtain the characteristic curve y3(L×C out1 ) channel characteristics.

[0044] Furthermore, based on the characteristics of the logging curve to be tested, a pre-trained model is used to predict the hierarchical category of the logging curve to be tested, obtaining the hierarchical category results of the logging curve to be tested, including:

[0045] Before receiving the feature curve output by the previous stage, each U-shaped decoder stage of the pre-trained model concatenates the feature curve output by the corresponding encoder stage USAE-H or UCAE with the feature curve output by the previous U-shaped decoder stage or the previous encoder stage UCAE to obtain the concatenated feature curve; wherein, the feature curve output by the previous U-shaped decoder stage is the feature curve reconstructed by the previous U-shaped decoder stage.

[0046] The spliced ​​feature curves are input into the corresponding U-shaped decoder stage. Each U-shaped decoder stage reconstructs the spliced ​​feature curves to obtain the reconstructed feature curves and outputs them to the next U-shaped decoder stage. At the same time, the reconstructed feature curves are processed by convolution and activation functions to obtain intermediate probability maps.

[0047] All intermediate probability maps are input into the feature map fusion model for fusion processing to obtain the total probability map. The total probability map is then used for category identification to obtain the preliminary hierarchical category results of the logging curve to be measured.

[0048] A threshold optimization algorithm is used to constrain the preliminary stratification results to obtain a more accurate final stratification result, which is the final stratification result of the logging curve to be tested.

[0049] Furthermore, during the training of the baseline model, a label smoothing strategy is introduced into the loss function of the pre-trained model, including:

[0050] The distribution of label data y k Perform label smoothing to obtain the distribution of smoothed label data And utilize the distribution of smoothed label data Distribution of Alternative Label Data yk ; wherein the distribution of the smoothed label data is obtained by

[0051]

[0052] denotes the new label distribution, i.e. the distribution of the smoothed label data, K denotes the number of classes of the label data; y k denotes the original label distribution, i.e. the distribution of the label data; a denotes the label smoothing parameter;

[0053] based on the distribution of the smoothed label data The cross-entropy loss formula after introducing the label smoothing is obtained as:

[0054]

[0055] In the formula, H(y, p) denotes the cross-entropy loss, p denotes the hierarchical class probability value predicted by the pre-trained model for the sample curve; K denotes the number of classes of the label data, k denotes the kth hierarchical class; p k denotes the kth hierarchical class probability value predicted by the pre-trained model for the single sample curve data;

[0056] According to the cross-entropy loss formula after introducing the label smoothing, the loss function of the pre-trained model is obtained; wherein the loss of the pre-trained model is the sum of the loss of the intermediate probability map and the loss of the total probability map;

[0057] The loss function of the pre-trained model is:

[0058]

[0059] In the formula, L denotes the total loss of the pre-trained model, denotes the loss of the intermediate probability map, l fuse denotes the loss of the total probability map, M denotes the total number of intermediate probability maps, and m denotes the mth intermediate probability map.

[0060] Further, the threshold constraint is performed on the hierarchical class result of the to-be-tested well logging curve to obtain the final hierarchical class result of the to-be-tested well logging curve, including:

[0061] In the prediction stage of the pre-trained model, a threshold optimization algorithm is introduced, i.e. a threshold value in a predetermined range is set for the hierarchical class result predicted by the pre-trained model, and the best threshold value is obtained by using grid search calculation to improve the prediction accuracy of the pre-trained model;

[0062] wherein, for the threshold value in the predetermined range, the best threshold value is obtained by using grid search calculation, including: ​​

[0063] The threshold value is sequentially adjusted in steps within a predetermined range of the threshold value, and the adjusted threshold value is compared with the confidence of the predicted category, so that the threshold value with the highest prediction result accuracy is found from all values of the threshold value as the optimal threshold value.

[0064] Based on the same inventive concept, the embodiment of the present application also provides a stratum contrast semantic segmentation system based on an attention mechanism, comprising:

[0065] A preprocessing unit is configured to process the collected well logging curve data and stratum data to obtain sample curves and label data.

[0066] A training unit is configured to train a semantic segmentation network U2-Net as a benchmark model and introduce a spatial attention mechanism and a channel attention mechanism based on the sample curves and the label data to obtain a pre-training model.

[0067] A prediction unit is configured to perform stratum category identification of the to-be-tested well logging curve by extracting key position features and channel features of the to-be-tested well logging curve based on the spatial attention mechanism and the channel attention mechanism and the pre-training model to obtain a stratum category result of the to-be-tested well logging curve.

[0068] A constraint unit is configured to perform threshold constraint on the stratum category of the to-be-tested well logging curve to obtain a final stratum category result of the to-be-tested well logging curve.

[0069] Based on the same inventive concept, the embodiment of the present application also provides an electronic device comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program or instructions to implement the aforementioned stratum contrast semantic segmentation method based on an attention mechanism.

[0070] Based on the same inventive concept, the embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores computer programs or instructions, and the computer programs or instructions are executed by a processor to implement the aforementioned stratum contrast semantic segmentation method based on an attention mechanism.

[0071] Based on the same inventive concept, the embodiment of the present application also provides a computer program product comprising computer programs or instructions, and the computer programs or instructions are executed by a processor to implement the aforementioned stratum contrast semantic segmentation method based on an attention mechanism.

[0072] Technical effects and advantages of the present application: the present application uses semantic segmentation network U2-Net as a benchmark model (also called baseline), introduces a label smoothing loss function to fully consider data imbalance and larger loss due to the similarity between different layer data; at the same time, the spatial attention mechanism and the channel attention mechanism are introduced into the shallow and deep encoder stages of the benchmark model U2-Net to obtain an improved benchmark model (i.e. pre-training model), so as to better pay attention to the change of hierarchical position; finally, a threshold optimization algorithm is proposed in the prediction stage of the pre-training model to constrain the hierarchical result, solving the problem of prediction accuracy decline caused by accidental layer repetition; the present application can use fewer wells and less time for model training, and at the same time, it can predict layer position at a faster speed, accurately and efficiently divide strata, and has good application value.

[0073] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and achieved by the structures indicated in the specification, claims and drawings. BRIEF DESCRIPTION OF DRAWINGS

[0074] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0075] Figure 1 The flow chart of the stratum correlation semantic segmentation method based on attention mechanism in the embodiment of the present application;

[0076] Figure 2 The overall network structure diagram of the stratum correlation semantic segmentation method based on attention mechanism in the embodiment of the present application;

[0077] Figure 3 The grid structure diagram of the U-shaped spatial attention encoder stage in the embodiment of the present application;

[0078] Figure 4 The network structure diagram of the U-shaped channel attention encoder stage in the embodiment of the present application;

[0079] Figure 5 The pseudo code diagram of the hierarchical constraint algorithm in the embodiment of the present application;

[0080] Figure 6 The structure diagram of the stratum correlation semantic segmentation system based on attention mechanism in the embodiment of the present application;

[0081] Figure 7 Fig. 1 is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0082] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0083] To solve the problems in the prior art, the embodiments of the present application disclose a stratum comparison semantic segmentation method based on an attention mechanism, as shown in Figure 1 The method comprises the following steps:

[0084] Step S1: processing collected well logging curve data and stratum classification data to obtain sample curves and label data; specifically including:

[0085] Collecting well logging curve data of 119 wells in a region, selecting well logging curves (such as GR, RT, and DEN well logging curves) suitable for stratum comparison, and pre-processing to obtain pre-processed well logging curve data, i.e., to obtain the sample curves;

[0086] Obtaining the label data according to the stratum classification data table; wherein the label data is the stratum classification corresponding to the sample curves; wherein the label data is the stratum classification corresponding to the sample curves, as shown in Table 1:

[0087] Table 1: Example of label data

[0088] GR RT DEN Horizon name 101.265 3.75 2.249 L1 99.98 3.754 2.251 L1 99.638 3.826 2.251 L1 99.895 3.908 2.255 L1 101.522 3.989 2.259 L1 102.72 4.071 2.268 L1 105.203 4.14 2.271 L1 … … … …

[0089] Each column of data represents a category of label data;

[0090] Combining the sample curves and the stratum classification data table to generate sample label data; the sample label data comprises sample curves and label data;

[0091] The pre-processing comprises invalid data processing, data alignment processing, multi-information fusion processing, and data standardization processing.

[0092] The invalid data processing on the well logging curves comprises deleting zero values at both ends of the well logging curves and invalid values (such as -99999, etc.).

[0093] The data alignment processing on the well logging curves comprises calculating the number of data points of GR, RT, and DEN in all wells respectively to obtain a data point number list L GR , L RT, L DEN Since the median can reflect the central tendency of the data, the maximum of the medians of the respective lists is taken as the alignment reference, and the logging curve data length in each well is aligned to the same size.

[0094] The multi-information fusion processing of the logging curve includes: mapping multiple types of logging curves to different channels, so that the pre-trained model in the training can learn multi-dimensional information.

[0095] The logging curve is subjected to data standardization processing by the following formula:

[0096] Z=(X-μ) / σ,

[0097] In the formula, Z represents the standardized logging curve, X represents the logging curve to be standardized, μ represents the average value of the logging curve, and σ represents the standard deviation of the logging curve.

[0098] Step S2: Based on the sample curve and the label data, a semantic segmentation network U2-Net is used as a benchmark model and a spatial attention mechanism and a channel attention mechanism are introduced for training to obtain a trained benchmark model, i.e. a pre-trained model; specifically including:

[0099] (1) Based on the sample curve and the label data, a semantic segmentation network U2-Net is used as a benchmark model for training, and during the training process, a spatial attention mechanism and a channel attention mechanism are introduced into the shallow encoder stage (specifically the first four encoder stages) and the deep encoder stage (specifically the last two encoder stages) of the benchmark model, as shown in Figure 2 to form four U-shaped spatial attention encoder stages USAE-H and two U-shaped channel attention encoder stages UCAE; wherein H represents the height within the encoder stage.

[0100] Among them, the network structure of the encoder stage USAE-H has an input channel number C in , an output channel number C out1 and C out2 , and a channel number M of the intermediate layer; the network structure of the encoder stage UCAE has an input channel number C in , an output channel number C out1 and C out2 , and a channel number M of the intermediate layer.

[0101] Among them, in different encoder stages, the actual values of the channel numbers are not the same, and only the same letters are used to represent the number of channels.

[0102] Based on the introduced spatial attention mechanism and channel attention mechanism, the model learns and extracts the features of the sample curve once for each training, realizing the feature recognition of the sample curve.

[0103] wherein the pre-training model in the training process (i.e., attention U 2 The feature extraction process of the sample curve by the pre-training model in the training process (i.e., attention U

[0104] In one training process, based on the features of the sample curve identified by the pre-training model, the pre-training model predicts the layer-by-layer category of the measured well logging curve to obtain the layer-by-layer category result of the sample curve; wherein the prediction process of the pre-training model on the sample curve is consistent with the prediction process of the pre-trained model on the measured well logging curve.

[0105] After the training and prediction process of the pre-training model is completed, the layer-by-layer category result of the sample curve is compared with the standard layer-by-layer category data to analyze whether the loss obtained this time converges, and if not, the next round of model iteration training is continued until the loss of the layer-by-layer category result of the sample curve obtained by the pre-training model converges.

[0106] (2) In the training process of the pre-training model, a label smoothing strategy is introduced into the loss function of the pre-training model, including:

[0107] The distribution y k of the label data is smoothed to obtain the distribution y of the smoothed label data, and the distribution y of the smoothed label data is used to replace the distribution y k of the label data; wherein the distribution y of the smoothed label data is obtained by the following formula:

[0108]

[0109] In the formula, represents a new label distribution, i.e., the distribution of the smoothed label data, K represents the number of label data categories; y k represents the original label distribution, i.e., the distribution of the label data; and a represents a label smoothing parameter. In the embodiment of the present application, the layer-by-layer category includes 7 categories, i.e., L1-L7, so K = 7.

[0110] Based on the distribution y of the smoothed label data, the cross-entropy loss formula after introducing the label smoothing is obtained as follows:

[0111]

[0112] In the formula, H(y, p) represents the cross-entropy loss, p represents the hierarchical class probability value predicted by the pre-training model for the sample curve; K represents the number of classes of the label data, and k represents the kth hierarchical class; p k represents the kth hierarchical class probability value predicted by the pre-training model for a single sample curve data;

[0113] If the real class corresponding to a sample curve is L1, when the pre-training model predicts which class the sample curve data point belongs to, a hierarchical class probability value list [P1, P2, P3, P4, P5, P6, P7] corresponding to hierarchical classes L1-L7 is obtained, the sum of the values in the list is 1, and the pre-training model selects the maximum hierarchical class probability value as the predicted class; for example, if P1 is the maximum, the model predicts the class to be L1, if P2 is the maximum, the model predicts the class to be L2, and so on.

[0114] According to the cross-entropy loss formula after introducing label smoothing, the loss function of the pre-training model is obtained; wherein the loss function of the pre-training model is the sum of the loss of the intermediate probability map and the total probability map;

[0115] The loss function of the pre-training model is:

[0116]

[0117] In the formula, L represents the total loss of the pre-training model, represents the loss of the intermediate probability map, l fuse represents the loss of the total probability map, M represents the total number of intermediate probability maps, and m represents the mth intermediate probability map.

[0118] Step S3: Based on the spatial attention mechanism and the channel attention mechanism, the pre-training model realizes hierarchical class identification of the to-be-tested well logging curve by extracting key position features and channel features of the to-be-tested well logging curve, and obtains a hierarchical class result of the to-be-tested well logging curve; specifically including:

[0119] Step S31: When the pre-training model predicts the to-be-tested well logging curve, the first feature curve x output by the previous stage is input into each encoder stage USAE-H to extract multi-scale features and key position features of the first feature curve x and output to the corresponding U-shaped decoder stage; wherein each encoder stage USAE-H outputs a second feature curve y1 to the next encoder stage USAE-H or UCAE, and outputs a feature curve y2 to the corresponding U-shaped decoder stage. As shown in Figure 3 , specifically including the following processes:

[0120] Firstly, each encoder stage USAE-H inputs the first feature curve x output by the previous stage, converts the feature curve x (LxCin) into an intermediate feature curve F1(x) with a channel number of Cout1 using a general convolution layer, and performs local feature extraction on the first feature curve x; wherein the first feature curve x is the feature curve x (LxCin).

[0121] Secondly, the intermediate feature curve F1(x) is input into a U-shaped symmetric encoder-decoder structure with a height of H for multi-scale feature extraction and encoding to obtain multi-scale logging curve information U(F1(x)); the specific process is as follows:

[0122] The multi-scale feature is extracted from the intermediate feature curve F1(x) through downsampling; the multi-scale feature is encoded through progressive upsampling, splicing and convolution to obtain a high-resolution feature curve, i.e., multi-scale information U(F1(x)), so as to alleviate the fine loss caused by direct upsampling of large scales; wherein the greater the H is, the deeper the depth of the entire model is, the more the pooling operations are, the larger the receptive field range is, and the richer the extracted local and global features are.

[0123] Finally, the fusion of local features and multi-scale features is realized through F1(x)+U(F1(x)) to obtain a feature curve y1(LxCout1) and output to the next encoder stage USAE-H or UCAE; meanwhile, the second feature curve y1 is input into a spatial attention module (SAM, Spatial Attention Module) for extraction to obtain key position features of the second feature curve y1.

[0124] In some specific embodiments, the second feature curve y1 is input into the spatial attention module SAM for extraction to obtain key position features of the second feature curve y1, including the following process:

[0125] In the channel dimension, maximum pooling and average pooling operations are respectively performed on the feature curve y1 (LxC out1 ) to obtain two feature curves and wherein, represents the maximum pooled feature in the channel dimension, represents the average pooled feature in the channel dimension; wherein the feature curve y1 (LxC out1 ) is the second feature curve y1.

[0126] The and are sequentially spliced and convolved in the channel dimension (the output channel number defined in the convolution operation is the same as the input channel number of the input feature curve y1) to obtain a feature vector y m(LxC) and based on the feature vector y m (LxC) obtains a one-dimensional spatial attention feature vector M through a sigmoid activation function s (LxC);

[0127] The spatial attention feature vector M s (LxC) is multiplied with the feature curve y1(LxC out1 ) (the multiplication process is equivalent to giving different weights to different positions of the feature curve y1) to obtain a spatial attention adjusted feature curve y2(LxC out2 ) and output to the corresponding U-shaped decoder stage; wherein the feature curve y2(LxC out2 ) includes key position features of the second feature curve y1.

[0128] The spatial attention adjusted feature curve y2(LxC out2 ) is calculated by the following formula:

[0129]

[0130] In the formula, σ represents a sigmoid function, represents a convolution operation with a convolution kernel size of 7, MaxPool(y1) represents a feature curve y1 after maximum pooling, and AvgPool(y1) represents a feature curve y1 after average pooling.

[0131] It should be noted that the input and output of the encoder stage USAE-H: when the first feature curve x is input into the first encoder stage USAE-H (E1), the output feature curve y1(LxC out1 ) is output to the next encoder stage USAE-H, at this time the first feature curve x input into the second encoder stage USAE-H (E2) is actually the feature curve y1(LxC out1 ), and the input and output of the subsequent encoder stages USAE-H are the same, and so on.

[0132] The present application introduces a spatial attention mechanism into the first four encoder stages (E1-E4) of the baseline model U2-Net to form four U-shaped spatial attention encoder stages USAE-H. The improved encoder stage USAE-H can help the model better understand, learn and process input curve data, and at the same time focus more attention on the key areas in the input curve data.

[0133] Step S32: The pre-trained model uses each encoder stage UCAE to perform feature extraction on the second feature curve y1 output by the previous encoder stage USAE-H or UCAE and outputs to the next encoder stage UCAE or the corresponding U-shaped decoder stage; for example,Figure 4 As shown, specifically includes the following processes:

[0134] Each encoder stage UCAE inputs a second feature curve y1, converts the input feature curve y1(LxC out1 ) into an intermediate feature curve F2(x) with a channel number of C out1 using a convolution layer to perform local feature extraction of the second feature curve y1; F2(x) is input into a U-shaped symmetric encoder-decoder structure to extract and encode multi-scale features, obtaining multi-scale feature curve information U(F2(x)); wherein the second feature curve y1 is the feature curve y1(LxC out1 );

[0135] Through F2(x)+U(F2(x)), the local features and multi-scale features are fused to obtain a feature curve y3(LxC out1 ) and output to the next encoder stage UCAE, while the feature curve y3(LxC out1 ) is input into a channel attention module (CAM) to adjust the weights between different channels at low resolution, and obtain the key channel features of the feature curve y3(LxC out1 ) and output to the corresponding U-shaped decoding stage; or,

[0136] When the current encoder stage UCAE is the last U-shaped channel attention encoder stage UCAE, through F2(x)+U(F2(x)), the local features and multi-scale features are fused to obtain a feature curve y3(LxC out1 ), and the feature curve y3(LxC out1 ) is input into a channel attention module (CAM) to adjust the weights between different channels at low resolution, and obtain the key channel features of the feature curve y3(LxC out1 ) and output to the corresponding U-shaped decoder stage.

[0137] It should be noted that the two U-shaped channel attention encoder stages UCAE are respectively the encoder stage E5 and the encoder stage E6, the encoder stage E5 has two output feature curves y3(LxC out1 ) and y4(LxC out2 ) output to the encoder stage E6 (i.e. the second feature curve y1(LxC out1 ) input to the encoder stage E6 is actually y3(LxC out1 )) and the U-shaped decoder stage D5, while the encoder stage E6 has only one output feature curve y4(LxC out2 ) output to the U-shaped decoder stage D5 due to its location at the bottom end of the U-shaped structure.

[0138] In some specific embodiments, the feature curve y3(LxC out1 ) is input into the channel attention module CAM to obtain the key channel features of the feature curve y3(LxC out1 ) and output, including:

[0139] In the spatial dimension, the feature curve y3(LxC out1 ) is respectively subjected to a max-pooling operation and an average-pooling operation to obtain two feature curves and wherein, represents the max-pooling feature in the spatial dimension, represents the average-pooling feature in the spatial dimension;

[0140] The two feature curves and are input into a shared multi-layer perception to obtain two feature curves with a size of 1xC, and the two feature curves with a size of 1xC are subjected to an element-wise addition and then a Sigmoid operation to generate a channel attention feature vector M c (1xC).

[0141] The channel attention feature vector M c (1xC) is multiplied with the feature curve y3(LxC out1 ) to obtain a channel attention adjusted feature curve y4(LxC out2 ); wherein, the feature curve y4(LxC out2 ) is obtained, and the channel features of the feature curve y3(LxC out1 ) are known.

[0142] wherein, the channel attention adjusted feature curve y4(LxC out2 ) is obtained by:

[0143] y4=σ(MLP(MaxPool(y3)+AvgPool(y3))),

[0144] wherein, σ represents a sigmoid function, MLP contains a hidden layer, and in order to reduce the parameter overhead, the number of channels of the hidden layer is set to C / r (r is a reduction ratio); MaxPool(y3) represents the feature curve y1 subjected to the max-pooling, and AvgPool(y3) represents the feature curve y1 subjected to the average-pooling.

[0145] The application introduces a channel attention mechanism into the last two encoder stages (E5-E6) of the benchmark model to form two U-shaped channel attention encoder stages UCAE, so that the improved encoder stage UCAE can help the benchmark model adjust the weight information between different channels at a low resolution, identify the key channels in the input curve data, and concentrate more attention on these channels, thereby further improving the feature extraction capability of the benchmark model.

[0146] The UCAE network structure is shown in Figure 4 Since the input feature curve resolution of the two encoder stages UCAE is relatively low, further using a pooling operation will cause the loss of useful information, so an extended convolution is used to replace the pooling and up-sampling operations; and the application inputs the feature curve y3 (LxC out1 ) to a channel attention module CAM instead of a spatial attention module, because the spatial information of the low-resolution feature curve is less, and the spatial attention mechanism cannot work well, while the channel attention mechanism can adjust the weight between different channels at a low resolution.

[0147] Before each U-shaped decoder stage of the pre-trained model receives the feature curve output by the previous stage (the previous decoder stage and the previous encoder stage), the feature curve output by the corresponding encoder stage USAE-H or UCAE is spliced with the feature curve output by the previous U-shaped decoder stage or the previous encoder stage UCAE to obtain a spliced feature curve; wherein the feature curve output by the previous U-shaped decoder stage is the reconstructed feature curve of the U-shaped decoder stage;

[0148] The spliced feature curve is input into the corresponding U-shaped decoder stage, and each U-shaped decoder stage reconstructs the spliced feature curve to obtain a reconstructed feature curve and output to the next U-shaped decoder stage, and the reconstructed feature curve is processed through convolution and an activation function to obtain an intermediate probability map;

[0149] All intermediate probability maps are input into a feature map fusion model for fusion processing to obtain a total probability map, and the total probability map is subjected to category recognition to obtain a layered category result of the measured well curve.

[0150] Step S4: threshold constraint is performed on the layered category result of the measured well curve to obtain a final layered category result of the measured well curve, including:

[0151] In the layered category result predicted by the pre-trained model, the confidence of each data point belonging to each category can be obtained, and in the prior art, the category with the maximum confidence should be taken as the predicted category; however, in order to ensure the sequence of layers, the confidence of the actual category of a small number of data points may not be the maximum;

[0152] Therefore, in order to solve the problem of layer position repetition in the prediction result of the pre-trained model in the prior art, a threshold optimization algorithm is introduced in the prediction stage of the pre-trained model, that is, a threshold in a predetermined range is set for the layer classification result predicted by the pre-trained model, and the best threshold is obtained by using grid search calculation, so as to improve the prediction accuracy of the pre-trained model.

[0153] That is, a threshold in a predetermined range is set for the layer classification result predicted by the pre-trained model, and the best threshold is obtained by using grid search calculation; the pseudo code of the layer constraint algorithm is as shown in Figure 5 ;

[0154] Among them, for the threshold in the predetermined range, the best threshold is obtained by using grid search calculation, and the specific operation is as follows:

[0155] The threshold is adjusted in steps within the predetermined range of the threshold, and after comparison between the adjusted threshold and the confidence of the predicted category, the threshold with the highest prediction result accuracy among all values of the threshold is found as the best threshold.

[0156] It should be noted that the U-shaped decoder stage (D1-D5) has a similar structure to the symmetrical encoder stage (E1-E5), but there is no spatial attention module (SAM) and channel attention coding (CAM) in each decoder stage, and the input and output channel numbers of each U-shaped decoder stage are different from the input and output channel numbers of the corresponding encoder stage.

[0157] Using the method in the application, the training time of 30 epochs is 0.5 hours (the model has converged at the 20th epoch), the prediction time is 5 seconds, and all 7 layer positions of 20 wells to be predicted are predicted at a time. The stratigraphic correlation result can reach an accuracy of 90.71%, 97.86%, and 99.29% within an error range of 1m, 2m, and 3m, respectively.

[0158] Based on the same inventive concept, the embodiments of the application also provide a stratigraphic correlation semantic segmentation system based on an attention mechanism, as shown in Figure 6 , comprising:

[0159] A preprocessing unit is configured to process the collected logging curve data and layering data to obtain sample curves and label data;

[0160] A training unit is configured to train a semantic segmentation network U2-Net as a benchmark model and introduce a spatial attention mechanism and a channel attention mechanism based on the sample curves and the label data, to obtain a trained attention benchmark model, i.e., a pre-trained model;

[0161] The prediction unit is configured to perform hierarchical category recognition on the to-be-tested well logging curve based on the spatial attention mechanism and the channel attention mechanism, and obtain a hierarchical category result of the to-be-tested well logging curve.

[0162] The constraint unit is configured to perform threshold constraint on the hierarchical category result of the to-be-tested well logging curve, and obtain a final hierarchical category result of the to-be-tested well logging curve.

[0163] As to the system in the above-mentioned embodiments, the specific manner in which each unit module performs operations has been described in detail in the embodiments of the method, and will not be described in detail here.

[0164] Based on the same inventive concept, the embodiments of the present application also provide an electronic device, as shown in the structure Figure 7 The processor executes the computer program or instructions to implement the aforementioned attention mechanism-based formation contrast semantic segmentation method.

[0165] Based on the same inventive concept, the embodiments of the present application also provide a computer storage medium, which stores computer programs or instructions, and the computer programs or instructions are executed by a processor to implement the aforementioned attention mechanism-based formation contrast semantic segmentation method.

[0166] Based on the same inventive concept, the embodiments of the present application also provide a computer program product, which includes computer programs or instructions, and the computer programs or instructions are executed by a processor to implement the aforementioned attention mechanism-based formation contrast semantic segmentation method.

[0167] The above results show that the method of the present application can accurately and efficiently divide the formation. In addition, compared with the semantic segmentation method used by many current researchers, the model baseline used in the present application can more effectively perform formation contrast. By introducing the attention mechanism and the label smoothing strategy, the present application successfully further improves the accuracy of formation contrast without increasing the computational cost.

[0168] Finally, it should be noted that: the above only describes the preferred embodiments of the present application, and is not used to limit the present application, although the present application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced, any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application, should be included in the protection scope of the present application.

Claims

1. A semantic segmentation method based on attention mechanism stratigraphic correlation, characterized in that, The method comprises the following steps: Processing the collected well logging curve data and layering data to obtain sample curves and label data; Based on the sample curve and the label data, a semantic segmentation network U 2 -Net as a benchmark model and introduce spatial attention mechanism and channel attention mechanism for training, obtain a pre-training model; Based on the spatial attention mechanism and the channel attention mechanism, the pre-training model realizes the layering category identification of the to-be-tested well logging curve by extracting the key position features and channel features of the to-be-tested well logging curve, and obtains the layering category result of the to-be-tested well logging curve. The threshold constraint is performed on the layering category result of the to-be-tested well logging curve to obtain the final layering category result of the to-be-tested well logging curve.

2. The attention mechanism based formation contrast semantic segmentation method according to claim 1, characterized in that, Processing the collected well logging curve data and layering data to obtain sample curves and label data, comprising: Collecting well logging curve data in the region, selecting well logging curves suitable for stratum correlation, and pre-processing to obtain pre-processed well logging curve data, i.e. the sample curves; According to the layering category data table, the label data is obtained; wherein the label data represents the layering category corresponding to the sample curve; The sample curves and the layering category data table are combined to generate sample label data; the sample label data comprises sample curves and label data; The pre-processing comprises invalid data processing, data alignment processing, multi-information fusion processing and data standardization processing.

3. The attention mechanism based stratigraphic contrastive semantic segmentation method according to claim 1, characterized in that, The spatial attention mechanism and the channel attention mechanism are introduced for training, comprising: In the benchmark model, the spatial attention mechanism and the channel attention mechanism are introduced into the shallow encoder stage and the deep encoder stage of the benchmark model respectively to form multiple U-shaped spatial attention encoder stages USAE-H and multiple U-shaped channel attention encoder stages UCAE; wherein H represents height; The network structure of the encoder stage USAE-H has an input channel number C in , an output channel number C out1 , and a channel number M of an intermediate layer out2 . The number of input channels in the network structure of the encoder stage UCAE is C. in The number of output channels is C out1 and C out2 The number of channels in the intermediate layer is M.

4. The attention mechanism based stratigraphic contrastive semantic segmentation method according to claim 1 or 3, characterized in that, Based on the spatial attention mechanism and the channel attention mechanism, the pre-training model realizes the layering category identification of the to-be-tested well logging curve by extracting the key position features and channel features of the to-be-tested well logging curve, and obtains the layering category result of the to-be-tested well logging curve, comprising: When the pre-training model predicts the to-be-tested well logging curve, each encoder stage USAE-H extracts features from the first feature curve x output by the previous stage to extract the key position features of the first feature curve x and outputs the spatial attention adjusted feature curve to the corresponding U-shaped decoder stage; Each encoder stage USAE-H outputs a second feature curve y1 to the next encoder stage USAE-H or UCAE, and outputs a feature curve y2 to the corresponding U-shaped decoder stage; The pre-training model extracts features from the second feature curve y1 output by the previous encoder stage USAE-H or UCAE using each encoder stage UCAE, and outputs to the next encoder stage UCAE or the corresponding U-shaped decoder stage; Each U-shaped decoder stage splices and reconstructs the feature curve before receiving the feature curve output by the previous stage, and outputs the reconstructed feature curve to the next U-shaped decoder stage, while the reconstructed feature curve is processed through convolution and activation function to obtain an intermediate probability map; All intermediate probability maps are input into a feature map fusion model for fusion processing to obtain a total probability map, and the total probability map is subjected to category identification to obtain the layering category result of the to-be-tested well logging curve.

5. The attention mechanism based stratigraphic contrastive semantic segmentation method according to claim 4, characterized in that, The first feature curve x output by each encoder stage USAE-H is used for feature extraction to extract key position features of the first feature curve x and output a spatial attention adjusted feature curve to the corresponding decoder stage, including: Each encoder stage USAE-H inputs the first feature curve x output by the previous stage, converts the feature curve x (LxC in ) into an intermediate feature curve F1(x) with a channel number of C out1 using a general convolution layer to perform local feature extraction of the first feature curve x; wherein the first feature curve x is the feature curve x (LxC in ). The intermediate feature curve F1(x) is input into a U-shaped symmetric encoder-decoder structure with a height of H for multi-scale feature extraction and encoding to obtain multi-scale logging curve information U(F1(x)); The fusion of local features and multi-scale features is achieved by F1(x)+U(F1(x)) to obtain a feature curve y1(LxC out1 ) and output to the next encoder stage USAE-H or UCAE; wherein the feature curve y1(LxC out1 ) is the second feature curve y1. Meanwhile, the second feature curve y1 is input into a spatial attention module SAM for extraction to obtain key position features of the second feature curve y1.

6. The attention mechanism based stratigraphic contrastive semantic segmentation method according to claim 5, characterized in that, The second feature curve y1 is input into a spatial attention module SAM for extraction to obtain key position features of the second feature curve y1, including: In the channel dimension, the feature curve y1(L×C out1 ) is respectively subjected to max-pooling and average-pooling operations to obtain two feature curves and wherein, represents the max-pooling feature in the channel dimension, represents the average-pooling feature in the channel dimension; Will And The splicing and convolution operations are sequentially performed in the channel dimension to obtain a feature vector y m (Lx C), and a spatial attention feature vector M m (Lx C) is obtained based on the feature vector y s (Lx C) through a sigmoid activation function; The spatial attention feature vector M s (L×C) is multiplied with the feature curve y1(L×C out1 ), to obtain a spatial attention adjusted feature curve y2(L×C out2 ) and output to the corresponding U-type decoder stage; wherein the feature curve y2(L×C out2 ) includes the key position features of the second feature curve y1.

7. The attention mechanism based stratigraphic contrastive semantic segmentation method according to claim 4, characterized in that, The second feature curve y1 output by each encoder stage USAE-H or UCAE is used for feature extraction and output to the next encoder stage UCAE or the corresponding U-shaped decoder stage, including: Each encoder stage inputs a second feature curve y1, converts the input feature curve y1(LxC out1 ) into an intermediate feature curve F2(x) with a channel number of C out1 using a convolution layer to perform local feature extraction of the second feature curve y1; wherein the second feature curve y1 is the feature curve y1(LxC out1 ). F2(x) is input into a U-shaped symmetric encoder-decoder structure for multi-scale feature extraction and encoding to obtain multi-scale feature curve information U(F2(x)); The local feature and the multi-scale feature are fused by F2(x)+U(F2(x)) to obtain a feature curve y3(LxC out1 ) and output to a next encoder stage UCAE, while the feature curve y3(LxC out1 ) is input into a channel attention module CAM to obtain key channel features of the feature curve y3(LxC out1 ) and output to a corresponding U-shaped decoder stage; or, The current encoder stage UCAE is the last U-shaped channel attention encoder stage UCAE, and the fusion of local features and multi-scale features is achieved by F2(x)+U(F2(x)) to obtain a feature curve y3(LxC out1 ), the feature curve y3(LxC out1 ) is input into the channel attention module CAM to obtain the key channel features of the feature curve y3(LxC out1 ) and output to the next U-shaped decoder stage.

8. The attention mechanism based stratigraphic contrastive semantic segmentation method according to claim 7, characterized in that, The feature curve y3(LxC out1 ) is input into the channel attention module CAM to obtain the key channel features of the feature curve y3(LxC out1 ) and output, including: In the spatial dimension, max-pooling and average-pooling operations are respectively performed on the feature curve y3(L x C out1 ) to obtain two feature curves and wherein, represents the max-pooling feature in the spatial dimension, represents the average-pooling feature in the spatial dimension; The two feature curves and are input to the shared multi-layer perception to obtain two feature curves with a size of 1xC, and an element-wise addition is performed on the two feature curves with a size of 1xC, and then a Sigmoid operation is performed to generate a channel attention feature vector M c (1xC). The channel attention feature vector M c (1 x C) is multiplied by the one-dimensional feature curve y3(L x C out1 ), to obtain a one-dimensional feature curve y4(L x C out2 ) adjusted by channel attention, that is, the channel feature of the feature curve y3(L x C out1 ).

9. The attention mechanism based stratigraphic contrastive semantic segmentation method according to claim 4, characterized in that, Based on the characteristics of the logging curve to be tested, a pre-trained model is used to predict the hierarchical category of the logging curve to be tested to obtain the hierarchical category result of the logging curve to be tested, including: Before each U-shaped decoder stage of the pre-trained model receives the feature curve output by the previous stage, the feature curve output by the corresponding encoder stage USAE-H or UCAE is spliced with the feature curve output by the previous U-shaped decoder stage or the previous encoder stage UCAE to obtain a spliced feature curve; wherein the feature curve output by the previous U-shaped decoder stage is the reconstructed feature curve output by the previous U-shaped decoder stage; The spliced feature curve is input into the corresponding U-shaped decoder stage, and each U-shaped decoder stage reconstructs the spliced feature curve to obtain a reconstructed feature curve and output it to the next U-shaped decoder stage, while the reconstructed feature curve is processed through convolution and an activation function to obtain an intermediate probability map; All intermediate probability maps are input into a feature map fusion model for fusion processing to obtain a total probability map, and the total probability map is classified to obtain a preliminary hierarchical category result of the logging curve to be tested; A threshold optimization algorithm is used to constrain the preliminary hierarchical category result to obtain a final hierarchical category result with higher accuracy, i.e., the final hierarchical category result of the logging curve to be tested.

10. The attention mechanism based stratigraphic contrastive semantic segmentation method according to claim 1 or 9, characterized in that, During the training process of the benchmark model, a label smoothing strategy is introduced into the loss function of the pre-trained model, including: a distribution of label data y k a distribution of smoothed label data y and using the distribution of smoothed label data y a distribution of label data y k where the distribution of smoothed label data y is In the formula, represents the new label distribution, i.e. the distribution of the smoothed label data, K represents the number of classes of the label data; y k represents the original label distribution, i.e. the distribution of the label data; a represents a label smoothing parameter; a distribution based on the smoothed label data The cross-entropy loss formula with the introduced label smoothing is obtained as follows: In the formula, H(y, p) represents a cross-entropy loss, p represents a hierarchical class probability value predicted by the pre-training model for a sample curve; K represents a class number of label data, and k represents a kth hierarchical class; p k represents a kth hierarchical class probability value predicted by the pre-training model for single sample curve data. According to the cross-entropy loss formula after introducing the label smoothing, the loss function of the pre-trained model is obtained; wherein the loss of the pre-trained model is the sum of the losses of the intermediate probability map and the total probability map; The loss function of the pre-trained model is: In the formula, L represents the total loss of the pre-training model, Loss of the intermediate probability map, l fuse Loss of the total probability map, M represents the total number of the intermediate probability maps, and m represents the mth intermediate probability map.

11. The attention mechanism based stratigraphic contrastive semantic segmentation method according to claim 1, characterized in that, The threshold constraint is performed on the hierarchical category result of the logging curve to be tested to obtain the final hierarchical category result of the logging curve to be tested, including: In the prediction stage of the pre-trained model, a threshold optimization algorithm is introduced, that is, a predetermined range of threshold values is set for the hierarchical category results predicted by the pre-trained model, and the best threshold value is obtained by grid search calculation to improve the prediction accuracy of the pre-trained model. Among them, for the threshold values in the predetermined range, the best threshold value is obtained by grid search calculation, including: Adjust the threshold value in steps within the predetermined range of threshold values, and find the threshold value with the highest prediction result accuracy among all threshold values by comparing the adjusted threshold value with the confidence of the predicted category.

12. A semantic segmentation system based on attention mechanism stratigraphic correlation, characterized in that, Including: A preprocessing unit is configured to process the collected well logging curve data and hierarchical data to obtain sample curves and label data; A training unit is configured to train a semantic segmentation network U2-Net as a benchmark model based on the sample curves and label data, and introduce a spatial attention mechanism and a channel attention mechanism to obtain a pre-trained model; A prediction unit is configured to perform hierarchical category identification of the well logging curve to be tested based on the spatial attention mechanism and the channel attention mechanism, and the pre-trained model extracts key position features and channel features of the well logging curve to be tested to obtain hierarchical category results of the well logging curve to be tested. A constraint unit is configured to constrain the hierarchical category of the well logging curve to be tested by a threshold value to obtain the final hierarchical category result of the well logging curve to be tested.

13. An electronic device, comprising: The computer readable storage medium stores computer programs or instructions, and the computer programs or instructions are executed by the processor to realize the attention mechanism based stratigraphic correlation semantic segmentation method of any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer programs or instructions, and the computer programs or instructions are executed by the processor to realize the attention mechanism based stratigraphic correlation semantic segmentation method of any one of claims 1-11.

15. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instruction is executed by the processor to realize the attention mechanism based stratigraphic correlation semantic segmentation method of any one of claims 1-11.