Leakage rate prediction method for static seal based on RGB features and double attention network

CN122886290APending Publication Date: 2026-10-09BEIJING INST OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611065060.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

然而,这类方法存在以下明显缺陷:其一,人工提取的统计特征难以全面表征粗糙表面的复杂纹理信息与空间相关性,导致模型泛化能力不足;其二,现有模型通常将几何形貌与力学接触状态割裂处理,忽略了二者在密封界面处的强耦合关系,无法准确反映实际密封状态;其三,传统卷积神经网络(CNN)采用固定几何结构的感受野,难以适应粗糙表面微观结构的尺度变化,且缺乏对关键特征通道与空间位置的注意力聚焦能力,限制了预测精度的进一步提升

Benefits of technology

[0039]采用上述技术方案的本发明,与现有技术相比,其突出的特点是:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122886290A_ABST
    Figure CN122886290A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of sealing detection, and particularly relates to a static seal leakage rate prediction method based on RGB features and a double attention network; the method specifically comprises the following steps: mapping upper and lower rough surface heights and contact pressure to RGB three channels respectively, and constructing a feature image fusing geometric morphology and stress state; inputting a double attention deformable convolution network, and outputting an effective porosity prediction value with clear physical meaning; and combining with tortuosity to correct a parallel plate percolation model to calculate a leakage rate; the present application accurately captures micro leakage channel features through a DCNv4 and a double attention mechanism, has physical interpretability and second-level calculation efficiency, and solves the problems of low precision, long time consumption of a traditional method and poor generalization ability of an existing deep learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sealing detection technology, specifically a method for predicting static seal leakage rate based on RGB features and a dual attention network. Background Technology

[0002] Static seals are widely used in pipeline flange and pressure vessel connections in petrochemical, nuclear power equipment, and aerospace industries, and their sealing performance directly affects the safe operation of the system. Metal static seals (such as metal O-rings and C-rings) are the preferred sealing method under extreme conditions due to their advantages in high temperature resistance, high pressure resistance, and aging resistance. However, due to machining errors and the randomness of surface micro-morphology, the sealing interface only partially contacts under preload. The uncontacted micro-pits interconnect, forming complex micro-leakage channels through which fluid leaks under pressure differential. Therefore, accurately predicting the leakage rate of the static seal interface is crucial for the safety assessment and reliability design of the sealing structure.

[0003] Traditional methods for predicting static seal leakage rates are primarily based on microscopic contact mechanics and fluid seepage theory. One approach uses the Greenwood-Williamson (GW) microscopic contact model, combined with the parallel plate seepage formula. However, the GW model assumes that the micro-protrusions are spherical and highly Gaussian distributed, making it difficult to accurately characterize the anisotropy and non-Gaussianity of actual machined surfaces, leading to significant discrepancies between predicted and actual leakage rates. Another approach directly calculates the pore distribution at the contact interface using the finite element method, then combines this with computational fluid dynamics (CFD) to simulate fluid flow behavior within the pores. While this method offers high accuracy, it requires extremely fine mesh generation of the micropore structure, resulting in calculations that can take hours or even days, failing to meet the demands of rapid on-site assessment and online monitoring in engineering projects.

[0004] In recent years, with the development of machine learning technology, data-driven leakage rate prediction methods have gradually attracted attention. Existing methods typically use surface roughness parameters (such as Ra, Rz, root mean square roughness, etc.) or contact pressure statistics as input features, and use shallow models such as support vector machines (SVM) and backpropagation (BP) neural networks to establish a mapping relationship between features and leakage rate. However, these methods have the following obvious drawbacks: First, manually extracted statistical features are difficult to fully characterize the complex texture information and spatial correlation of rough surfaces, resulting in insufficient model generalization ability; second, existing models usually treat geometric morphology and mechanical contact state separately, ignoring the strong coupling relationship between the two at the sealing interface, and cannot accurately reflect the actual sealing state; third, traditional convolutional neural networks (CNNs) use a receptive field with a fixed geometric structure, which is difficult to adapt to the scale changes of the microstructure of rough surfaces, and lacks the ability to focus attention on key feature channels and spatial positions, limiting further improvement in prediction accuracy.

[0005] Furthermore, most existing deep learning prediction methods directly output leakage rate values, lacking modeling of intermediate physical quantities. This results in poor physical interpretability of the models and makes them difficult to integrate with classical parallel plate seepage theory, limiting their application in engineering practice. Therefore, there is an urgent need for a static seal leakage rate prediction method that can integrate geometric topography and stress state information, balance computational efficiency and prediction accuracy, and possess physical interpretability. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the purpose of this invention is to provide a static seal leakage rate prediction method based on RGB features and a dual attention network that can integrate the geometric morphology and stress state information of the sealing interface, balance prediction accuracy and computational efficiency, and has physical interpretability.

[0007] The technical solution adopted by this invention to solve its technical problem is:

[0008] A method for predicting static seal leakage rate based on RGB features and a dual-attention network includes the following steps:

[0009] S1: Obtain the height distribution of the upper rough surface, the height distribution of the lower rough surface, and the contact pressure distribution at the corresponding nodes in the sealing interface;

[0010] S2: Perform maximum and minimum normalization on the height distribution of the upper rough surface, the height distribution of the lower rough surface, and the contact pressure distribution respectively. Map the normalized height distribution of the upper rough surface to the red channel of the RGB image, the height distribution of the lower rough surface to the green channel, and the contact pressure distribution to the blue channel to generate a three-channel contact feature image that contains both geometric shape and stress state information.

[0011] S3: Input the three-channel contact feature image into the pre-trained dual-attention deformable convolutional network and output the effective porosity prediction value of the sealed interface; the dual-attention deformable convolutional network uses U-Net as the backbone framework, replaces the standard convolution with deformable convolution modules, and integrates channel attention and spatial attention mechanisms.

[0012] S4: Substitute the obtained predicted effective porosity into the parallel plate seepage model, and calculate the leakage rate of the sealing interface based on the effective porosity and the tortuosity that characterizes the curvature of the fluid flow path.

[0013] As a preferred embodiment, a further technical solution of the present invention is:

[0014] Preferably, in step S1, the height distribution of the upper rough surface and the height distribution of the lower rough surface are acquired by an optical surface profilometer; the acquired original morphology data are subjected to noise reduction processing using wavelet transform.

[0015] Preferably, in step S1, the contact pressure distribution is obtained by mechanical calculation through the construction of a finite element model including the upper flange, the lower flange, and the metal sealing ring; during the construction of the finite element model, the upper and lower flanges are meshed with tetrahedral meshes, and the metal sealing ring is meshed with tetrahedral meshes with mesh sizes smaller than those of the upper and lower flanges; a fixed constraint is applied to the bottom of the lower flange, and beam elements are used to simulate the preload; two pairs of contact pairs are set between the upper flange and the sealing ring, and between the lower flange and the sealing ring; by applying different sizes of preload loads, the contact pressure distribution on the surface of the metal sealing ring under different working conditions is calculated.

[0016] Preferably, in step S2, the minimum value of the height distribution of the upper rough surface, the height distribution of the lower rough surface, and the contact pressure distribution are linearly mapped to a gray value of 0, and the maximum value is linearly mapped to a gray value of 255. The intermediate values ​​are obtained by linear interpolation and rounding to obtain integer gray values ​​in the range of 0-255, generating a three-channel contact feature image with a resolution of 512×512. Each pixel of the image contains the height information of the upper rough surface, the height information of the lower rough surface, and the pressure information at that node.

[0017] Preferably, in step S3, the dual-attention deformable convolutional network uses U-Net as its backbone framework, and the standard convolutions in the encoder and decoder are replaced with deformable convolutional network v4 modules. The encoder and decoder integrate a compressed excitation network v2 module and a convolutional attention module.

[0018] The deformable convolutional network v4 module removes the normalization constraint on the aggregate weights of sampling points and adaptively learns the dynamic offset of the sampling position based on the input features.

[0019] The Compressed Excitation Network v2 module compresses the input feature map into a channel description vector through global average pooling. After nonlinear transformation by a multi-branch fully connected network, channel attention weights are generated. The channel attention weights are then multiplied with the original features channel by channel to complete feature recalibration.

[0020] The convolutional attention module consists of a channel attention submodule and a spatial attention submodule connected in series. The channel attention submodule performs global max pooling and global average pooling on the input feature map along the spatial dimension, and then generates channel attention weights through a multilayer perceptron. The spatial attention submodule takes the feature map processed by the channel attention as input, performs global max pooling and global average pooling along the channel dimension, and then generates a spatial attention map through a convolutional layer.

[0021] Preferably, in step S3, the training of the dual-attention deformable convolutional network employs a joint loss function that combines absolute and relative error constraints. The expression for the joint loss function is as follows:

[0022] ;

[0023] in, The predicted effective porosity value output by the neural network; This represents the true value of effective porosity. The Smooth L1 loss term exhibits a quadratic penalty form when the error is small, but degenerates into a linear penalty form when the error is large. The expression for the relative L1 loss term is:

[0024] ;

[0025] Where N is the batch sample size; To prevent numerical instability, a small constant is set to 10. -6 ; This is the relative loss weight coefficient, with a value of 1, so that the absolute error and the relative error have equal weight during training;

[0026] The training process uses the Adam optimizer, with an initial learning rate set to 10. -5 .

[0027] Preferably, in step S3, the true value of the effective porosity is calculated using a boundary element micro-contact mechanics algorithm, specifically including:

[0028] The three-dimensional discrete nodes of the sealing interface are projected onto a two-dimensional plane. A contact state matrix is ​​generated based on the contact state calculation results, with contact elements assigned a value of 0 and non-contact elements assigned a value of 1. A four-connectivity rule is used to search for connected non-contact elements from the inlet to the outlet, obtaining the first set of connected elements. After swapping the inlet and outlet, the four-connectivity rule is used again to obtain the second set of connected elements. The intersection of the two sets is taken as the effective leakage channel region and assigned a value of 2. The sum of the volumes of all elements within the effective leakage channel region is then calculated. , and the theoretical volume in the uncompressed state The ratio of is the effective porosity. .

[0029] Preferably, in step S4, the basic flow rate calculation formula for the parallel plate seepage model is:

[0030] ;

[0031] in, The gap between parallel plates; For fluid viscosity; To alleviate import pressure; To alleviate export pressure; The outer diameter of the disk; The inner diameter of the disk; The predicted effective porosity value output by S3 The formula for calculating the actual leakage rate after introducing tortuosity correction is as follows:

[0032] ;

[0033] in, This is a correction factor.

[0034] Preferred, ;

[0035] in, For Carnusen's constant, For tortuosity, For effective porosity, These are the morphological feature parameters.

[0036] Preferred to be, tortuosity The Yu tortuosity model is used for calculation, and the expression is as follows:

[0037] ;

[0038] in, Effective porosity; tortuosity is used to characterize the difference between the actual flow path and the macroscopic straight path of fluid in the gap of rough interface. The greater the tortuosity, the more tortuous the flow path and the more significant the resistance to flow.

[0039] The present invention, which adopts the above technical solution, has the following prominent features compared with the prior art:

[0040] 1. A multi-physics fusion strategy based on RGB channel mapping is proposed, which encodes the height of the upper rough surface, the height of the lower rough surface, and the contact pressure into the red, green, and blue color channels, respectively. Without increasing the input dimension of the network, the homogeneous fusion and image representation of geometric shape information and mechanical state information are realized, providing the neural network with input features that contain the complete contact state.

[0041] 2. A dual-attention deformable convolutional network, DADU-Net, was constructed. This network integrates the DCNv4 module with the SEV2 and CBAM dual-attention mechanisms within the U-Net encoding / decoding framework. DCNv4 adaptively learns the dynamic offset of sampling points to adapt to the irregular geometry of rough contact interfaces. The dual-attention mechanism recalibrates the feature maps in both the channel and spatial dimensions, enhancing the learning ability for microscopic leakage channel features. Test set results show that this network predicts the effective porosity with a high R0. 2 It can reach 0.935.

[0042] 3. A parallel plate seepage model with tortuosity correction was established, and the correction coefficient K based on effective porosity was derived to compensate for the calculation deviation caused by the traditional model simplifying the flow path to a straight line. Test data show that the prediction results of the corrected model are in better agreement with the numerical simulation results in the entire pressure range. In particular, the prediction accuracy is significantly improved under the conditions of low medium pressure and significant tortuosity effect of micro leakage channels. Attached Figure Description

[0043] Figure 1 This is a flowchart illustrating the overall architecture of the static seal leakage rate prediction method based on RGB features and a dual attention network in this embodiment of the invention.

[0044] Figure 2 This is a schematic diagram of the network structure of the dual-attention deformable convolutional network DADU-Net in an embodiment of the present invention;

[0045] Figure 3 This is a schematic diagram of the hierarchical structure and feature flow of the DADU-Net encoder and decoder in an embodiment of the present invention;

[0046] Figure 4 This is a schematic diagram illustrating the working principle of the deformable convolution module in an embodiment of the present invention;

[0047] Figure 5 This is a schematic diagram of the sealing interface contact feature image mapping process in an embodiment of the present invention;

[0048] Figure 6This is a schematic diagram illustrating the microstructure evolution of the static sealing leakage channel in an embodiment of the present invention; Figure 6 (a) represents the gap of a smooth surface, indicating the ideal gap state when the upper and lower interfaces are completely in contact; (b) represents the gap of a rough surface, indicating the actual micro gap formed by the surface roughness of the upper and lower interfaces when no force is applied; (c) represents the gap after the rough surface is deformed under force, indicating the actual leakage channel morphology after the interface undergoes elastic / plastic deformation under contact pressure.

[0049] Figure 7 This is a schematic diagram of the effective porosity prediction model based on the DADU-Net network in an embodiment of the present invention.

[0050] Figure 8 This is a schematic diagram of the structure of the channel attention module and the spatial attention module in an embodiment of the present invention;

[0051] Figure 9 This is a contact state demonstration matrix in an embodiment of the present invention;

[0052] Figure 10 This is a comparison chart of the effective porosity prediction results in the embodiments of the present invention; Figure 10 The X-axis represents the test sample number, and the Y-axis represents the predicted effective porosity, which intuitively shows the degree of fit between the actual value and the predicted value, and verifies the accuracy of the DADU-Net network model.

[0053] Figure 11 This is a graph showing the leakage rate variation under different contact pressures in an embodiment of the present invention.

[0054] Figure 12 This is a loss function curve diagram in an embodiment of the present invention;

[0055] Figure 13 This is a comparative curve showing the effect of axial load on the sealing leakage rate in the experimental verification of this invention; the horizontal axis represents the axial load (unit: MPa), and the vertical axis represents the leakage rate (unit: kg / s).

[0056] Figure 14 This is a comparative curve showing the effect of medium pressure on the sealing leakage rate in the experimental verification of this invention; the horizontal axis represents the medium pressure (unit: MPa), and the vertical axis represents the leakage rate (unit: kg / s). Detailed Implementation

[0057] The present invention will be further illustrated below with reference to specific embodiments. The purpose of this illustration is solely to provide a better understanding of the invention. Therefore, the examples given do not limit the scope of protection of the present invention.

[0058] like Figure 1 This invention provides a method for predicting static seal leakage rate based on RGB features and a dual attention network, comprising the following steps:

[0059] S1: Obtain the height distribution of the upper rough surface, the height distribution of the lower rough surface, and the contact pressure distribution at the corresponding nodes in the sealing interface.

[0060] Microscopic morphology data acquisition: Point cloud data of the rough surface was obtained using an optical surface profilometer. Eight sampling regions were selected on each sealing ring and flange structure for microscopic surface morphology measurement. Each sampling region was set to a 1mm × 1mm square area, with a measurement resolution of 1μm. A total of 1001 × 1001 sample points were obtained for each sampling region. The acquired raw three-dimensional morphology point cloud data underwent multi-scale noise reduction processing using wavelet transform to eliminate high-frequency noise interference during the measurement process, thereby reconstructing a realistic and smooth microscopic surface morphology.

[0061] Contact pressure data calculation: Based on the microstructure obtained above, the contact pressure distribution was calculated using finite element simulation. Specifically, a three-dimensional finite element model including an upper flange, a lower flange, and a metal sealing ring was constructed. Material properties were defined: the flange material was 304 stainless steel, and the sealing ring material was GH4169; the elastic modulus of 304 stainless steel was 194 GPa, and its Poisson's ratio was 0.3; the elastic modulus of GH4169 was 204 GPa, and its Poisson's ratio was 0.3. The model was meshed, with the mesh size of the upper and lower flanges set to 5 mm and the mesh size of the sealing ring set to 1 mm, resulting in a total of 183,864 tetrahedral meshes, all using Solid45 elements. A fixed constraint was applied to the bottom of the lower flange, using Beam elements to simulate the preload. Two contact pairs were set in the model, one between the upper flange and the sealing ring, and the other between the lower flange and the sealing ring; the friction coefficient of all contact pairs was set to 0.15. By applying different preloads, the contact pressure distribution on the surface of the metal sealing ring under different working conditions was calculated.

[0062] S2: Max-min normalization is applied to the height distributions of the upper rough surface, the lower rough surface, and the contact pressure distribution, respectively. Based on the multi-channel representation mechanism of digital images, this application encodes the key physical data of the sealing interface into the RGB space: the normalized upper rough surface height is mapped to the red channel, the lower rough surface height to the green channel, and the contact pressure to the blue channel, generating a three-channel contact feature image that can simultaneously characterize the interface geometry and stress state. The mapping process is as follows: Figure 5 As shown.

[0063] Specifically, the height distribution of the upper rough surface, the height distribution of the lower rough surface, and the contact pressure distribution are subjected to maximum and minimum normalization. Considering that pixel values ​​in standard RGB images are usually limited to the integer range of [0, 255], a linear mapping method is used to normalize the original data, and its mathematical expression is as follows.

[0064] ;

[0065] Where X represents the original input data (i.e., the height distribution of the upper rough surface, the height distribution of the lower rough surface, or the contact pressure distribution). and These are the minimum and maximum values ​​of the corresponding dataset, respectively. These are the normalized pixel values.

[0066] Through the above normalization, the minimum value of the original data is linearly mapped to a gray value of 0 (the darkest area), the maximum value is mapped to a gray value of 255 (the brightest area), and the intermediate values ​​are obtained by linear interpolation and rounding to obtain integer gray values ​​in the range of 0-255.

[0067] Subsequently, the processed pixel data is mapped to the three RGB color channels: the upper rough surface height data is mapped to the red (R) channel, the lower rough surface height data h is mapped to the green (G) channel, and the contact pressure distribution data is mapped to the blue (B) channel. This generates a three-channel contact feature image with a resolution of 512×512, where each pixel contains the upper rough surface height, lower rough surface height, and pressure information at that node.

[0068] S3: Input the three-channel contact feature image into a pre-trained dual-attention deformable U-shaped network (DADU-Net), and output the predicted effective porosity of the sealed interface. The overall structure of DADU-Net is as follows: Figure 2 As shown.

[0069] Specifically, the dual-attention deformable U-shaped network (DADU-Net) constructed in this invention aims to predict the effective porosity of a sealing interface with high accuracy from a three-channel contact feature image containing information on geometric topography and mechanical state. This network uses U-Net as its backbone framework, replacing the standard convolutional modules in the encoder and decoder with deformable convolutional network v4 (DCNv4) modules.

[0070] (1) Limitations of traditional convolution and improvements of DCNv4

[0071] In standard convolution operations, the convolution kernel samples the input feature map through a fixed grid R (for example, for a 3×3 convolution kernel, the sampling positions can be represented as...).

[0072] Its output characteristics can be expressed as:

[0073] ;

[0074] in, For the input feature image, To output the feature image, To output the coordinates of the real pixels in the feature map, The sampling location of the convolution kernel. For point Weight at each location.

[0075] This fixed-rule sampling method performs well when processing images with relatively regular structures, but its feature extraction capability is often limited when facing sealed contact interfaces with complex morphology and significant local structural changes (such as rough surfaces and irregular leakage channels). This is because fixed sampling cannot adaptively adjust the receptive field and is difficult to accurately capture micro-geometric features (such as micro-protrusion contact and local deformation of leakage paths).

[0076] To overcome this deficiency, this invention introduces a deformable convolution module (DCN series), which introduces a dynamic offset to the sampling position. This allows the convolution kernel to adaptively adjust the sampling position based on the local geometry of the input features. Taking DCNv4 as an example, its output feature formula becomes:

[0077] ;

[0078] dynamic offset It is not preset and fixed, but rather adaptively learned by the network based on the input features. Specifically, in the DCNv4 module, an additional convolutional layer (denoted as offset) is used. conv The input feature map is convolved, and the output channel number is 2N (N is the number of sampling points, such as N=9 for a 3×3 convolution), generating an offset field. Each element of this offset field corresponds to a two-dimensional coordinate offset. , .

[0079] After obtaining the offset, it is superimposed onto the original regular sampling grid coordinates to obtain the new sampling position. + + Since the learned offset is usually a decimal, the sampling position often falls between the integer coordinates of the pixel. Therefore, bilinear interpolation is used to estimate the feature value at this position: that is, the feature values ​​of the four nearest integer coordinate pixels around this floating-point coordinate are weighted and summed according to their distance, thus obtaining... + + The numerical value of ). Those skilled in the art should understand that by combining the above-mentioned offset prediction with bilinear interpolation, the sampling points of the convolution kernel can break through the limitation of fixed grid and adaptively adjust according to the microscopic geometry of the rough surface. Moreover, the above calculation process can be implemented using standard functions in existing deep learning frameworks (such as PyTorch and TensorFlow) and can be reproduced without creative effort.

[0080] Therefore, the sampling region of the convolution kernel is no longer limited to a regular grid, but can be dynamically adjusted according to the local structure of the input image, thereby significantly enhancing the network's modeling ability in complex geometric feature scenes. Figure 4 This describes the specific process of deformable convolution operations.

[0081] Since the first generation of DCN was proposed, this structure has been continuously expanded. DCNv2 further introduced an offset learning module on the basis of the original model, enabling it to better adapt to features of different scales and shapes. DCNv3 incorporates the idea of ​​separable convolution into the dynamic deformation mechanism of DCNv2, introducing a grouped aggregation strategy. It divides the input channels into G groups, each group independently learning its sampling offset and aggregation weights, realizing multiple parallel deformation modes to enhance spatial feature capture capabilities. Its feature aggregation form can be written as:

[0082] ;

[0083] ;

[0084] In the formula, K represents the number of sampling points in each group (e.g., if a 3×3 convolution kernel is used, K=9); G represents the number of spatially aggregated groups (DCNv4 divides the input channels into G groups, and each group learns the offset and weights independently); Indicates the first The input feature image of the group, Indicates the first The output feature image of the group Indicates the first The first in the group Spatial aggregation weights of each sampling point Indicates the relationship with the first Grid sampling locations in the group The corresponding offset.

[0085] This invention further optimizes the structural design of DCNv3 by employing DCNv4. On one hand, DCNv4 eliminates the Softmax normalization of spatial aggregation weights, giving the aggregation weights an unbounded dynamic range and greater flexibility. On the other hand, DCNv4 significantly reduces redundant storage operations and improves implementation efficiency by simplifying offset calculation paths and cache access methods. Compared to its predecessor, DCNv4 maintains strong deformation feature modeling capabilities while offering superior running speed and computational efficiency.

[0086] (2) Dual attention enhancement mechanism (CBAM+SENetv2)

[0087] To further enhance the network's ability to extract features from key contact information, DADU-Net integrates a dual attention enhancement mechanism in each stage of the encoder and decoder, consisting of a fusion of a convolutional attention module (CBAM) and an improved channel attention network (SEnetv2).

[0088] CBAM Module: To enhance the network's ability to express key features and further improve the accuracy of effective porosity prediction, this study introduces two complementary attention mechanisms into the main network structure: the Convolutional Block Attention Module (CBAM) and the improved channel attention network SE-Net v2 (SEv2). Both recalibrate features from different dimensions, thereby significantly improving the model's feature extraction capability on images with complex microstructures.

[0089] (1) CBAM attention mechanism

[0090] CBAM consists of two parts: the Channel Attention Module (CAM) and the Spartial Attention Module (SAM). Its overall structure is as follows: Figure 5 As shown, in the channel attention part, the input feature map is first subjected to global max pooling and global average pooling along the spatial dimensions (height and width) respectively to compress spatial information and form two feature maps S1 and S2 of size 1×1×C (where C is the number of channels). These two feature maps are then fed into a multilayer perceptron consisting of fully connected layers FC1 and FC2 and a ReLU nonlinear activation function to generate two sets of one-dimensional channel descriptions. After adding the two maps channel by channel, a sigmoid activation is performed to obtain the channel attention weight vector M. c Used to weight and label the importance of different channels.

[0091] The spatial attention module takes the feature maps processed by channel attention as input and obtains feature maps P1 and P2 by performing global max pooling and global average pooling on each channel dimension. These two feature maps are then concatenated along the channel dimension to form a feature description P3. Subsequently, a convolutional layer is used to aggregate local spatial information to generate a spatial attention map M. s It is used to distinguish the relative importance of different spatial locations in the input image. By sequentially superimposing the above channels with spatial attention, CBAM can capture key information across channels and across spaces in a lightweight structure.

[0092] SENetv2 Module: SENet (Squeeze and Excitation Network) is a typical channel attention mechanism. Its core idea is to model the dependencies between channels through a "compression-excitation" operation, thereby improving feature representation capabilities. SENetv2, based on the first-generation SENet, incorporates the multi-branch idea of ​​ResNeXt, further enhancing its nonlinear modeling capabilities along the channel dimension and its global feature integration capabilities. SENetv2 first compresses the input feature map into a 1×1×C channel description vector through global average pooling; then, this vector undergoes a nonlinear transformation through two layers of multi-branch fully connected networks to generate channel attention weights; finally, the input feature map is recalibrated by multiplying these weights with the original features channel by channel. Compared to SENet, SENetv2 increases the number of multi-branch paths and improves the cardinality between layers, enabling the network to aggregate more dimensional feature information, thus significantly improving its ability to represent complex feature patterns with a slight increase in the number of parameters.

[0093] The overall network structure and training logic of this application are as follows: DADU-Net uses U-Net as its backbone. The encoder consists of four downsampling modules, each of which is connected in series with a DCNv4 module, a SEnetv2 channel attention module, and a CBAM hybrid attention module to extract multi-scale irregular geometric features from the rough surface step by step. The decoder, through four upsampling and skip connections, fuses high-level semantic features and shallow detail features, and finally outputs an effective porosity prediction map with the same resolution as the input resolution by a 1×1 convolutional layer (structure as follows). Figure 7 (As shown).

[0094] During the model training phase, the true value of effective porosity is calculated using the boundary element micro-contact mechanics algorithm. The solution process of the boundary element micro-contact mechanics algorithm is as follows: The rough surface is discretized into quadrilateral elements, and the boundary integral equation Hu=Gt is established. Constant elements are used to discretize the displacement and surface force. Contact complementarity conditions are introduced, with zero normal clearance and positive contact pressure for contact elements, and zero contact pressure and positive normal clearance for non-contact elements. The solution is obtained iteratively using the conjugate gradient method, and the rate of change of contact state between two adjacent iterations is less than 10.-5 It converges over time.

[0095] The three-dimensional discrete nodes of the sealing interface are projected onto a two-dimensional plane, and a contact state matrix is ​​generated based on the contact state (contact / non-contact) (contact elements are assigned a value of 0, and non-contact elements are assigned a value of 1). A four-connectivity rule is used to search for connected non-contact elements from the inlet to the outlet along both the forward and reverse directions. The intersection of the two search results is taken as the effective leakage channel region (assigned a value of 2). This matrix is ​​used both to quantitatively calculate the true effective porosity and as a supervisory signal to guide DADU-Net to focus on learning the true leakage path features.

[0096] Furthermore, to ensure the convergence stability, prediction accuracy, and generalization ability of DADU-Net in the effective porosity prediction task, this invention systematically designs the loss function construction, optimization algorithm selection, and learning rate scheduling strategy in model training. The network takes a three-channel contact feature image generated by channel mapping as input and outputs a single scalar form of the predicted effective porosity value. The training process is completed based on a supervised learning framework, using mini-batch stochastic gradient descent for parameter updates.

[0097] Regarding the loss function, considering that the effective porosity may exhibit a large numerical range under different working conditions, and that engineering applications are more concerned with the relative deviation of the prediction results, in this embodiment, the training of the dual-attention deformable convolutional network adopts a joint loss function that combines absolute error and relative error constraints. The expression of the joint loss function is as follows:

[0098] ;

[0099] in, The predicted effective porosity value output by the neural network; This represents the true value of effective porosity. The Smooth-L1 loss term exhibits a quadratic penalty form when the error is small, but degenerates into a linear penalty form when the error is large. The expression for the relative L1 loss term is:

[0100] ;

[0101] Where N is the batch sample size; To prevent numerical instability, a small constant is set to 10. -6 ; This is the relative loss weight coefficient, with a value of 1, so that the absolute error and the relative error have equal weight during training.

[0102] The training process employs the Adam optimizer. Adam dynamically adjusts the learning stride through adaptive estimation of first and second moments, making it suitable for deep network structures containing deformable convolutions and attention modules. It can improve the stability of the gradient update process while maintaining convergence speed. The initial learning rate is set to 10. -5 This chosen value exhibited good numerical stability and convergence characteristics in multiple experiments. To further improve the optimization accuracy in the later stages of training and avoid the oscillation problem caused by a fixed learning rate, this invention introduces cosine annealing learning rate scheduling. Throughout the training cycle, the learning rate smoothly decays with the number of epochs, enabling the model to maintain strong global search capabilities in the early stages of training and gradually shift towards fine-grained weight adjustment in the later stages, thereby helping to reduce training loss and improve the final convergence quality. The total number of training epochs was set to 200, and the learning rate was updated once after each epoch. Model training was completed using a mini-batch strategy with a batch size of 32. During training, the average training loss of each epoch was recorded in real time to monitor the model's convergence behavior. The training loss function curve is as follows: Figure 12 As shown.

[0103] The true value of effective porosity is calculated using the boundary element micro-contact mechanics algorithm, and the resulting contact state demonstration matrix is ​​as follows: Figure 9 As shown, the specific steps include: projecting the three-dimensional discrete nodes of the sealing interface onto a two-dimensional plane; generating a contact state matrix based on the contact state calculation results, assigning a value of 0 to contact elements and a value of 1 to non-contact elements; using the four-connectivity rule to search for connected non-contact elements from the inlet to the outlet to obtain the first set of connected elements; swapping the inlet and outlet and then using the four-connectivity rule again to obtain the second set of connected elements; taking the intersection of the two sets as the effective leakage channel region and assigning a value of 2; and calculating the sum of the volumes of all elements within the effective leakage channel region. , and the theoretical volume in the uncompressed state The ratio of is the effective porosity. .

[0104] S4: Substitute the obtained predicted effective porosity into the parallel plate seepage model, and calculate the leakage rate of the sealing interface based on the effective porosity and the tortuosity that characterizes the curvature of the fluid flow path.

[0105] In step S4, to establish a theoretical model of the leakage behavior at the flange sealing interface, the two sealing surfaces with microscopic roughness are first idealized as two smooth parallel plates maintaining a certain gap height, such as... Figure 6 As shown in (a). Under this assumption, the leakage flow within the sealing interface can be considered as radial thin-film flow within the parallel disk gap. Based on the simplification of the Navier-Stokes equations according to lubrication theory, the basic flow rate of the parallel plate seepage model can be obtained; the formula for calculating the basic flow rate of the parallel plate seepage model is:

[0106] ;

[0107] in, The gap between parallel plates; For fluid viscosity; The outer diameter of the disk; This is the inner diameter of the disk. Representing the pressure gradient, satisfying:

[0108] ;

[0109] in, To alleviate import pressure; For the outlet pressure. Therefore, the basic flow rate calculation formula for the parallel plate seepage model is:

[0110] ;

[0111] in, The predicted effective porosity value output by S3 .

[0112] In real engineering, the sealing interface is not a smooth and flat structure, but rather has a microscopic roughness due to the unavoidable machining process, such as... Figure 6 As shown in (b), when the sealing surface is subjected to external pressure load, its surface micro-protrusions undergo elastoplastic contact deformation, significantly reducing the local flow channel height and forming a more tortuous micro-flow path, such as... Figure 6 As shown in (c). To incorporate the effects of rough surface morphology, microscopic contact deformation, and channel contraction on leakage behavior into the model, effective porosity is introduced to adjust the theoretical flow rate. Effective porosity comprehensively describes the effective flow area of ​​the real microscopic channel, the degree of channel tortuosity, and the influence of the surface contact blockage area, and can be regarded as an equivalent parameter connecting microscopic rough surface characteristics and macroscopic leakage behavior. Therefore, the actual leakage rate of the sealing interface can be written as:

[0113] ;

[0114] in, To account for the tortuosity correction factor, the actual fluid leakage path at the sealing interface is not the regular parallel plate gap assumed in the ideal model. Due to the randomness of the rough surface, the spatial distribution of micro-protrusions, and the blocking effect of local contact areas on the flow channel, the actual flow path of the fluid in the sealing gap often exhibits obvious tortuosity, elongation, or local flow around, and its effective flow path length is usually greater than the straight distance defined by the macroscopic geometry. Based on this, the leakage volume predicted by the traditional parallel gap model is often lower than the actual value. Therefore, it is necessary to introduce a physical quantity describing the degree of flow channel tortuosity to improve the accuracy of the leakage model. To characterize the difference between the actual flow path and the macroscopic straight path of the fluid in the rough interface gap, this study introduces the concept of tortuosity to correct the theoretical leakage model. The greater the tortuosity, the more tortuous the path of the fluid in the microporous structure, and the more significant the resistance to flow. The leakage path correction factor K after considering the tortuosity correction can be expressed as:

[0115] ;

[0116] in, For Carnusen's constant, For tortuosity, For effective porosity, These are the topographic feature parameters; in this embodiment, the root mean square roughness formula is used to calculate the topographic feature parameters, and the expression is as follows:

[0117] ;

[0118] in, For discrete point height values, is the average height value, and N is the number of discrete points.

[0119] Based on the characterization at the microscale, this invention further employs a classical tortuosity model to describe the degree of curvature of the pore path, the expression of which is:

[0120] ;

[0121] in, For the degree of curvature, Effective porosity; tortuosity is used to characterize the difference between the actual flow path and the macroscopic straight path of fluid in the gap of rough interface. The greater the tortuosity, the more tortuous the flow path and the more significant the resistance to flow.

[0122] To verify the effectiveness of the static seal leakage rate prediction method based on RGB features and dual attention network of the present invention, the following verification was conducted:

[0123] 1. Data Acquisition and Model Training

[0124] To construct a large-scale dataset suitable for deep learning training, this embodiment employs a strategy combining "measured morphology + parametric simulation" to generate samples. First, 80 sets of surface micromorphological data for sealing rings and flanges (covering different processing conditions with Ra ranging from 0.8μm to 3.2μm) were obtained through actual measurements using an optical surface profilometer. Then, using the measured morphology as geometric input, a three-dimensional finite element model containing the upper flange, lower flange, and metal sealing ring was constructed. Parametric scanning calculations were performed by changing the preload (10kN-50kN) and the medium pressure boundary conditions, ultimately generating a static sealing dataset containing 2000 samples.

[0125] For each set of samples, the specific data generation process is as follows:

[0126] Microscopic morphology generation: Based on the optical profilometer measurement method in S1 (or simulated by a parameterized random rough surface generation algorithm), the height distribution of the upper and lower rough surfaces is obtained;

[0127] Contact pressure calculation: Based on the finite element model in S2 (or the reconstructed ABAQUS model), the contact pressure distribution on the surface of the metal sealing ring is calculated;

[0128] True value label generation: The height distribution of micro-morphology and the contact pressure distribution are used as inputs, and the boundary element micro-contact mechanics algorithm is used to calculate the true value of effective porosity, which is then used as the training label.

[0129] The specific implementation steps of this process are as follows:

[0130] First, the three-dimensional discrete nodes of the sealing interface are projected onto a two-dimensional plane, and the contact state of each discrete element is determined based on the boundary element micro-contact calculation results. Contact elements are assigned a value of 0, and non-contact elements are assigned a value of 1, thus forming a contact state matrix that reflects the spatial contact distribution of the sealing interface, such as... Figure 9 As shown.

[0131] Based on this, to identify continuous void structures from the entrance to the exit, this invention constructs a search strategy based on the four-connectivity rule. Specifically, starting from all contact grids marked as 1 at the entrance position, the contact status of its four adjacent cells (up, down, left, and right) is determined; if the adjacent cells are also in a non-contact state, the search pointer is moved to that cell, and its coordinates are added to the connected cell set 1, and then the above search steps are repeated. The path search terminates when the search path reaches the preset exit position, or when all reachable paths have been searched. This process is as follows: Figure 8 As shown.

[0132] To ensure that the obtained connectivity path can indeed form a through-leakage channel, reverse verification is needed on the exit side. Specifically, the inlet and outlet are swapped, and all contact units at the exit are used as new starting points. The same four-connectivity search algorithm as described above is applied to form another set of connected units, 2. Finally, the intersection of set 1 and set 2 is taken to ensure that only gaps that can be connected from both the inlet and outlet are retained, thus obtaining the actual leakage channel region. Reassigning the intersection unit to 2 yields the following result: Figure 9 Final classification: Grids with a value of 0 represent the actual contact area, grids with a value of 1 represent ineffective pores that are voids but are sealed and do not participate in leakage, and grids with a value of 2 represent effective leakage channels that are interconnected and penetrate the sealing interface.

[0133] After identifying the leakage channels, the height z of all cells marked as 2 is extracted. Combined with the cell length and width information of the 2D mesh, the local volumes of these cells are summed to obtain the total volume of the effective leakage channels. Compare this volume with the theoretical volume in the initial uncompressed state. The effective porosity of the sealing interface can be obtained by calculating the ratio. .

[0134] Finally, the effective porosity was obtained from the surface morphology of the 80 sets of sealing rings and flanges measured using the above method, and the training data and test data were divided into 64 sets of training data and 16 sets of test data in a 4:1 ratio.

[0135] The dataset was divided into training and testing sets in an 8:2 ratio.

[0136] The network training environment was configured with an NVIDIA RTX 3090 graphics card and the PyTorch framework. The dual-attention deformable convolutional network DADU-Net was trained using a joint loss function that combines absolute and relative error constraints. The number of training epochs was set to 200, the batch size to 32, and the initial learning rate to 10. -5 And a cosine annealing strategy is used for dynamic adjustment.

[0137] 2. DADU-Net Network Performance Verification

[0138] The trained DADU-Net model was validated using test set data, and the prediction results were compared with the true values ​​calculated by the boundary element method. Figure 10 The figure shows a comparison of the predicted effective porosity results, where the X-axis represents the test sample number and the Y-axis represents the effective porosity value. The predicted values ​​and true values ​​show a high linear correlation, with a goodness-of-fit R².2 The mean absolute error (MAE) reached 0.935, the mean absolute error (MAE) was 0.00582, and the mean squared error (MSE) was as low as 7.08 × 10⁻⁶. -5 .

[0139] The calculation formulas for each indicator are as follows:

[0140] ;

[0141] ;

[0142] ;

[0143] in, This represents the true value of effective porosity. For predicted values, is the average of the true values; n is the sample size. MSE and MAE are used to measure the absolute magnitude of the prediction error; the smaller the value, the higher the model's prediction accuracy; the coefficient of determination R... 2 The value range is (−∞, 1], and the closer the value is to 1, the better the model can fit the trend of data change.

[0144] The statistical results of each evaluation indicator are shown in Table 1. The MSE in the test set is 7.08 × 10⁻⁶. -5 MAE is 0.00582, R 2 It reached 0.9354.

[0145] Table 1

[0146] numerical values <![CDATA[7.08×10 -5 ]]> 0.00582 0.9354

[0147] The above results demonstrate that DADU-Net not only has extremely high numerical accuracy in the effective porosity prediction task, but also has excellent fitting ability to the data distribution.

[0148] Considering the highly irregular geometry and dramatic changes in local features of the rough sealing contact interface, the above performance verifies the advantages of the DCNv4 module in adaptively sensing irregular geometries, and the effectiveness of the CBAM and SEv2 dual attention mechanism in enhancing key contact features. This model can accurately approximate the effective porosity results based on physical calculations while maintaining computational efficiency, providing reliable input parameters for subsequent leakage rate prediction.

[0149] 3. Improve the verification of the seepage model

[0150] To verify the accuracy of the improved parallel plate seepage model that considers fluid tortuosity proposed in this invention, the effective porosity predicted by DADU-Net was substituted into the improved model, the leakage rate under different operating conditions was calculated, and the results were compared and analyzed with the numerical simulation results of the commercial software Fluent.

[0151] like Figure 11 The figure shows the leakage rate variation curves under different contact pressures, where the X-axis represents the contact pressure (unit: MPa) and the Y-axis represents the leakage rate (unit: kg / s). As can be seen from the figure, there is a significant systematic deviation between the prediction results of the unoptimized traditional parallel plate model and the Fluent simulation results, especially under low-pressure conditions, exhibiting an overestimation or underestimation of the leakage rate. In contrast, the improved parallel plate model, after incorporating tortuosity correction, shows good consistency with the simulation results across the entire pressure range.

[0152] Especially in the low-to-medium pressure range (50-200 MPa), the improved model not only accurately captures the trend of leakage rate changes with pressure, but also closely matches the simulation results in terms of both magnitude and amplitude, significantly improving the prediction bias caused by the traditional model in the low-pressure region due to neglecting the flow path tortuosity effect. As the pressure further increases, although there are still slight deviations in the high-pressure, low-leakage-rate range, the improved model can still accurately reflect the overall law of leakage rate decreasing with increasing pressure, and the prediction results always remain within the same order of magnitude as the simulation results.

[0153] The above results verify the necessity of introducing a tortuosity correction factor: the traditional parallel plate model simplifies the fluid flow path to a straight line, failing to consider the bending and blocking effects of the distribution of micro-protrusions on the rough surface and the local contact area on the flow path; while the present invention introduces a tortuosity parameter based on effective porosity, incorporating the geometric complexity and connectivity characteristics of the non-contact area into the leakage rate calculation, effectively improving the physical rationality and prediction accuracy of the model under different pressure conditions.

[0154] Furthermore, by combining DADU-Net's high-precision prediction capability for effective porosity, the "deep learning + improved seepage model" coupled method constructed in this invention achieves accurate characterization of leakage behavior at complex sealing interfaces while maintaining second-level computational efficiency, providing a theoretical tool with both accuracy and efficiency for rapid evaluation of sealing performance in engineering.

[0155] 4. Ablation test

[0156] To systematically verify the contribution of each key module in the Dual Attention Deformable Convolutional Network (DADU-Net) to the effective porosity prediction performance, this invention designed and conducted ablation experiments. Specifically, while maintaining consistency in training data partitioning, optimizer configuration, loss function form, and learning rate scheduling strategy, the DCNv4 deformable convolutional module, the SEv2 channel attention module, and the CBAM spatial-channel joint attention module were removed one by one or in combination, resulting in the construction of six control models. Their specific configurations are shown in Table 2.

[0157] Table 2

[0158] Model-1 Remove DCNv4 module Model-2 Remove SEv2 module Model-3 Remove CBAM module Model-4 Remove CBAM and SEv2 modules simultaneously. Model-5 Remove both DCNv4 and CBAM modules. Model-6 Remove both DCNv4 and SEv2 modules.

[0159] The same test set was used to evaluate the prediction performance of the above seven models. The results are shown in Table 3. In the table, "Ourmodel" refers to the DADU-Net dual attention deformable convolutional network model proposed in this invention (i.e., the leakage rate prediction model based on RGB channel mapping + DCNv4 + CBAM + SEv2).

[0160] Table 3

[0161] MSE 0.00126 0.00131 0.00112 0.0011 0.00113 0.00119 7.08×10-5 MAE 0.0179 0.0183 0.0273 0.0285 0.0165 0.0167 0.00582 R2 0.271 0.244 0.351 -0.0175 0.343 0.313 0.935

[0162] As shown in Table 3, after removing the DCNv4 module, the MSE of Model-1 increased by nearly two orders of magnitude, and the MAE increased to 0.0179. 2 The prediction performance plummeted to 0.271, indicating a significant degradation. This demonstrates that the DCNv4 deformable convolutional module is the core factor driving performance improvement in this task, and its adaptive sampling mechanism plays a crucial role in capturing the irregular geometric features of rough contact interfaces.

[0163] Both Model-2 and Model-3 showed varying degrees of decrease in prediction accuracy after removing the SEv2 or CBAM modules, respectively. Model-3 achieved the highest MAE (0.0273) among all models, indicating the irreplaceable role of the CBAM module in guiding the network to focus on key contact areas. Model-4, after completely removing the attention mechanism, showed a decrease in R... 2 The appearance of a negative value (-0.0175) indicates that the model has completely lost its ability to fit the changing trend of effective porosity.

[0164] The comparison between Model-5 and Model-6 further verifies the complementarity of the dual attention mechanism: under the condition of no deformable convolution, the introduction of a single attention module can improve performance to a certain extent, but its gain is far lower than the synergistic combination of the three.

[0165] In summary, the synergistic effect among DCNv4 deformable convolution, SEv2 channel attention, and CBAM spatial-channel attention is a key factor in the model's ability to effectively reduce prediction errors and accurately capture key regions and complex geometric information in contact feature images. The organic combination of these three elements significantly enhances the model's ability to represent complex and rough contact interface features and its prediction robustness, providing crucial structural support for high-precision effective porosity prediction.

[0166] 5. Comparative Study

[0167] To comprehensively evaluate the performance advantages of the DADU-Net model proposed in this invention in the task of predicting effective porosity, ResNet50, YOLOv8+DCNv4 network and Transformer network based on self-attention mechanism were selected as comparative models for systematic comparative study.

[0168] ResNet50, a classic deep convolutional neural network architecture, demonstrates excellent training stability and generalization ability in image classification and regression analysis tasks thanks to its residual connection mechanism. YOLOv8, a rapidly developing high-performance object detection network in recent years, exhibits significant advantages in handling image tasks with uneven feature distribution and significant scale variations due to its multi-scale feature extraction and fusion structure; its combination with the deformable convolutional module of DCNv4 further enhances the model's ability to perceive complex geometric shapes. Transformer networks, based on a self-attention mechanism, demonstrate powerful global feature modeling capabilities in image understanding and complex pattern recognition tasks.

[0169] 6. Experimental verification

[0170] To verify the engineering applicability of the method of this invention, a static seal leakage rate test bench was built for verification. The test bench consists of a hydraulic loading system, a medium pressurization system, and a high-precision mass acquisition system. The metal O-ring is used as the test object, and the medium is No. 46 hydraulic oil.

[0171] The correspondence between hydraulic press load and sealing surface contact pressure was established through macroscopic finite element simulation (total number of model meshes: 101223; upper / lower flange material: 304 stainless steel; sealing ring material: GH4169; friction coefficient: 0.15). The contact pressure distribution under different axial loads was obtained, providing pressure boundary conditions for subsequent leakage rate prediction.

[0172] (1) Effect of axial load on leakage rate

[0173] Leakage rate was tested under a medium pressure of 5 MPa in the axial load range of 60 kN-120 kN (each load group was measured three times and the average was taken). Figure 13 As shown, the experimental measurements (black squares) are on the order of 10.-10 kg / s, showing a decreasing trend with increasing load; the predicted value (blue dot) of the method of this invention is highly consistent with the experimental value in terms of order of magnitude and trend; the predicted value (red triangle) of the unoptimized parallel plate model is one order of magnitude higher (approximately 10 kg / s). -9 (kg / s), and the trend deviates from the experiment. The above results verify the effectiveness of the method of the present invention in capturing the load-leakage rate coupling mechanism.

[0174] (2) The effect of medium pressure on leakage rate

[0175] Under an axial load of 110 kN, the leakage rate of the tested medium within a pressure range of 5 MPa-6.2 MPa was measured (each pressure group was measured three times and the average was taken). Figure 14 As shown, the experimental measurements (black squares) remain on the order of 10. −10 The pressure increased slowly with increasing pressure (kg / s); the predicted value (blue dot) of the method of this invention was consistent with the experimental value in terms of order of magnitude and trend; the predicted value (red triangle) of the traditional parallel plate model was too high and showed a significant linear increase, deviating from the experimental trend. The above results verify the physical rationality of the method of this invention under varying medium pressure.

[0176] In summary, the innovation of this invention lies in:

[0177] 1. A multi-physics fusion strategy based on RGB channel mapping is proposed, which encodes the height of the upper and lower surfaces and the contact pressure into a three-channel image, realizing the homogeneous fusion of geometric shape and mechanical state information.

[0178] 2. A dual-attention deformable convolutional network, DADU-Net, was constructed, integrating DCNv4, CBAM, and SEV2 modules. Test set results show that the MSE for predicted effective porosity is 7.08 × 10⁻⁶. −5 MAE is 0.00582, R 2 The score reached 0.935, which is significantly better than comparable models such as ResNet50 and Transformer.

[0179] 3. An improved parallel flat plate seepage model considering tortuosity correction was established, and a correction coefficient based on effective porosity was introduced. Comparison with Fluent simulations shows that the improved model effectively eliminates the systematic biases of the traditional model across the entire pressure range, especially under medium and low pressure conditions.

[0180] 4. Physical experiments have verified that the predicted leakage rate of the method of this invention is on the order of magnitude (10). −10 The results (kg / s) and trends are consistent with the experimental results, and the model has stronger engineering applicability compared to the unoptimized model.

[0181] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of the invention. All equivalent changes made based on the description and drawings of the present invention are included within the scope of the present invention.

Claims

1. A method for predicting static seal leakage rate based on RGB features and a dual-attention network, characterized in that, Includes the following steps: S1: Obtain the height distribution of the upper rough surface, the height distribution of the lower rough surface, and the contact pressure distribution at the corresponding nodes in the sealing interface; S2: Perform maximum and minimum normalization on the height distribution of the upper rough surface, the height distribution of the lower rough surface, and the contact pressure distribution respectively. Map the normalized height distribution of the upper rough surface to the red channel of the RGB image, the height distribution of the lower rough surface to the green channel, and the contact pressure distribution to the blue channel to generate a three-channel contact feature image that contains both geometric shape and stress state information. S3: Input the three-channel contact feature image into the pre-trained dual-attention deformable convolutional network and output the effective porosity prediction value of the sealed interface; the dual-attention deformable convolutional network uses U-Net as the backbone framework, replaces the standard convolution with deformable convolution modules, and integrates channel attention and spatial attention mechanisms. S4: Substitute the obtained predicted effective porosity into the parallel plate seepage model, and calculate the leakage rate of the sealing interface based on the effective porosity and the tortuosity that characterizes the curvature of the fluid flow path.

2. The static seal leakage rate prediction method based on RGB features and dual attention network according to claim 1, characterized in that: In step S1, the height distribution of the upper rough surface and the height distribution of the lower rough surface are acquired by an optical surface profilometer; the acquired raw morphology data are denoised using wavelet transform.

3. The static seal leakage rate prediction method based on RGB features and dual attention network according to claim 1, characterized in that: In step S1, the contact pressure distribution is obtained by mechanical calculation through the construction of a finite element model including the upper flange, lower flange, and metal sealing ring. During the construction of the finite element model, the upper and lower flanges are meshed with tetrahedral meshes, and the metal sealing ring is meshed with tetrahedral meshes with mesh sizes smaller than those of the upper and lower flanges. A fixed constraint is applied to the bottom of the lower flange, and beam elements are used to simulate the preload. Two pairs of contact are set up: one between the upper flange and the sealing ring, and the other between the lower flange and the sealing ring. By applying different sizes of preload loads, the contact pressure distribution on the surface of the metal sealing ring under different working conditions is calculated.

4. The static seal leakage rate prediction method based on RGB features and dual attention network according to claim 1, characterized in that: In step S2, the minimum values ​​of the upper rough surface height distribution, the lower rough surface height distribution, and the contact pressure distribution are linearly mapped to a gray value of 0, and the maximum values ​​are linearly mapped to a gray value of 255. The intermediate values ​​are obtained by linear interpolation and rounding to obtain integer gray values ​​in the range of 0-255, generating a three-channel contact feature image with a resolution of 512×512. Each pixel of the image contains the upper rough surface height information, the lower rough surface height information, and the pressure information at that node.

5. The static seal leakage rate prediction method based on RGB features and dual attention network according to claim 4, characterized in that: In step S3, the dual-attention deformable convolutional network uses U-Net as its backbone framework. The standard convolutions in the encoder and decoder are replaced with deformable convolutional network v4 modules. The encoder and decoder integrate a compressed excitation network v2 module and a convolutional attention module. The deformable convolutional network v4 module removes the normalization constraint on the aggregate weights of sampling points and adaptively learns the dynamic offset of the sampling position based on the input features. The Compressed Excitation Network v2 module compresses the input feature map into a channel description vector through global average pooling. After nonlinear transformation by a multi-branch fully connected network, channel attention weights are generated. The channel attention weights are then multiplied with the original features channel by channel to complete feature recalibration. The convolutional attention module consists of a channel attention submodule and a spatial attention submodule connected in series. The channel attention submodule performs global max pooling and global average pooling on the input feature map along the spatial dimension, and then generates channel attention weights through a multilayer perceptron. The spatial attention submodule takes the feature map processed by the channel attention as input, performs global max pooling and global average pooling along the channel dimension, and then generates a spatial attention map through a convolutional layer.

6. The static seal leakage rate prediction method based on RGB features and dual attention network according to claim 5, characterized in that: In step S3, the training of the dual-attention deformable convolutional network employs a joint loss function that combines absolute and relative error constraints. The expression for the joint loss function is as follows: ; in, The predicted effective porosity value output by the neural network; This represents the true value of effective porosity. The Smooth L1 loss term exhibits a quadratic penalty form when the error is small, but degenerates into a linear penalty form when the error is large. The expression for the relative L1 loss term is: ; Where N is the batch sample size; To prevent numerical instability, a small constant is set to 10. -6 ; This is the relative loss weight coefficient, with a value of 1, so that the absolute error and the relative error have equal weight during training.

7. The static seal leakage rate prediction method based on RGB features and dual attention network according to claim 6, characterized in that: In step S3, the true value of the effective porosity is calculated using the boundary element micro-contact mechanics algorithm, specifically including: The three-dimensional discrete nodes of the sealing interface are projected onto a two-dimensional plane. A contact state matrix is ​​generated based on the contact state calculation results, with contact elements assigned a value of 0 and non-contact elements assigned a value of 1. A four-connectivity rule is used to search for connected non-contact elements from the inlet to the outlet, obtaining the first set of connected elements. After swapping the inlet and outlet, the four-connectivity rule is used again to obtain the second set of connected elements. The intersection of the two sets is taken as the effective leakage channel region and assigned a value of 2. The sum of the volumes of all elements within the effective leakage channel region is then calculated. , and the theoretical volume in the uncompressed state The ratio of is the effective porosity. .

8. The static seal leakage rate prediction method based on RGB features and dual attention network according to claim 1, characterized in that: In step S4, the basic flow rate calculation formula for the parallel plate seepage model is: ; in, The gap between parallel plates; For fluid viscosity; To alleviate import pressure; To alleviate export pressure; The outer diameter of the disk; The inner diameter of the disk; The predicted effective porosity value output by S3 The formula for calculating the actual leakage rate after introducing tortuosity correction is as follows: ; in, This is a correction factor.

9. The static seal leakage rate prediction method based on RGB features and dual attention network according to claim 8, characterized in that: The formula for calculating the correction factor K is as follows: ; in, For Carnusen's constant, For tortuosity, For effective porosity, These are the morphological feature parameters.

10. The static seal leakage rate prediction method based on RGB features and dual attention network according to claim 9, characterized in that: Degree of curvature The Yu tortuosity model is used for calculation, and the expression is as follows: ; in, Effective porosity; tortuosity is used to characterize the difference between the actual flow path and the macroscopic straight path of fluid in the gap of rough interface. The greater the tortuosity, the more tortuous the flow path and the more significant the resistance to flow.