Distributed fiber based cementing quality evaluation method, system and electronic device

CN122728618APending Publication Date: 2026-09-11YANGTZE UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611044952.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

[0005]有鉴于此,有必要提供一种基于分布式光纤的固井质量评估方法、系统及电子设备,用以解决现有技术中存在的无法实时反馈固井质量且预测精度不足的技术问题

Benefits of technology

[0016]本发明的有益效果是:本发明首先通过分布式应变传感技术在固井作业过程中实时采集光纤应变数据及环境状态数据,实现水泥浆固化阶段的连续在线监测,将固井质量预测节点从传统的固井完成后前移至施工过程中,有效降低了传统方法因依赖事后检测而导致的滞后性影响,为现场实时调整施工参数提供了可靠的数据基础。进一步地,通过对采集的原始数据进行预处理,降低噪声、缺失值和量纲差异等数据质量问题对后续分析的干扰,提高了输入数据的准确性和一致性。进一步地,通过可分离卷积神经网络对光纤应变数据进行特征提取,在降低模型参数规模的同时充分挖掘了数据中的深层时空特征,增强模型对高维波动信号的特征表达能力和泛化性能。进一步地,通过将提取的时序特征向量输入预先训练好的分类预测模型,综合利用应变数据所反映的水泥环受力状态与环境状态数据所表征的工况条件进行质量等级判别,实现固井质量的多维度综合评估与自动分级,避免依赖人工经验进行质量评价的主观性,显著提升固井质量评估的客观性、准确性和效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122728618A_ABST
    Figure CN122728618A_ABST
Patent Text Reader

Abstract

This invention provides a method, system, and electronic device for cementing quality assessment based on distributed optical fiber, belonging to the field of drilling engineering technology. The method includes: acquiring raw data collected by a distributed optical fiber strain system during cementing operations; the raw data includes optical fiber strain data and environmental state data; preprocessing the optical fiber strain data and the environmental state data; extracting features from the processed optical fiber strain data using a separable convolutional neural network to obtain a time-series feature vector; and inputting the time-series feature vector into a pre-trained classification prediction model to obtain the quality level of the cementing operation. This invention improves the accuracy and real-time performance of cementing quality prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of drilling engineering technology, and specifically to a cementing quality assessment method, system, and electronic equipment based on distributed optical fiber. Background Technology

[0002] Cementing quality is a critical factor affecting the integrity, safety, and production efficiency of oil and gas wells, and has long been a core concern in drilling and completion engineering. Traditional cementing quality evaluation methods mainly rely on post-processing detection techniques such as sonic logging and radioactive logging. However, these methods can only be implemented after cementing operations are completed, resulting in significant data lag. They cannot reflect the dynamic changes in cementing quality in real time during construction, making it difficult to promptly detect and warn of potential problems during construction, and they are also ill-suited to the current demands of smart oilfield construction for real-time monitoring throughout the entire process.

[0003] With the continuous improvement of digitalization and intelligence in oil and gas engineering, more and more scholars are beginning to explore the use of real-time data and machine learning methods for cementing quality prediction. In particular, various real-time data integrated into drilling support systems, such as pump pressure, displacement, casing pressure, well depth, density, and annular pressure, provide a data foundation for cementing quality prediction. Some studies have used algorithms such as SVM (Support Vector Machine), Random Forest, and ANN (Artificial Neural Network) to model cementing quality; however, most methods suffer from weak generalization ability and limited prediction accuracy when dealing with high-dimensional, time-series data.

[0004] However, existing technologies still have the following shortcomings: First, the inherent lag of traditional post-detection methods such as sonic logging has not been fundamentally resolved, making it difficult to meet the real-time monitoring and early warning needs during cementing operations; Second, cementing quality prediction models based on single algorithms such as SVR and ANN have insufficient feature extraction and generalization capabilities; Fourth, existing hybrid models are mostly simple two-layer concatenated architectures such as CNN and SVM, which are difficult to fully mine the deep information contained in DSS data, resulting in insufficient prediction accuracy. Summary of the Invention

[0005] In view of this, it is necessary to provide a cementing quality assessment method, system and electronic equipment based on distributed optical fiber to solve the technical problems of existing technologies that cannot provide real-time feedback on cementing quality and have insufficient prediction accuracy.

[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a cementing quality assessment method based on distributed optical fibers, comprising: Acquire raw data collected by a distributed fiber optic strain system during cementing operations; the raw data includes fiber optic strain data and environmental condition data; The fiber strain data and the environmental condition data are preprocessed. Feature extraction is performed on the processed fiber strain data using a separable convolutional neural network to obtain a time-series feature vector. The time-series feature vector is input into a pre-trained classification prediction model to obtain the quality level of the cementing operation.

[0007] In one possible implementation, the preprocessing of the fiber strain data and the environmental state data includes: Outlier removal processing is performed on the fiber strain data and the environmental condition data; Wavelet transform is used to denoise the data after outlier removal; The mean interpolation method was used to fill in missing values ​​in the denoised data. A normalization algorithm is used to map the filled data to a preset numerical range.

[0008] In one possible implementation, the fiber optic strain data includes axial strain data, circumferential strain data, and shear strain data; the step of extracting features from the processed fiber optic strain data using a separable convolutional neural network to obtain a time-series feature vector includes: The fiber strain data of the three types of preprocessed data are convolved separately and independently by a deep convolutional layer to extract the local temporal features of each type of strain data and output the first feature map; the deep convolutional layer uses a 3×3 convolutional kernel and slides the convolution along the time step dimension with a stride of 1. The first feature map is linearly combined between channels by a pointwise convolutional layer to fuse the correlation features between the axial strain data, the circumferential strain data, and the shear strain data, and output a second feature map; the pointwise convolutional layer uses a 1×1 convolutional kernel; The second feature map is downsampled by a pooling layer, and the temporal feature vector is obtained based on the downsampling result. The pooling layer uses a 2×1 pooling window to downsample along the time step dimension.

[0009] In one possible implementation, the classification prediction model includes a self-attention encoder and a support vector regression model; the step of inputting the time-series feature vector and the environmental state data into the pre-trained classification prediction model to obtain the quality level of the cementing operation includes: The temporal feature vector is input into the self-attention encoder to obtain the preliminary classification result of the cementing operation; The preliminary classification results are fused with the environmental status data, and the fused feature vector is input into the support vector regression model to obtain the quality level of the cementing operation.

[0010] In one possible implementation, inputting the temporal feature vector into the self-attention encoder to obtain a preliminary classification result of the cementing operation includes: The temporal feature vector is position-encoded to generate an embedding vector carrying temporal position information; The embedding vector is input into the self-attention encoder to process the embedding vector through a multi-head self-attention mechanism, capture long-distance dependencies between different time steps, and output the encoded feature tensor. The encoded feature tensor is aggregated by global pooling to obtain a global feature vector of fixed length; The global feature vector is input into the fully connected classification layer inside the self-attention encoder. The predicted probability of each quality category is output through the activation function, and the category with the highest probability is taken as the preliminary classification result.

[0011] In one possible implementation, the environmental state data includes at least one of temperature data, well depth data, wellbore internal pressure data, and annular pressure data; the step of fusing the preliminary classification result with the environmental state data, and inputting the fused feature vector into the support vector regression model to obtain the quality level of the cementing operation includes: The preliminary classification results are encoded to generate category encoding vectors; The category encoding vector is concatenated with the environmental state data to form a fusion feature vector; The fused feature vector is input into a support vector regression model using a Gaussian kernel function, and the output is a continuous regression value of cementing quality; The continuous regression values ​​are mapped to the quality level according to the preset category threshold range.

[0012] In one possible implementation, training the classification prediction model includes: Acquire historical raw data labeled with cementing quality grades, including historical fiber optic strain data and historical environmental condition data; The historical raw data is preprocessed to construct an initial sample dataset; The initial sample dataset is divided into a training set, a validation set, and a test set according to a preset ratio; Temporal feature extraction is performed on the historical fiber strain data in the training set based on a separable convolutional neural network to obtain sample temporal feature vectors. The sample temporal feature vector is input into the self-attention encoder to be trained to obtain the preliminary classification result of the sample; The sample quality level is obtained by fusing the preliminary classification results of the samples with the historical environmental state data in the training set and then inputting the data into the support vector regression model to be trained. Based on the difference between the sample quality level and the labeled cementing quality level, the parameters of the self-attention encoder and the support vector regression model are adjusted to train the model until the preset training conditions are met, thus obtaining the classification prediction model.

[0013] One possible implementation also includes: The validation set is used to optimize the parameters of the trained self-attention encoder and the support vector regression model. The performance of the adjusted self-attention encoder and the support vector regression model is evaluated using the test set. Repeated training, parameter optimization, and performance evaluation are performed until the predictive performance of the self-attention encoder and the support vector regression model meets the preset requirements.

[0014] Secondly, the present invention also provides a cementing quality assessment system based on distributed optical fiber, comprising: The data acquisition module is used to acquire raw data collected by the distributed fiber optic strain system during cementing operations; the raw data includes fiber optic strain data and environmental condition data. A data preprocessing module is used to preprocess the fiber strain data and the environmental state data; The feature extraction module is used to extract features from the processed fiber strain data based on a separable convolutional neural network to obtain a time-series feature vector. The quality assessment module is used to input the time-series feature vector into a pre-trained classification prediction model to obtain the quality level of the cementing operation.

[0015] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the distributed optical fiber-based cementing quality assessment method described in any of the above implementations.

[0016] The beneficial effects of this invention are as follows: Firstly, this invention utilizes distributed strain sensing technology to collect fiber optic strain data and environmental condition data in real time during cementing operations, enabling continuous online monitoring of the cement slurry solidification stage. This shifts the cementing quality prediction node from the traditional post-cementing stage to the construction process, effectively reducing the lag caused by the reliance on post-construction detection in traditional methods and providing a reliable data foundation for real-time adjustment of construction parameters on-site. Furthermore, by preprocessing the collected raw data, the interference of data quality issues such as noise, missing values, and dimensional differences on subsequent analysis is reduced, improving the accuracy and consistency of the input data. Moreover, by using a separable convolutional neural network to extract features from the fiber optic strain data, the deep spatiotemporal features in the data are fully explored while reducing the model parameter scale, enhancing the model's ability to express features of high-dimensional fluctuating signals and its generalization performance. Furthermore, by inputting the extracted time-series feature vectors into a pre-trained classification prediction model, the quality grade is determined by comprehensively utilizing the stress state of the cement sheath reflected by the strain data and the working conditions represented by the environmental state data. This enables multi-dimensional comprehensive evaluation and automatic grading of cementing quality, avoiding the subjectivity of relying on human experience for quality evaluation, and significantly improving the objectivity, accuracy, and efficiency of cementing quality assessment. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic flowchart of an embodiment of the cementing quality assessment method based on distributed optical fiber provided by the present invention; Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of S101; Figure 3 This is a schematic diagram of the data preprocessing process in an embodiment of the present invention; Figure 4 For the present invention Figure 1 A schematic diagram of an embodiment of S100; Figure 5 This is a flowchart of a separable convolutional neural network (SCNN) in an embodiment of the present invention; Figure 6 A schematic flowchart of another embodiment of the cementing quality assessment method based on distributed optical fiber provided by the present invention; Figure 7A schematic flowchart of another embodiment of the cementing quality assessment method based on distributed optical fiber provided by the present invention; Figure 8 This is a flowchart illustrating the process of the Transformer model in an embodiment of the present invention. Figure 9 A schematic flowchart of another embodiment of the cementing quality assessment method based on distributed optical fiber provided by the present invention; Figure 10 This is a flowchart of the SVR algorithm for predicting cementing quality in an embodiment of the present invention; Figure 11 A schematic flowchart of another embodiment of the cementing quality assessment method based on distributed optical fiber provided by the present invention; Figure 12 A schematic flowchart of another embodiment of the cementing quality assessment method based on distributed optical fiber provided by the present invention; Figure 13 This is a flowchart of a cementing quality prediction method based on DSS data and an SCNN-Transformer-SVR hybrid model in an embodiment of the present invention. Figure 14 A schematic diagram of an embodiment of the cementing quality assessment system based on distributed optical fiber provided by the present invention; Figure 15 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] This invention provides a cementing quality assessment method, system, and electronic equipment based on distributed optical fiber, which are described below.

[0024] Figure 1 This is a schematic flowchart of an embodiment of the cementing quality assessment method based on distributed optical fiber provided by the present invention, as shown below. Figure 1 As shown, the cementing quality assessment method based on distributed optical fibers includes: S101. Acquire raw data collected by the distributed fiber optic strain system during cementing operations; the raw data includes fiber optic strain data and environmental condition data.

[0025] It should be noted that DSS (Distributed Strain System) is a technique that utilizes the Brillouin scattering effect to measure the strain distribution along an optical fiber. During cementing operations, optical fibers are deployed along the outer wall of the casing or key parts of the wellbore, and the DSS acquires strain signals along the fiber in real time. DSS is based on BOTDR (Brillouin Optical Time-Domain Reflectometry) or BOTDA (Brillouin Optical Time-Domain Analysis) technology. Laser pulses are emitted into the optical fiber, and the frequency shift and intensity information of the backscattered Brillouin light are received and analyzed. Combined with known optical fiber physical parameters and optical time-domain positioning technology, raw data is obtained. This raw data includes optical fiber strain data and environmental condition data. Environmental condition data refers to a set of auxiliary parameters reflecting downhole operating conditions, acquired synchronously with the optical fiber strain data during cementing operations. These parameters provide physical boundary constraints and background information for interpreting the strain data.

[0026] S102. Preprocess the fiber strain data and the environmental condition data.

[0027] It should be noted that the raw data undergoes data cleaning and normalization to obtain normalized preprocessed data, which eliminates noise interference, data loss, and dimensional differences introduced during the on-site data collection process, forming standardized and normalized data suitable for subsequent input to deep network models.

[0028] S103. Based on a separable convolutional neural network, feature extraction is performed on the processed fiber strain data to obtain a time-series feature vector.

[0029] It should be noted that a separable convolutional neural network is used to extract deep spatiotemporal features from the preprocessed fiber strain data. By decomposing the standard convolution operation into two independent stages—depth convolution and pointwise convolution—the separable convolutional neural network can extract fine-grained local patterns from the data with fewer parameters and less computation, making it particularly suitable for processing multi-channel, strongly temporal signal data such as fiber strain data.

[0030] S104. Input the time-series feature vector into the pre-trained classification prediction model to obtain the quality level of the cementing operation.

[0031] It should be noted that the time-series feature vector is input into a pre-trained classification and prediction model, which then performs a comprehensive judgment and grade output of cementing quality. The classification and prediction model can comprehensively utilize the stress state information of the cement sheath reflected by fiber optic strain data and the working condition information represented by environmental state data to achieve a multi-dimensional, high-precision comprehensive evaluation of cementing quality, ultimately outputting a quality grade of good, average, or failed. The cement sheath is a ring-shaped structure formed by the solidification of cement slurry injected into the annular space between the casing and the formation (wellbore) during oil and gas well cementing operations.

[0032] In summary, the cementing quality assessment method based on distributed optical fiber provided in this invention firstly acquires optical fiber strain data and environmental status data in real time during cementing operations using distributed strain sensing technology. This enables continuous online monitoring of the cement slurry solidification stage, shifting the cementing quality prediction node from the traditional post-cementing completion stage to the construction process. This effectively reduces the lag caused by the reliance on post-construction detection in traditional methods, providing a reliable data foundation for real-time adjustment of construction parameters on-site. Furthermore, by preprocessing the acquired raw data, the interference of data quality issues such as noise, missing values, and dimensional differences on subsequent analysis is reduced, improving the accuracy and consistency of the input data. Moreover, feature extraction from the optical fiber strain data is performed using a separable convolutional neural network. This reduces the model parameter size while fully exploring the deep spatiotemporal features in the data, enhancing the model's ability to express features of high-dimensional fluctuating signals and its generalization performance. Furthermore, by inputting the extracted time-series feature vectors into a pre-trained classification prediction model, the quality grade is determined by comprehensively utilizing the stress state of the cement sheath reflected by the strain data and the working conditions represented by the environmental state data. This enables multi-dimensional comprehensive evaluation and automatic grading of cementing quality, avoiding the subjectivity of relying on human experience for quality evaluation, and significantly improving the objectivity, accuracy, and efficiency of cementing quality assessment.

[0033] In some embodiments of the present invention, such as Figure 2 As shown, step S102 includes: S201. Perform outlier removal processing on the fiber strain data and the environmental state data.

[0034] It should be noted that: such as Figure 3 As shown, based on field construction experience, by analyzing the reasonable variation range of each physical parameter and the data continuity between adjacent monitoring points, data points that significantly deviate from the normal trend are identified and removed. Specifically, for fiber optic strain data, reasonable upper and lower limits for strain values ​​are set according to the physical variation law of cement sheath solidification stress during cementing operations; for environmental condition data, reasonable ranges for parameters such as temperature and pressure are set according to the actual downhole working conditions. Data points exceeding the above reasonable ranges are identified as outliers and removed from the dataset.

[0035] S202. Wavelet transform is used to denoise the data after outlier removal.

[0036] It should be noted that: such as Figure 3 As shown, wavelet transform is used to denoise the data after outlier removal. Wavelet transform is a time-frequency localization analysis method that decomposes the signal into subbands of different scales, enabling the simultaneous characterization of the signal's local features in both the time and frequency domains.

[0037] S203. Use the average value interpolation method to fill in missing values ​​in the denoised data.

[0038] It should be noted that: such as Figure 3 As shown, the mean imputation method is used to fill in missing values ​​in the denoised data. Mean imputation is a commonly used method for handling missing values; its basic idea is to use the mean of the feature across all valid observations to replace the missing item. Specifically, for a certain feature (such as a monitoring point in axial strain data), its mean value across all valid observation time points is calculated, and then this mean value is used to fill in the missing position.

[0039] S204. Use a normalization algorithm to map the filled data to a preset numerical range.

[0040] It should be noted that: such as Figure 3 As shown, the Min-Max normalization algorithm uses a linear transformation to map the filled data to a preset numerical range while maintaining the original relative magnitudes of the data. The Min-Max normalization calculation formula is shown below: (Equation 1); in, x i For the firsti The original feature values ​​of each sample, x min and x max These are the minimum and maximum values ​​of the feature across all samples, respectively. These are the normalized eigenvalues. All the imputed data can be mapped to the interval [-1, 1].

[0041] In this embodiment, the above preprocessing can transform the raw data into standardized data, providing a high-quality data foundation for subsequent SCNN feature extraction and classification prediction model training. This effectively reduces prediction bias caused by data quality issues and improves the accuracy and reliability of cementing quality prediction.

[0042] In some embodiments of the present invention, such as Figure 4 As shown, the fiber optic strain data includes axial strain data, circumferential strain data, and shear strain data; step S103 includes: S401. The three types of preprocessed fiber strain data are convolved separately and independently through a deep convolutional layer to extract the local temporal features of each type of strain data and output the first feature map; the deep convolutional layer uses a 3×3 convolutional kernel and slides along the time step dimension with a stride of 1.

[0043] It should be noted that fiber optic strain data includes axial strain data, circumferential strain data, and shear strain data. Axial strain data is the data of tensile or compressive deformation occurring along the vertical direction of the wellbore (i.e., the well depth direction, Z-axis). Circumferential strain data is the data of tensile or compressive deformation occurring along the circumferential direction of the wellbore (i.e., the circumferential direction, the tangential direction around the wellbore). Shear strain data is the data of angular deformation occurring along the tangential direction of the wellbore, that is, the data of deformation caused by relative sliding or torsion between two adjacent surfaces inside the object. The preprocessed fiber optic strain data is input into SCNN (Separable Convolutional Neural Network) for feature extraction. SCNN is a lightweight convolutional neural network architecture that decouples standard convolution operations into two independent stages: depthwise convolution and pointwise convolution. Assuming the input data is... Where B is the batch size, D is the sensor channel (corresponding to three data types: axial strain, circumferential strain, and shear strain), and Tk is the time step.

[0044] The deep convolutional layer independently extracts local temporal features for each channel. Axial strain data reflects the stress variation of the cement sheath along the wellbore axis, circumferential strain data reflects the stress distribution of the cement sheath circumferentially, and shear strain data reflects the shear deformation state of the cement sheath. These three types of strain data each have different physical meanings and waveform characteristics, and independent convolution can preserve the local pattern information of each data type. After deep convolution, the data is processed by the ELU (Exponential Linear Unit) activation function to output the first feature map. The expression for the activation function is: (Equation 2); in, x The input value for the activation function (the output of the deep convolutional layer). α This is a hyperparameter of the ELU function that controls the degree of saturation in the negative part (usually set to 1.0).

[0045] In this embodiment, the deep convolutional layer uses a 3×3 convolutional kernel, sliding along the time step dimension with a stride of 1. Data edges are padded before and after the convolution operation to maintain the spatial dimensions of the feature map. The dimensions of the first feature map output by the deep convolution are shown below: (Equation 3); in, L en The length of the input data. H in The height of the input data. K The size of the convolution kernel. P For fill size, S C The convolution stride is... N conv The number of convolution kernels, C out It is the number of output channels. H C The height of the first output feature map. L C The length of the first feature map output by the convolutional layer is given by the structure of the first feature map output by the convolutional layer. N conv , H C , L C ).

[0046] For the specific dimensional structure of the DSS data in this embodiment (batch size, number of sensor channels, time step), the above formula 3 can be rewritten as the following formula: (Equation 4); in, BC To output batch size, D For output sensor channels, T C This is the output time step. The feature map structure output by the depthwise convolution is ( B C , D , T C ).

[0047] In each convolution operation, a depthwise convolution is performed first. This means the depthwise convolution layer performs convolution operations on each type of strain data in the input data separately and independently, extracting local temporal features within each sensor channel and outputting a first feature map. Each sensor channel has its own independent convolution kernel, which operates only on its corresponding channel data; there is no mixing between channels.

[0048] S402. The first feature map is linearly combined between channels by a pointwise convolutional layer to fuse the correlation features between the axial strain data, the circumferential strain data and the shear strain data and output a second feature map; the pointwise convolutional layer uses a 1×1 convolutional kernel.

[0049] It should be noted that the first feature map output from the deep convolutional layer is input into the pointwise convolutional layer for inter-channel feature fusion. For example... Figure 5 As shown, the pointwise convolutional layer uses a 1×1 convolutional kernel to perform linear combination operations on all channels. Unlike depthwise convolution, pointwise convolution does not focus on local spatial features but rather on cross-channel information integration. The 1×1 convolutional kernel performs a weighted linear combination of all channels at each location in the first feature map, fusing the feature values ​​of different channels at the same location through a learnable weight matrix to generate new channel features. Since the three types of fiber strain data characterize the stress state of the cement sheath from three different directions—axial, circumferential, and shear—during cementing operations, changes in the cement sheath's bonding quality simultaneously cause stress redistribution in all three directions, resulting in an inherent physical coupling relationship between axial strain, circumferential strain, and shear strain. Through learning from the 1×1 convolutional kernel, the pointwise convolutional layer can automatically capture the cooperative change patterns and cross-coupling information among these three strains. For example, when the cement sheath is poorly bonded locally, the axial strain and circumferential strain at that location may exhibit a specific relative change relationship; this cross-channel correlation feature can be effectively extracted and characterized through pointwise convolution. By linearly combining the channels of pointwise convolutional layers, the complementary information of the three strain data can be organically integrated to output a second feature map that incorporates multidimensional strain correlation information.

[0050] S403. The second feature map is downsampled by a pooling layer, and the temporal feature vector is obtained based on the downsampling result. The pooling layer uses a 2×1 pooling window to downsample along the time step dimension.

[0051] It should be noted that: such as Figure 5 As shown, the pooling layer employs max pooling, using a 2×1 pooling window to downsample (or reduce sampling) along the time step dimension, with a step size of 2. This means that the maximum value between every two consecutive time steps is taken as the representative output of the pooling window, thus halving the time step dimension. The mathematical expression for max pooling is: (Equation 5); in, O i,j,ch For time-series characteristics, O i,j,ch ∈ R B’×D×T’ , B'×D×T' and( B c , D T c The meanings are similar; both refer to the output feature map size, but they are not the same stage. The former refers to the size after pooling, while the latter refers to the size after convolution. After the pooling operation is completed, the pooled 3D feature map... O i,j,ch (After downsampling) The result is flattened along the time step dimension, that is, the feature values ​​of all time steps are sequentially concatenated into a one-dimensional sequence along the time step direction, thereby transforming the three-dimensional feature map. O i,j,ch Convert to time-series feature vectors.

[0052] In this embodiment, three types of fiber strain data are convolved independently using deep convolutional layers. This allows for the extraction of fine-grained local temporal features within each strain data type while maintaining the independence of features in each channel, avoiding interference between features from different strain data types, thereby improving the accuracy and specificity of local feature extraction. Furthermore, a nonlinear transformation of the deep convolution output using the ELU activation function accelerates network convergence and avoids the gradient vanishing problem, thus improving the stability and efficiency of model training. Further, linear combination of channels in the first feature map using pointwise convolutional layers fuses the correlation features between axial strain, circumferential strain, and shear strain, capturing the collaborative change patterns and cross-coupling information of the three strain data during cementing, providing a more comprehensive and discriminative feature representation for cementing quality assessment. Finally, downsampling of the second feature map using pooling layers reduces data dimensionality and computational resource consumption while preserving key features, and enhances the model's robustness to local feature displacements, thereby reducing the risk of overfitting and improving the model's generalization ability and computational efficiency. In summary, this invention, through deep convolution-pointwise convolution-pooling of SCNN, significantly reduces the number of model parameters and computational complexity while fully exploring the deep spatiotemporal characteristics contained in DSS fiber strain data, thereby improving the accuracy and reliability of cementing quality grade assessment.

[0053] In some embodiments of the present invention, such as Figure 6 As shown, the classification prediction model includes a self-attention encoder and a support vector regression model; step S104 includes: S601. Input the time-series feature vector into the self-attention encoder to obtain the preliminary classification result of the cementing operation.

[0054] It should be noted that the classification prediction model includes a self-attention encoder (i.e., a Transformer encoder) and a support vector regression model. The self-attention encoder is a neural network structure based on a self-attention mechanism, which directly calculates the correlation weights between any two positions in the input sequence, thereby capturing long-distance dependencies in the sequence. The SVR (Support Vector Regression) model, based on supervised learning using statistical learning theory, receives the feature vector resulting from the fusion of the preliminary classification results from the self-attention encoder and environmental state data, and outputs a continuous quality grade score for cementing operations. The temporal feature vector output from the SCNN feature extraction module is input into the pre-trained self-attention encoder, which performs global temporal modeling and quality category discrimination on the temporal feature vector, outputting a preliminary classification result for cementing quality. This preliminary classification result serves as the first-level prediction conclusion for cementing quality, incorporating the quality category judgment made by the self-attention encoder based on fiber optic strain time-series data.

[0055] S602. The preliminary classification results are fused with the environmental status data, and the fused feature vector is input into the support vector regression model to obtain the quality level of the cementing operation.

[0056] It should be noted that the preliminary classification results are fused with environmental state data to form a fused feature vector. This fused feature vector retains the depth-time series feature information extracted from the fiber optic strain data by the self-attention encoder, and also incorporates environmental state information reflecting downhole operating conditions. The fused feature vector is input into a pre-trained support vector regression model, which performs secondary regression prediction based on the fused features to output the final quality grade of the cementing operation. Through the above two-stage cascaded processing, the cementing quality prediction result integrates the cement sheath stress state information reflected by the fiber optic strain data and the downhole operating condition information represented by the environmental state data, achieving high-precision quality grade prediction driven by multi-source data fusion.

[0057] In this embodiment, a self-attention encoder is used to perform global temporal modeling and preliminary quality category discrimination on the temporal feature vector. This allows for the extraction of global temporal patterns related to cementing quality from fiber optic strain time-series data, outputting reliable preliminary classification results. Furthermore, by fusing the preliminary classification results with environmental state data and inputting the results into a support vector regression model for secondary regression prediction, the cementing quality prediction results can be refined based on the preliminary classification and combined with environmental state data. By utilizing the cement sheath stress state information reflected in the fiber optic strain data and the downhole operating conditions information represented by the environmental state data, the limitations of a single model in feature representation are avoided, thereby significantly improving the accuracy and reliability of cementing quality prediction.

[0058] In some embodiments of the present invention, such as Figure 7 As shown, step S401 includes: S701. The temporal feature vector is positionally encoded to generate an embedding vector carrying temporal position information.

[0059] It's important to note that self-attention encoders themselves do not possess the ability to process sequence order because their self-attention mechanism computes all positions in the input sequence simultaneously, without any built-in information about position or order. To enable the model to perceive the chronological order of data points in the time series, such as... Figure 8 As shown, the present invention can use sine and cosine functions to generate position codes to inject position information into input features.

[0060] S702. Input the embedding vector into the self-attention encoder to process the embedding vector through a multi-head self-attention mechanism, capture long-distance dependencies between different time steps, and output the encoded feature tensor.

[0061] It should be noted that: such as Figure 8 As shown, the embedded vector is input into the self-attention encoder for processing. The core of the self-attention encoder is the multi-head self-attention mechanism, which enables the model to focus on the correlation between different positions in the sequence from different perspectives by computing multiple attention heads in parallel. The computation process of the self-attention mechanism is as follows: For each position in the input sequence, a query vector is generated through a linear transformation. Q ATT (Query), key vector K ATT (Key) and value vector V ATT (Value): (Formula 6); in, X The input sequence for the Transformer is the feature vector extracted by SCNN. Q ATT For query vector, K ATT Let be the query vector, VATT be the content vector, and Linear be the linear transformation symbol. Attention weights are calculated by the dot product of the query vector and the key vector, and then weighted and summed after scaling and Softmax normalization. (Equation 7); The multi-head attention mechanism replicates the self-attention process described above into multiple independent attention heads. Each head calculates attention weights in a different subspace, enabling the model to capture the dependencies between different time steps in temporal features from multiple perspectives. Based on the parallel computation idea of ​​multi-head attention, its overall output is obtained by concatenating the outputs of each attention head and performing a linear transformation. The specific calculation process is as follows: (Equation 8); (Equation 9); Among them, MultiHead(·) is a multi-head attention mechanism, and Attention(·) is an attention mechanism. Q ATT For query vector, K ATT The queried vector, V ATT For content vectors, head n For the first n The output of each attention head, concat (·) is the concatenation operator, which concatenates the outputs of all headers along the last dimension. W o To output the weight matrix, softmax (·) is the activation function. d k This is a scaling factor used to alleviate the problem of insufficient gradient calculation at the softmax function during backpropagation. Z A It is the output of the self-attention layer. T This is the transpose operator.

[0062] Through the multi-head self-attention mechanism described above, the attention outputs calculated independently by multiple attention heads in each subspace are concatenated and fused through a linear transformation. This allows the model to capture long-distance dependencies between different time steps in temporal features in parallel across different subspaces. Even if two time steps are far apart in the sequence, as long as they are highly correlated in the feature space, they can obtain high attention weights, thus comprehensively understanding the global temporal patterns of the DSS data. The encoded feature tensor processed by the multi-head self-attention mechanism has completed the information interaction and weight allocation between time steps in the sequence, but this tensor is still a linear transformation result with limited expressive power. To further enhance the model's nonlinear fitting ability and introduce richer feature transformations, the output of the multi-head self-attention mechanism is nonlinearly transformed through an FFN (Feed-Forward Network) layer, enabling the model to extract higher-level abstract features based on the attention-weighted features. At this point, the forward computation of a single self-attention encoding layer is complete. This layer, through the structure of "multi-head self-attention + feed-forward neural network," completes a global information interaction and nonlinear transformation of the input sequence. To capture more complex and abstract temporal patterns in DSS time-series data and further enhance the model's representational capabilities, the output of a single encoding layer is used as the input to the next encoding layer. Through the stacking of multiple self-attention encoding layers, the model can abstract temporal features layer by layer. That is, shallow encoding layers focus on local temporal patterns, while deeper encoding layers gradually integrate more global contextual information, thereby achieving comprehensive modeling of the multi-level temporal structure in DSS data. After the stacking of multiple self-attention encoding layers, the output encoded feature tensor Z has the following shape: (Equation 10); in, T k d represents the time step, and d represents the dimension of the hidden layer.

[0063] S703. Perform global pooling aggregation on the encoded feature tensor to obtain a global feature vector of fixed length.

[0064] It should be noted that: such as Figure 8 As shown, global average pooling (GAP) is performed on the encoded feature tensor. GAP averages the values ​​across all time steps for each feature channel, compressing the variable-length temporal features into a fixed-length global feature vector, as shown below: (Equation 11); in, A For global feature vectors, T k For time steps, t Z is the index of the time step.t For encoding feature tensors in the th case t A slice at each time step.

[0065] S704. Input the global feature vector into the fully connected classification layer inside the self-attention encoder, output the predicted probability of each quality category through the activation function, and take the category with the highest probability as the preliminary classification result.

[0066] It should be noted that: such as Figure 8 As shown, the global feature vector is input into the fully connected classification layer (i.e., Figure 8 The fully connected classification layer (a linear layer) performs class mapping. It is a component of the self-attention encoder, mapping the global feature vector from the hidden layer dimension d to the class space dimension S. To achieve this mapping, the fully connected classification layer uses a linear transformation, and the specific calculation formula is as follows: (Equation 12); Where W∈RS×d is the trainable weight matrix, S is the number of categories, b is the bias vector, b∈RS, and Y is the mapped category score vector. The dimension of this category score vector is equal to the total number of categories S, and each dimension corresponds to a quality category. The magnitude of the dimension indicates the relative strength of the model's tendency to classify the current sample as belonging to that category. In this embodiment, S=3, corresponding to the three quality categories of good, average, and failed. Since the score magnitudes may differ between different samples, a unified comparison benchmark is lacking. Therefore, it is necessary to convert the score vector into a probability distribution with a uniform scale that can be directly used for category determination. To this end, the category score vector is normalized using the Softmax activation function, mapping the score of each category to a probability value between 0 and 1, and making the sum of the probabilities of all categories equal to 1. This transforms logits into a category probability distribution with clear probabilistic meaning, calculated as follows: (Equation 13); Wherein, P(y i ) is a category i The predicted probability, y i For Y, the first i The logits score of each category, i.e., the raw predicted value before activation, is calculated using formula 19. The sum of the indices of all category scores (i.e., the denominator of formula 13) is 1. After calculating the predicted probability of each quality category using formula 19, to output a definitive preliminary classification result, the category with the highest probability is taken as the final quality level. The calculation formula is as follows: (Equation 14); in, The category with the highest probability is the initial classification result.

[0067] In this embodiment, positional encoding adds temporal positional information to the temporal feature vector, enabling the self-attention encoder to perceive the sequential order of data points in the time series. Multi-head self-attention processing of the embedded vectors allows for the parallel capture of long-distance dependencies between different time steps in the temporal features across different subspaces. This enables the model to comprehensively understand the temporal patterns of DSS data from multiple perspectives, thereby improving the model's ability to model complex temporal dependencies and the accuracy of preliminary classification. Furthermore, by stacking multiple layers of self-attention encoders, high-level global semantic features are learned progressively from low-level local patterns. Global average pooling aggregates the encoded feature tensors, eliminating the limitation of time step length variations on the input dimension of the fully connected layer while preserving the overall feature trends of each time step, thus simplifying subsequent classification processing and improving computational efficiency. Finally, a fully connected classification layer maps the global feature vector to the category space and outputs the predicted probabilities of each quality category through a Softmax activation function. This transforms deep temporal features into an interpretable quality category probability distribution, providing reliable preliminary classification results for cementing quality grade prediction, thereby improving the accuracy of cementing quality grade prediction.

[0068] In some embodiments of the present invention, such as Figure 9 As shown, the environmental status data includes at least one of temperature data, well depth data, wellbore internal pressure data, and annular pressure data; step S402 includes: S901. Encode the preliminary classification results to generate a category encoding vector.

[0069] It should be noted that one-hot encoding is applied to the preliminary classification results, converting discrete category labels into numerical category encoding vectors, enabling them to be concatenated and fused with other numerical environmental state data. The preliminary classification results include three quality categories: good, average, and failed. One-hot encoding is a method of converting categorical variables into numerical vectors that are easily utilized by machine learning models. Each category is mapped to an equally spaced binary vector, with each dimension being orthogonal to the others, without introducing any ordinal bias. Specifically, for a categorical variable with S categories, a binary vector of length S is used to represent each category, where only one dimension is 1 (representing the category to which the sample belongs), and the remaining dimensions are 0. For example, if the number of quality categories is S=3, the one-hot encoding for the three categories is as follows: good grade corresponds to the encoding vector [1, 0, 0], average grade corresponds to the encoding vector [0, 1, 0], and failed grade corresponds to the encoding vector [0, 0, 1].

[0070] S902. The category encoding vector is concatenated with the environmental state data to form a fusion feature vector.

[0071] It should be noted that environmental condition data includes at least one of the following: temperature data, well depth data, wellbore internal pressure data, and annular pressure data. These environmental condition data are acquired synchronously with the fiber optic strain data, and are all continuous numerical variables, collectively reflecting the working conditions during cementing operations. The category coding vector is a numerical representation of discrete category labels, while the environmental condition data are continuous physical quantities; both are numerical vectors. Therefore, a vector concatenation method can be used to link the category coding vector and the environmental condition data vector end-to-end, combining them into a longer fused feature vector. The fused feature vector contains both the category information corresponding to the depth time-series features extracted from the fiber optic strain data by the self-attention encoder (i.e., the preliminary classification result) and the environmental condition information reflecting the downhole working conditions. In cementing quality assessment, environmental condition data provides additional physical constraints: temperature affects the cement hydration reaction rate and fiber optic strain readings, requiring correction for the temperature effect on strain; well depth reflects the differences in formation pressure and temperature at different depths, necessitating adjustments to cementing quality evaluation standards with depth; and wellbore internal pressure and annular pressure directly influence the stress state of the casing and cement sheath, serving as key boundary conditions for interpreting strain data. These environmental condition parameters complement the strain data, collectively forming a more complete characterization of cementing operation conditions.

[0072] S903. Input the fused feature vector into the support vector regression model using the Gaussian kernel function, and output the continuous regression value of cementing quality.

[0073] It should be noted that: such as Figure 10 As shown, the fused feature vector is input into the SVR model using a Gaussian kernel function, and the output is a continuous regression value of cementing quality. SVR is primarily used for classification and regression tasks. The goal of SVR is to find an optimal regression hyperplane that minimizes the error between the predicted and true values ​​while preserving the sparsity of the data as much as possible. In classification tasks, SVR can be used to fit a continuous representation of the class labels and then convert it into discrete classes using a threshold. For linearly separable data, assuming two classes, SVR attempts to find a hyperplane, the equation of which is shown below: (Equation 15); in, w Let be the normal vector of the hyperplane orientation. x The input feature vector is the sample data to be predicted. b p This is a bias term.

[0074] If the data is linearly inseparable, the optimization objective of SVM is to maximize the margin between the two classes. That is, minimize: (Equation 16); in, It is an L2 norm.

[0075] The constraints for all samples must be satisfied simultaneously: (Equation 17); in, x i For the first i The input feature vector of each sample, y i For the first i The true label of each sample .

[0076] If the data is linearly inseparable, a kernel function can be used to map the data to a higher-dimensional space, making it linearly separable in the new space. Commonly used kernel functions include: (1) Linear kernel: (Equation 18); (2) Polynomial kernel: (Equation 19); (3) Gaussian kernel (RBF kernel): (Equation 20).

[0077] in, This represents the similarity between samples xi and yi in a high-dimensional space, where xi is the input feature vector of the i-th sample, yi is the true label of the i-th sample, T is the transpose sign, c is the constant term of the polynomial kernel, and d is the power (order) of the polynomial kernel. for, This is the Euclidean distance symbol.

[0078] SVR extends the above classification idea to regression tasks, constructing a 2x ... The margin is defined by a threshold. No loss is calculated for samples falling within the margin; only samples falling outside the margin (i.e., support vectors) affect the model. SVR derives the optimal regression model by minimizing the total loss and maximizing the margin, thus maintaining good generalization ability while fitting the training data.

[0079] The SVR model uses a Radial Basis Function (RBF) kernel to map the fused feature vectors from a low-dimensional space to a high-dimensional feature space. The expression for the Gaussian kernel is: (Equation 21); Where xi and xj are the fused feature vectors of the two samples. Let σ be the Euclidean distance between the two samples, and σ be the bandwidth parameter used to control the width (i.e., the range of influence) of the kernel function. The value of the Gaussian kernel function monotonically decreases to 0 as the distance between the two samples increases, meaning that samples that are closer together have a higher similarity in high-dimensional space. Through Gaussian kernel mapping, SVR can find the optimal regression hyperplane in high-dimensional feature space, minimizing the error between the predicted and true values, thus effectively handling the nonlinear relationship in the fused feature vector.

[0080] The relevant hyperparameters of SVR include regularization parameters (controlling model complexity; larger parameters result in stronger fitting ability but may lead to overfitting), error boundaries (determining the tolerance range between predicted and actual values), and kernel function parameters (affecting nonlinear mapping ability; smaller kernel function parameters make the decision boundary smoother, while larger kernel function parameters may lead to overfitting). In this embodiment, the above hyperparameters are optimized and selected through cross-validation. The SVR model outputs continuous regression values ​​of cementing quality. y svr The continuous regression value is a number between 0 and 1, representing the current cementing quality's position on a continuous spectrum from "good" to "failed". Through continuous regression prediction of SVR, the preliminary classification results can be refined under the physical constraints of environmental condition data, refining the discrete coarse-grained categories into continuous quantitative scores.

[0081] S904. Map the continuous regression value to the quality level according to the preset category threshold range.

[0082] It should be noted that... (e.g.) Figure 10 As shown, after the SVR outputs continuous regression values, it maps them to the final quality level according to a preset category threshold range. In this embodiment, the quality level is divided into three categories, with corresponding continuous value ranges as follows: if 0 ≤ y svr ≤0.250 is mapped to a "good" rating; if 0.25 < y svr ≤0.75, mapped to "normal" level; if 0.75 < y svr A value ≤1 corresponds to a "failure" level. The above threshold ranges are based on cementing quality grades: a "good" grade corresponds to excellent cement sheath bonding quality and effective interlayer sealing; a "general" grade corresponds to bonding quality that basically meets requirements but has local defects; and a "failure" grade corresponds to severely insufficient bonding quality and a risk of crossflow. These three grades occupy different intervals in the continuous scoring spectrum, and the preset thresholds achieve a classification mapping from continuous quantitative scoring to discrete quality grades.

[0083] In this embodiment, the preliminary classification results are encoded to generate category encoding vectors. These category encoding vectors are then concatenated with environmental state data to form a fusion feature vector. This organically integrates the depth-time series features reflecting the cement sheath bonding state with physical constraints such as temperature, well depth, and pressure reflecting downhole operating conditions. The final features used for quality assessment include both data-driven depth features and physically interpretable operating parameters, thereby improving the completeness and discriminative power of the feature representation. Furthermore, the fusion feature vector is input into a support vector regression model using a Gaussian kernel function. Based on a preset category threshold interval, the continuous regression values ​​are mapped to quality levels. This allows for refined continuous regression prediction based on the preliminary classification results and multidimensional physical constraints. The Gaussian kernel function maps the fusion feature vector to a high-dimensional space, effectively handling the nonlinear relationship between the category encoding vector and environmental state data, enabling the model to maintain good generalization ability while fitting complex nonlinear mappings. The continuous regression values ​​output by the SVR model refine the discrete coarse-grained categories into continuous quantitative scores, effectively improving the accuracy and robustness of cementing quality level prediction.

[0084] In some embodiments of the present invention, such as Figure 11 As shown, the training of the classification prediction model includes: S1101. Obtain historical raw data marked with cementing quality grades, including historical fiber optic strain data and historical environmental condition data.

[0085] It should be noted that the historical raw data comes from completed cementing operation cases. The raw data for each well includes historical fiber optic strain data and historical environmental condition data. The historical fiber optic strain data includes three types: axial strain data, circumferential strain data, and shear strain data. The historical environmental condition data includes at least one of the following: temperature data, well depth data, wellbore internal pressure data, and annular pressure data. All of the above historical raw data are labeled with corresponding cementing quality grades. The cementing quality grade is determined by the actual cementing quality results obtained through methods such as sonic logging after the field operation is completed, and is divided into three quality categories: good, average, and failed. The labeled raw data constitutes the historical raw data.

[0086] S1102. Preprocess the historical raw data to construct an initial sample dataset.

[0087] It should be noted that: referring to the above embodiments, the historical raw data is preprocessed. Through the above preprocessing, the historical raw data is transformed into standardized data, and then an initial sample dataset including a large number of samples is constructed. The samples in the initial sample dataset are the preprocessed historical raw data, which provides high-quality training samples with uniform data format and consistent dimensions for subsequent model training.

[0088] S1103. Divide the initial sample dataset into a training set, a validation set, and a test set according to a preset ratio.

[0089] It should be noted that the initial sample dataset is randomly divided into three subsets according to a preset ratio: training set, validation set, and test set. In this embodiment, the ratio of the three subsets is 7:2:1, that is, 70% of the samples are used for model parameter training, 20% of the samples are used for hyperparameter optimization and model selection, and 10% of the samples are used for the generalization evaluation of the final model performance.

[0090] S1104. Based on a separable convolutional neural network, extract time-series features from the historical fiber strain data in the training set to obtain sample time-series feature vectors.

[0091] It should be noted that: such as Figure 5 As shown, referring to the above embodiment, temporal features are extracted from the historical fiber strain data in the training set to obtain sample temporal feature vectors. Through the above SCNN feature extraction, the historical fiber strain data in the training set is converted into sample temporal feature vectors. These feature vectors condense the deep spatiotemporal features related to cementing quality in the DSS data and can be used for preliminary classification training of the subsequent self-attention encoder.

[0092] S1105. Input the temporal feature vector of the sample into the self-attention encoder to be trained to obtain the preliminary classification result of the sample.

[0093] It should be noted that: such as Figure 8 As shown, referring to the above embodiment, the sample temporal feature vector is input into the self-attention encoder to be trained for preliminary classification training.

[0094] S1106. After fusing the preliminary classification results of the samples with the historical environmental state data in the training set, input the results into the support vector regression model to be trained to obtain the sample quality level.

[0095] It should be noted that: such as Figure 10 As shown in the example above, the preliminary classification results of the samples are fused with historical environmental state data in the training set to obtain the fused feature vector of the samples. Finally, the fused feature vector of the samples is input into the SVR model to be trained to output the sample quality level.

[0096] S1107. Based on the difference between the sample quality level and the labeled cementing quality level, adjust the parameters of the self-attention encoder and the support vector regression model to train the model until the preset training conditions are met, and obtain the classification prediction model.

[0097] It should be noted that a supervised learning approach was used to jointly train the self-attention encoder and the SVR model. The sample quality level was compared with the acquired labeled cementing quality level, and the difference between the two was used as the loss signal for model optimization. For the initial classification part of the self-attention encoder, the cross-entropy loss function was used to measure the difference between the predicted probability distribution and the true label. The closer the predicted probability distribution is to the true label distribution, the smaller the cross-entropy loss value; conversely, the greater the difference between the two, the larger the cross-entropy loss value. The calculation formula is as follows: (Equation 22); in, L CR The cross-entropy loss value measures the degree of matching between the predicted distribution and the true distribution. y i The values ​​represent the true class labels. The learning rate is continuously adjusted using the backpropagation algorithm in the Adam optimizer to adapt to changes in the loss during training, making the prediction results closer to the true values.

[0098] For the regression prediction part of SVR, it is necessary to measure the deviation between the continuous regression values ​​output by the SVR model and the true continuous values ​​corresponding to the labeled cementing quality grades, using this as the optimization objective of the regression task. This embodiment uses MSE (Mean Squared Error) as the loss function, and its calculation formula is as follows: (Equation 23); in, L SVR The regression loss value of the SVR model. y true These are the continuous values ​​corresponding to the marked cementing quality grades. y svr This represents the continuous regression values ​​output by the SVR model. Mean squared error (MSE) measures the magnitude of the regression error by calculating the sum of squared differences between the predicted and actual values. A larger error results in a larger loss value and a heavier penalty for the model; conversely, a smaller error results in a smaller loss value.

[0099] Based on the calculated loss value, the backpropagation algorithm is used to calculate the gradient of each parameter of the model layer by layer, and the parameters of the self-attention encoder and SVR model are updated along the gradient descent direction by an optimizer (such as the Adam optimizer). The above iterative process of forward propagation, loss calculation, backpropagation and parameter update is repeated until the model's prediction performance on the validation set meets the preset training conditions (such as the loss value converging below a preset threshold, the validation set accuracy no longer improving, or reaching the preset maximum number of iterations). Training stops at this point, the current model parameters are saved, and the trained classification prediction model is obtained.

[0100] In this embodiment, by acquiring historical raw data labeled with cementing quality grades and preprocessing the historical raw data, problems such as noise interference, missing data, and dimensional differences in the training data can be eliminated, ensuring the consistency of training sample quality and thus improving the stability and convergence speed of model training. The initial sample dataset is divided into training, validation, and test sets according to a preset ratio. Temporal feature vectors are obtained by extracting temporal features from the historical fiber strain data in the training set using SCNN. These temporal feature vectors are then input into the self-attention encoder to be trained for preliminary classification training. This allows the self-attention encoder to learn and capture the long-distance dependencies between different time steps in the DSS temporal data during training, resulting in preliminary sample classification results. The preliminary classification results are then fused with the historical environmental state data in the training set and input into the SVR model to be trained, establishing a precise mapping relationship from fused features to continuous quality scores. Furthermore, by adjusting the model parameters and iteratively training based on the difference between the sample quality level and the labeled cementing quality level, the self-attention encoder and SVR can gradually approach the optimal parameter combination during the joint optimization process, achieving collaborative adaptation between the two models, thereby improving the accuracy and precision of the classification prediction model obtained in the final training in evaluating the quality level during cementing operations.

[0101] In some embodiments of the present invention, such as Figure 12 As shown, it also includes: S1201. The parameters of the trained self-attention encoder and the support vector regression model are optimized using the validation set.

[0102] It should be noted that, based on the initial model training completed in step S1107, the hyperparameters of the self-attention encoder and SVR model are systematically optimized and adjusted using validation set data. Hyperparameters are parameters at the model architecture level, distinct from model parameters (such as weights and biases) learned through the training process. Hyperparameters need to be set before training begins and cannot be directly optimized through backpropagation. In this embodiment, the hyperparameters to be optimized for the classification prediction model mainly include two categories: hyperparameters of the self-attention encoder (such as the number of attention heads, hidden layer dimension, feedforward network dimension, dropout ratio, learning rate, etc.) and hyperparameters of the SVR (regularization parameters, Gaussian kernel parameters, error boundaries, etc.). During the optimization process, the trained model parameters are fixed, validation set data is input into the model, and the model's prediction output on the validation set is obtained. The generalization performance of the model under the current hyperparameter combination is evaluated by calculating the prediction error (such as mean squared error or classification accuracy) on the validation set. Based on the bias feedback on the validation set, the values ​​of the hyperparameters are adjusted, and then the model training steps are re-executed to retrain the model parameters under the new hyperparameter configuration. Grid search or random search strategies can be used to systematically traverse different combinations within the preset range of hyperparameter values.

[0103] S1202. The performance of the adjusted self-attention encoder and the support vector regression model is evaluated using the test set.

[0104] It should be noted that after completing hyperparameter optimization and determining the optimal hyperparameter combination, the final classification prediction model is independently evaluated for generalization performance using test set data. The test set was not used during model training and hyperparameter optimization, thus providing an unbiased estimate of the model's generalization ability. The test set data is then input into the retrained classification prediction model after hyperparameter optimization to obtain the model's prediction results on the test set. The model's performance is quantitatively evaluated using metrics such as classification accuracy, Mean Squared Error (MSE), and F1-score.

[0105] Accuracy refers to the proportion of samples that the model correctly predicts out of all samples. The formula for calculation is: (Equation 24); Wherein, TP (True Positive) is the number of samples correctly predicted as a certain class; TN (True Negative) is the number of samples correctly predicted as other classes; FP (False Positive) is the number of samples incorrectly predicted as the same class; and FN (False Negative) is the number of samples incorrectly predicted as other classes.

[0106] Mean Squared Error (MSE) measures the squared error between the model's predicted probabilities and the true class. A smaller MSE indicates that the model's predicted probabilities are closer to the true labels. Its calculation formula is: (Equation 25); Where N is the number of samples, y i For real labels (one-hot encoded) This represents the probability distribution predicted by the model.

[0107] The F1-score is the harmonic mean of precision and recall. It is more effective than precision when dealing with imbalanced data. The closer the F1-score is to 1, the better the model's classification performance in that class. Its calculation formula is: (Equation 26); Precision rate is the proportion of samples predicted to belong to that category that actually do not. (Equation 27); Recall is the proportion of samples that actually belong to that category and are correctly predicted. (Equation 28); By comprehensively evaluating the above-mentioned indicators, the quantitative performance of the model in multiple dimensions can be obtained. To obtain an unbiased estimate of the model's generalization ability, it is necessary to conduct independent evaluation using test set data that did not participate in parameter updates and hyperparameter optimization during training. By calculating the above indicators on the test set, the predictive performance of the model on completely unseen data can be truly reflected, thus providing an objective and reliable quantitative basis for judging whether the model meets the accuracy requirements of engineering applications.

[0108] S1203, repeat training, parameter optimization, and performance evaluation until the prediction performance of the self-attention encoder and the support vector regression model meets the preset requirements.

[0109] It should be noted that the iterative process of performing model training (step S1107), validation set hyperparameter optimization (step S1201), and test set performance evaluation (step S1202) in the above embodiments is repeated until the prediction performance indicators (such as accuracy, F1-score, mean squared error, etc.) of the self-attention encoder and SVR model on the validation set and test set meet the preset engineering application requirements (such as accuracy reaching a set threshold, mean squared error being lower than a set upper limit, etc.). The classification prediction model obtained at this time is the final optimized classification prediction model.

[0110] In this embodiment, the hyperparameters of the trained self-attention encoder and SVR model are optimized using a validation set, and the adjusted model is independently evaluated using a test set. By repeatedly performing the iterative process of training, parameter optimization, and performance evaluation, the optimal balance between the fitting ability of the training set and the generalization ability of the validation set can be sought. This can effectively avoid the model from overfitting to noise and abnormal patterns in the training data, thereby ensuring that the model fully learns effective rules while reducing the risk of overfitting and improving the robustness of the model.

[0111] like Figure 13 As shown, the overall process of this embodiment of the invention is as follows: First, fiber optic strain data and environmental status data during the cementing operation are acquired in real time through the DSS system (corresponding to S101); then, the acquired raw data is preprocessed, including outlier removal, wavelet denoising, missing value imputation, and normalization, to construct an initial sample dataset (see the above embodiment). Figure 3 Next, a separable convolutional neural network is used to extract temporal features from the preprocessed fiber strain data. The temporal feature vector is obtained through a three-level architecture of depthwise convolution, pointwise convolution, and pooling (see the above embodiment). Figure 5 The temporal feature vector is then input into the self-attention encoder for preliminary classification prediction to obtain preliminary classification results for cementing operations (see the above embodiment for corresponding results). Figure 8 Finally, the preliminary classification results are fused with environmental status data and input into a support vector regression model for secondary regression prediction. After threshold mapping, the final quality grade of the cementing operation is output (see the above embodiment). Figure 10 The above steps are executed sequentially, forming a complete prediction process from raw data acquisition to quality level output.

[0112] To better implement the cementing quality assessment method based on distributed optical fibers in the embodiments of the present invention, based on the cementing quality assessment method based on distributed optical fibers, the corresponding method is as follows: Figure 14 As shown, this embodiment of the invention also provides a cementing quality assessment system 1400 based on distributed optical fiber, which includes: The data acquisition module 1401 is used to acquire raw data collected by the distributed fiber optic strain system during cementing operations; the raw data includes fiber optic strain data and environmental condition data. Data preprocessing module 1402 is used to preprocess the fiber strain data and the environmental state data; The feature extraction module 1403 is used to extract features from the processed fiber strain data based on a separable convolutional neural network to obtain a time-series feature vector. The quality assessment module 1404 is used to input the time-series feature vector into a pre-trained classification prediction model to obtain the quality level of the cementing operation.

[0113] The cementing quality assessment system 1400 based on distributed optical fiber provided in the above embodiments can realize the technical solutions described in the embodiments of the cementing quality assessment method based on distributed optical fiber. The specific implementation principles of each module or unit can be found in the corresponding content of the embodiments of the cementing quality assessment method based on distributed optical fiber, which will not be repeated here.

[0114] like Figure 15 As shown, the present invention also provides an electronic device 1500. The electronic device 1500 includes a processor 1501, a memory 1502, and a display 1503. Figure 15 Only some components of the electronic device 1500 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0115] In some embodiments, processor 1501 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 1502 or process data, such as the cementing quality assessment method based on distributed optical fiber in this invention.

[0116] In some embodiments, processor 1501 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 1501 may be local or remote. In some embodiments, processor 1501 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, etc., or any combination thereof.

[0117] In some embodiments, memory 1502 may be an internal storage unit of electronic device 1500, such as a hard disk or memory of electronic device 1500. In other embodiments, memory 1502 may also be an external storage device of electronic device 1500, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 1500.

[0118] Furthermore, the memory 1502 may include both internal storage units of the electronic device 1500 and external storage devices. The memory 1502 is used to store application software and various types of data installed on the electronic device 1500.

[0119] In some embodiments, display 1503 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 1503 is used to display information from electronic device 1500 and to display a visual user interface. Components 1501-1503 of electronic device 1500 communicate with each other via a system bus.

[0120] In one embodiment, when processor 1501 executes the distributed fiber optic-based cementing quality assessment program in memory 1502, the following steps can be implemented: Acquire raw data collected by a distributed fiber optic strain system during cementing operations; the raw data includes fiber optic strain data and environmental condition data; The fiber strain data and the environmental condition data are preprocessed. Feature extraction is performed on the processed fiber strain data using a separable convolutional neural network to obtain a time-series feature vector. The time-series feature vector is input into a pre-trained classification prediction model to obtain the quality level of the cementing operation.

[0121] It should be understood that when the processor 1501 executes the distributed optical fiber-based cementing quality assessment program in the memory 1502, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.

[0122] Furthermore, the embodiments of the present invention do not specifically limit the type of the electronic device 1500 mentioned. The electronic device 1500 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 1500 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0123] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0124] The above provides a detailed description of the cementing quality assessment method, system, and electronic equipment based on distributed optical fiber provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A cementing quality assessment method based on distributed optical fibers, characterized in that, include: Acquire raw data collected by a distributed fiber optic strain gauge system during cementing operations; The raw data includes fiber strain data and environmental condition data; The fiber strain data and the environmental condition data are preprocessed. Feature extraction is performed on the processed fiber strain data using a separable convolutional neural network to obtain a time-series feature vector. The time-series feature vector is input into a pre-trained classification prediction model to obtain the quality level of the cementing operation.

2. The method according to claim 1, characterized in that, The preprocessing of the fiber strain data and the environmental condition data includes: Outlier removal processing is performed on the fiber strain data and the environmental condition data; Wavelet transform is used to denoise the data after outlier removal; The mean interpolation method was used to fill in missing values ​​in the denoised data. A normalization algorithm is used to map the filled data to a preset numerical range.

3. The method according to claim 1, characterized in that, The fiber optic strain data includes axial strain data, circumferential strain data, and shear strain data; the feature extraction of the processed fiber optic strain data based on a separable convolutional neural network to obtain a time-series feature vector includes: The fiber strain data of the three types of preprocessed data are convolved separately and independently by a deep convolutional layer to extract the local temporal features of each type of strain data and output the first feature map; the deep convolutional layer uses a 3×3 convolutional kernel and slides the convolution along the time step dimension with a stride of 1. The first feature map is linearly combined between channels by a pointwise convolutional layer to fuse the correlation features between the axial strain data, the circumferential strain data, and the shear strain data, and output a second feature map; the pointwise convolutional layer uses a 1×1 convolutional kernel; The second feature map is downsampled by a pooling layer, and the temporal feature vector is obtained based on the downsampling result. The pooling layer uses a 2×1 pooling window to downsample along the time step dimension.

4. The method according to claim 1, characterized in that, The classification prediction model includes a self-attention encoder and a support vector regression model; the step of inputting the time-series feature vector and the environmental state data into the pre-trained classification prediction model to obtain the quality level of the cementing operation includes: The temporal feature vector is input into the self-attention encoder to obtain the preliminary classification result of the cementing operation; The preliminary classification results are fused with the environmental status data, and the fused feature vector is input into the support vector regression model to obtain the quality level of the cementing operation.

5. The method according to claim 4, characterized in that, The step of inputting the temporal feature vector into the self-attention encoder to obtain the preliminary classification result of the cementing operation includes: The temporal feature vector is position-encoded to generate an embedding vector carrying temporal position information; The embedding vector is input into the self-attention encoder to process the embedding vector through a multi-head self-attention mechanism, capture long-distance dependencies between different time steps, and output the encoded feature tensor. The encoded feature tensor is aggregated by global pooling to obtain a global feature vector of fixed length; The global feature vector is input into the fully connected classification layer inside the self-attention encoder. The predicted probability of each quality category is output through the activation function, and the category with the highest probability is taken as the preliminary classification result.

6. The method according to claim 4, characterized in that, The environmental status data includes at least one of temperature data, well depth data, wellbore internal pressure data, and annular pressure data; the step of fusing the preliminary classification results with the environmental status data, and inputting the fused feature vector into the support vector regression model to obtain the quality level of the cementing operation includes: The preliminary classification results are encoded to generate category encoding vectors; The category encoding vector is concatenated with the environmental state data to form a fusion feature vector; The fused feature vector is input into a support vector regression model using a Gaussian kernel function, and the output is a continuous regression value of cementing quality; The continuous regression values ​​are mapped to the quality level according to the preset category threshold range.

7. The method according to claim 1, characterized in that, The training of the classification prediction model includes: Acquire historical raw data labeled with cementing quality grades, including historical fiber optic strain data and historical environmental condition data; The historical raw data is preprocessed to construct an initial sample dataset; The initial sample dataset is divided into a training set, a validation set, and a test set according to a preset ratio; Temporal feature extraction is performed on the historical fiber strain data in the training set based on a separable convolutional neural network to obtain sample temporal feature vectors. The sample temporal feature vector is input into the self-attention encoder to be trained to obtain the preliminary classification result of the sample; The sample quality level is obtained by fusing the preliminary classification results of the samples with the historical environmental state data in the training set and then inputting the data into the support vector regression model to be trained. Based on the difference between the sample quality level and the labeled cementing quality level, the parameters of the self-attention encoder and the support vector regression model are adjusted to train the model until the preset training conditions are met, thus obtaining the classification prediction model.

8. The method according to claim 7, characterized in that, Also includes: The validation set is used to optimize the parameters of the trained self-attention encoder and the support vector regression model. The performance of the adjusted self-attention encoder and the support vector regression model is evaluated using the test set. Repeated training, parameter optimization, and performance evaluation are performed until the predictive performance of the self-attention encoder and the support vector regression model meets the preset requirements.

9. A cementing quality assessment system based on distributed optical fiber, characterized in that, include: The data acquisition module is used to acquire raw data collected by the distributed fiber optic strain gauge system during cementing operations. The raw data includes fiber strain data and environmental condition data; A data preprocessing module is used to preprocess the fiber strain data and the environmental state data; The feature extraction module is used to extract features from the processed fiber strain data based on a separable convolutional neural network to obtain a time-series feature vector. The quality assessment module is used to input the time-series feature vector into a pre-trained classification prediction model to obtain the quality level of the cementing operation.

10. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the cementing quality assessment method based on distributed optical fiber as described in any one of claims 1 to 8.