Aircraft vortex identification training method, device, equipment and medium based on self-supervised Swin Transformer and transfer learning
Through the self-supervised Swin Transformer and transfer learning methods, the vortex structure of the aircraft is extracted, which solves the problem of difficulty in identifying vortex structures in complex flow fields in existing technologies, and realizes the automatic identification of aircraft design and rapid evaluation of multiple schemes.
Patent Information
- Application Number
- CN202511008295.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-07-22
AI Technical Summary
Existing technologies have difficulty in accurately identifying aircraft vortex structures in complex flow fields, especially when faced with irregular geometric shapes. The model is prone to overfitting and the data cost is high, making it difficult to obtain sufficient samples to train the model.
A method based on self-supervised Swin Transformer and transfer learning is adopted to extract multi-scale flow features through a multi-head attention mechanism, and voxel-level supervised training is combined with transposed convolution to generate a vortex probability distribution map.
It realizes the automatic identification of vortices in complex flow fields, improves calculation efficiency and accuracy, and is particularly suitable for rapid evaluation of multiple schemes in the aircraft design stage.
Smart Images

Figure CN120508968B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fluid simulation big data intelligent analysis, and in particular to an aircraft vortex identification training method, device, equipment and medium based on self-supervised SwinTransformer and transfer learning. Background Art
[0002] In the aerodynamic design of aerospace vehicles, vortex identification is a core technology for analyzing aerodynamic performance, optimizing vehicle shapes such as wings, fuselages, and control surfaces, and reducing aerodynamic noise. Typical application scenarios include: 1. Wing / fuselage aerodynamic optimization: Accurately identifying boundary layer separation vortices, leading edge vortices, and wake vortex structures is key to reducing induced drag and improving lift coefficients; 2. Engine inlet design: Capturing shock wave-vortex interactions within the inlet to avoid thrust loss caused by airflow separation; 3. Maneuvering flight stability analysis: Dynamically tracking the evolution of unsteady vortices, such as wing vortex breakup and tail buffeting vortices during high angle-of-attack flight, to ensure vehicle control stability.
[0003] However, due to the irregular geometries such as curved surfaces, gaps, and protrusions on the surface of the aircraft (such as the diamond-shaped fuselage and variable-sweep wing shaft of the fifth-generation aircraft), the flow field is irregularly distributed in the physical space. The physical-driven method directly extracts the vortex structure from the flow field based on the implicit vortex definition and flow behavior characteristics, which easily loses the boundary layer velocity gradient information near the wall, resulting in missed detection of separated vortices near the geometric boundary; and the data-driven method is extremely expensive for high-precision flow field data in the aerospace field, and the vortex structure annotation needs to be combined with the experience of aerodynamic experts (such as judging the position and rotation direction of the vortex core), making it difficult to obtain sufficient samples to train the model.
[0004] In recent years, researchers have designed a series of intelligent vortex identification methods using convolutional neural networks, ResNet, U-Net, Transformer, and graph neural networks, and have made some progress. However, these methods still face challenges in generalization and engineering practicality. Existing methods are mostly based on simplified models (such as two-dimensional flat plates and flow around cylinders). When faced with the complex flow fields of real aircraft, due to the geometric complexity of the flow field and the diversity of boundary conditions, the models are prone to overfitting and cannot accurately identify vortex structures under untrained conditions. Summary of the Invention
[0005] In light of this, the present invention aims to provide a method, apparatus, device, and medium for aircraft vortex identification training based on a self-supervised Swin Transformer and transfer learning, which can accurately identify vortices in aircraft flow fields. The specific scheme is as follows:
[0006] In a first aspect, the present application discloses an aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning, comprising:
[0007] Obtaining irregular grid velocity field data of the target aircraft; wherein the irregular grid velocity field data is flow field data generated by fluid dynamics simulation of the irregular geometric shape of the target aircraft surface;
[0008] Performing data conversion processing on the irregular grid velocity field data based on coordinate transformation technology to obtain a Cartesian grid velocity field suitable for a vortex identification model;
[0009] The multi-head attention mechanism of the Swin Transformer module of the vortex identification model is used to perform self-supervised learning on the velocity field blocks of the Cartesian grid velocity field to extract hierarchical features to obtain multi-scale flow features; wherein the multi-scale flow features include multi-scale spatial features of the velocity field, dynamic features of the velocity field, spatial position and geometric constraint information, and hierarchical information of multi-scale flow patterns;
[0010] The output structure of the vortex recognition model is fine-tuned to obtain a predicted value of the vortex area through transposed convolution of the multi-scale flow features, and voxel-level supervised training is performed to obtain a trained vortex recognition model; wherein the vortex recognition model is a model obtained based on a self-supervised Swin Transformer pre-training strategy and transfer learning fine-tuning supervised training.
[0011] Optionally, performing data conversion processing on the irregular grid velocity field data based on a coordinate transformation technology to obtain a Cartesian grid velocity field suitable for a vortex identification model includes:
[0012] The irregular grid velocity field data is converted according to a preset mapping rule to obtain initial converted velocity field data; wherein the preset mapping rule is a rule for mapping between the velocity field data of the aircraft surface flow field and the velocity field data of the uniform calculation space;
[0013] The velocity field data after the initial transformation is normalized and selected, and the normalized velocity field is used as the Cartesian grid velocity field.
[0014] Optionally, the Swin Transformer module includes a block embedding layer and a hierarchical feature extraction layer;
[0015] Accordingly, the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model is used to perform self-supervised learning on the velocity field blocks of the Cartesian grid velocity field, extracting hierarchical features to obtain multi-scale flow features, including:
[0016] Inputting the velocity field blocks into the block embedding layer, so that the block embedding layer performs block projection on the velocity field blocks to obtain a plurality of block label sequences;
[0017] Constructing a position deviation matrix based on the relative position information of each block marker sequence in the corresponding preset local window;
[0018] The attention weights of the block mark sequence and the position deviation matrix in each preset local window are calculated by the multi-head attention mechanism of the hierarchical feature extraction layer, and then all the attention weights are spliced and output to extract local multi-scale flow features;
[0019] The multi-head attention mechanism of the hierarchical feature extraction layer is used to calculate the attention weights of the block label sequence and the local multi-scale flow features based on a preset shift window to obtain updated multi-scale flow features.
[0020] Optionally, the output structure is a U-Net structure with transposed convolution;
[0021] Accordingly, the output structure of the vortex recognition model is fine-tuned to obtain the predicted value of the vortex area by transposed convolution of the multi-scale flow features, and voxel-level supervised training is performed, including:
[0022] The multi-scale flow features are upsampled by the transposed convolution of the U-Net structure to generate a vortex probability distribution map for voxel-level supervised training.
[0023] Optionally, before performing self-supervised learning on the velocity field blocks of the Cartesian grid velocity field through the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model, the method further includes:
[0024] Construct an initial vortex recognition model with a three-dimensional Swin Transformer as the backbone network;
[0025] Reconstruct and normalize the unlabeled aircraft velocity field data to obtain the preprocessed velocity field;
[0026] Clipping the preprocessed velocity field according to a preset spatial clipping rule to obtain an enhanced velocity field that characterizes the spatial distribution diversity of vortices in the aircraft velocity field;
[0027] Performing block processing and masking processing on the enhanced velocity field to obtain unmasked velocity field blocks; wherein the unmasked velocity field blocks are visible areas of the velocity field blocks after the enhanced velocity field blocks are not covered by the mask;
[0028] Inputting the unmasked velocity field blocks into the Swin Transformer module of the initial vortex identification model so that the Swin Transformer module projects the enhanced velocity field blocks to obtain an initial block label sequence;
[0029] Downsampling training is performed on the SwinTransformer module of the initial vortex recognition model using the initial block label sequence and a block merging technique to obtain a downsampled feature map;
[0030] Inputting the downsampled feature map into the output structure of the initial vortex identification model so that the output structure upsamples the downsampled feature map to obtain an upsampled feature map, and performing masked region reconstruction processing based on the upsampled feature map to obtain a reconstructed velocity field;
[0031] A preset reconstruction loss function is used to calculate the loss value of the masked area according to the reconstructed velocity field and the preprocessed velocity field, and the module parameters of each module of the initial vortex identification model are reversely updated based on the loss value until the loss value meets the first preset loss value condition and the updating is stopped, and the model under the current module parameters is output as the vortex identification model.
[0032] Optionally, the aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning further includes:
[0033] Performing tensor prediction of the vortex structure on the downsampled feature map using a transposed convolution of the output structure of the vortex recognition model to output a tensor prediction value of the corresponding voxel;
[0034] Construct a preset combined loss function based on the preset binary cross entropy loss and L2 loss;
[0035] The preset combined loss function is used to calculate the target loss value of each voxel based on the true label value of each voxel and the tensor prediction value, and the module parameters of the output structure are reversely updated based on the target loss value until the target loss value meets the second preset loss value condition and the updating is stopped to obtain the fine-tuned output structure.
[0036] Optionally, the aircraft vortex identification training method further includes:
[0037] The trained vortex identification model is used to restore the spatial resolution of multi-scale flow features and generate a vortex probability distribution map.
[0038] A three-dimensional connected component analysis is performed on the vortex probability distribution map based on a preset connected domain labeling function, so as to take the largest connected vortex region in the analysis result as the predicted vortex region.
[0039] In a second aspect, the present application discloses an aircraft vortex identification training device based on self-supervised Swin Transformer and transfer learning, comprising:
[0040] A data acquisition module is used to acquire irregular grid velocity field data of the target aircraft; wherein the irregular grid velocity field data is velocity field data generated by fluid dynamics simulation of the irregular geometric shape of the target aircraft surface;
[0041] A flow field reconstruction module is used to perform data conversion processing on the irregular grid velocity field data based on coordinate transformation technology to obtain a Cartesian grid velocity field suitable for a vortex identification model;
[0042] a hierarchical feature extraction module for performing self-supervised learning on the velocity field blocks of the Cartesian grid velocity field through the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model, extracting hierarchical features to obtain multi-scale flow features; wherein the multi-scale flow features include multi-scale spatial features of the velocity field, dynamic features of the velocity field, spatial position and geometric constraint information, and hierarchical information of multi-scale flow patterns;
[0043] A vortex prediction module is used to fine-tune the output structure of the vortex recognition model to obtain a predicted value of the vortex area through transposed convolution of the multi-scale flow features, and perform voxel-level supervised training to obtain a trained vortex recognition model; wherein the vortex recognition model is a model obtained based on a self-supervised Swin Transformer pre-training strategy and transfer learning fine-tuning supervised training.
[0044] In a third aspect, the present application discloses an electronic device, comprising:
[0045] Memory, used to store computer programs;
[0046] A processor is used to execute the computer program to implement the steps of the aforementioned aircraft vortex identification training method based on self-supervised SwinTransformer and transfer learning.
[0047] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning.
[0048] It can be seen that the present application discloses an aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning, comprising: obtaining irregular grid velocity field data of a target aircraft; wherein the irregular grid velocity field data is velocity field data generated after the irregular geometric shape of the target aircraft surface is simulated by fluid mechanics; performing data conversion processing on the irregular grid velocity field data based on coordinate transformation technology to obtain a Cartesian grid velocity field suitable for a vortex identification model; and obtaining a vortex identification model through the Swin The multi-head attention mechanism of the Transformer module performs self-supervised learning on the velocity field blocks of the Cartesian grid velocity field, extracts hierarchical features, and obtains multi-scale flow features; wherein, the multi-scale flow features include multi-scale spatial features of the velocity field, dynamic features of the velocity field, spatial position and geometric constraint information, and hierarchical information of multi-scale flow patterns; the output structure of the vortex recognition model is fine-tuned to obtain the predicted value of the vortex area through transposed convolution of the multi-scale flow features, and voxel-level supervised training is performed to obtain a trained vortex recognition model; wherein, the vortex recognition model is a model obtained based on the self-supervised SwinTransformer pre-training strategy and transfer learning fine-tuning supervised training. It can be seen that by processing the acquired irregular grid velocity field data into a Cartesian grid velocity field, the curvature characteristics of the aircraft surface are preserved, information loss in data format conversion is avoided, and deviations in vortex core positioning at geometric boundaries during subsequent vortex positioning are avoided. Furthermore, the hierarchical feature extraction of the multi-head attention mechanism of the vortex recognition model can extract multi-dimensional and multi-scale flow features from the local to the global velocity field. Multi-scale feature fusion can suppress turbulent noise interference in the flow field and reduce false vortex detection caused by local flow disturbances. The fine-tuned output structure then restores the spatial resolution of the feature map through operations such as upsampling, generates a continuous vortex probability distribution map, quantifies the confidence level of the vortex existence, and avoids boundary blurring or missed detection caused by hard thresholds. This is particularly suitable for the identification of weak vortices. Based on the three-dimensional connected domain analysis of the probability distribution map, the complete morphology of the vortex can be identified from the spatial topological structure level. Automated identification is achieved through the vortex recognition model, significantly reducing computational time. This is particularly suitable for the rapid evaluation of multiple schemes in the aircraft design stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0050] Figure 1This is a flow chart of an aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning disclosed in this application;
[0051] Figure 2 This is a schematic diagram of the structure of a vortex identification model disclosed in this application;
[0052] Figure 3 This is a flow chart of a vortex identification model training method disclosed in this application;
[0053] Figure 4 This is a schematic diagram of the structure of an aircraft vortex identification training device based on self-supervised Swin Transformer and transfer learning disclosed in this application;
[0054] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0056] Faced with irregular geometries such as curved surfaces, gaps, and protrusions on the surface of aircraft (such as the diamond-shaped fuselage and variable-sweep wing shaft of the fifth-generation aircraft), the flow field is irregularly distributed in physical space. The physical-driven method directly extracts the vortex structure from the flow field based on the implicit vortex definition and flow behavior characteristics, which easily loses the boundary layer velocity gradient information near the wall, resulting in missed detection of separated vortices near the geometric boundary; the data-driven method is faced with the extremely high cost of high-precision flow field data in the aerospace field, and the vortex structure annotation needs to be combined with the experience of aerodynamic experts (such as judging the position and rotation direction of the vortex core), making it difficult to obtain sufficient samples to train the model.
[0057] In recent years, researchers have designed a series of intelligent vortex identification methods using convolutional neural networks, ResNet, U-Net, Transformer, and graph neural networks, and have made some progress. However, these methods still face challenges in generalization and engineering practicality. Existing methods are mostly based on simplified models (such as two-dimensional flat plates and flow around cylinders). When faced with the complex flow fields of real aircraft, due to the geometric complexity of the flow field and the diversity of boundary conditions, the models are prone to overfitting and cannot accurately identify vortex structures under untrained conditions.
[0058] To this end, the present invention provides an aircraft vortex identification scheme based on self-supervised Swin Transformer and transfer learning, which can accurately realize vortex identification in aircraft flow fields.
[0059] Reference Figure 1 As shown, an embodiment of the present invention discloses an aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning, comprising:
[0060] Step S11: Obtain irregular grid velocity field data of the target aircraft; wherein the irregular grid velocity field data is velocity field data generated by fluid dynamics simulation of the irregular geometric shape of the target aircraft surface.
[0061] In this embodiment, target mission parameters for a target aircraft are obtained for a corresponding aerodynamic design task. CFD simulations are then performed on these target mission parameters to generate three-dimensional geometric models of different configurations. Each set of target mission parameters corresponds to an aerodynamic design solution. Because aircraft surface geometry is typically irregular and complex, CFD simulations require the use of irregular grids (e.g., a hybrid of tetrahedral and hexahedral grids) to discretize the surface and flow field regions. For each three-dimensional geometric model, the CFD software generates a corresponding irregular grid and calculates the irregular grid velocity field data, including the velocity field, by solving governing fluid dynamics equations such as the Navier-Stokes equations. For example, in aircraft aerodynamic design tasks such as wing configuration optimization and fuselage aerodynamic layout adjustment, multiple sets of target mission parameters are set based on design objectives such as drag reduction and lift optimization. These target mission parameters include airfoil camber, sweep angle, and flap deflection angle.
[0062] Step S12: performing data conversion processing on the irregular grid velocity field data based on coordinate transformation technology to obtain a Cartesian grid velocity field suitable for a vortex identification model.
[0063] In this embodiment, the irregular grid velocity field data is converted according to a preset mapping rule to obtain initial converted velocity field data; wherein, the preset mapping rule is a rule for mapping between the velocity field data of the aircraft surface flow field and the velocity field data of the uniform calculation space; the initial converted velocity field data is normalized and selected, and the normalized velocity field is used as a Cartesian grid velocity field. It can be understood that the irregular grid velocity field data is transformed from the irregular physical space coordinate system to the uniform calculation space coordinate system, and a mapping relationship between the points of the irregular physical space and the points of the uniform calculation space is established, thereby obtaining regular velocity field data (initial converted velocity field data), avoiding direct pixelation of the velocity field data, and alleviating the problem of missing geometric boundary and wall turbulence information caused by direct pixelation of the velocity field data. The obtained initial converted velocity field data is then normalized, and the specific processing process is: the initial converted velocity field velocity data is the velocity field containing Velocity field of components , normalize the velocity field data after initial transformation to obtain the Cartesian grid velocity field , where the normalization formula is as follows:
[0064] ;
[0065] in, and are the minimum and maximum values of the velocity component in each dimension, and 𝜀 is a small constant to prevent division by zero, such as 10 −8 .
[0066] Step S13: self-supervised learning is performed on the velocity field blocks of the Cartesian grid velocity field through the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model to extract hierarchical features to obtain multi-scale flow features; wherein the multi-scale flow features include multi-scale spatial features of the velocity field, dynamic features of the velocity field, spatial position and geometric constraint information, and hierarchical information of multi-scale flow patterns.
[0067] In this embodiment, the Swin Transformer module includes a block embedding layer and a hierarchical feature extraction layer; accordingly, the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model performs self-supervised learning on the velocity field blocks of the Cartesian grid velocity field, extracts hierarchical features, and obtains multi-scale flow features, including: inputting the velocity field blocks into the block embedding layer so that the block embedding layer performs block projection on the velocity field blocks to obtain several block labeling sequences; constructing a position deviation matrix based on the relative position information of each block labeling sequence in the corresponding preset local window; calculating the attention weights of the block labeling sequence and the position deviation matrix in each preset local window through the multi-head attention mechanism of the hierarchical feature extraction layer, and then splicing and outputting all the attention weights to extract local multi-scale flow features; calculating the attention weights of the block labeling sequence and the local multi-scale flow features based on the preset shift window through the multi-head attention mechanism of the hierarchical feature extraction layer to obtain updated multi-scale flow features. It can be understood that, if Figure 2 As shown, through the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model, for a given Cartesian grid velocity field, the data dimension is , represents the number of channels of the velocity field, Respectively represent the resolution of the Cartesian grid velocity field in the three dimensions of space (such as the x, y, and z axes in the Cartesian coordinate system), that is, the spatial size. For example, 128×128×128 means that there are 128 sampling points in each dimension of the three-dimensional space. The input is divided into non-overlapping velocity field blocks of size P×P×P, and each velocity field block is projected into an embedding space of dimension E to form a block tag sequence. Each tokenized block is positionally encoded and the normalized center coordinates of each block are mapped through a multi-layer perceptron. Come learn to code: ,in, is the initial block embedding (block tag sequence), For enhanced block embedding with positional encoding added (enhanced block tag sequence), Represents a multilayer perceptron, which is used to map three-dimensional coordinates to embedding space dimensions. Its input is , the output is an E-dimensional vector, and the spatial position features of the coordinates are learned through nonlinear transformation. It should be noted that the position encoding is not added through static absolute position encoding, but is dynamically integrated through the relative position deviation mechanism. Specifically, the relative position of each block marker sequence in the local window, such as the three-dimensional coordinate offset relative to the center of the window, is encoded as a learnable position deviation matrix B. This position deviation matrix is added to the similarity matrix when calculating the attention weight, and the spatial geometric constraints between the block marker sequences are explicitly constructed, such as the positional relationship between adjacent voxels. A hierarchical architecture is established to increase the feature dimension and reduce the spatial resolution layer by layer. Let the initial block embedding dimension be , then in The number of layers, feature resolutions, and dimensions are: In this way, Indicates the number of layers, usually starting from 0 ( =0 is the initial layer), each additional layer reduces the spatial resolution by downsampling and increases the feature dimension. In the above formula, each time the number of layers increases by 1, the resolution of each dimension is halved. =1, the resolution is 1 / 2 of the original, =2, it is 1 / 4, and so on, to achieve multi-scale feature extraction. For each stage, self-attention is applied to the local window, and then the transfer attention mechanism is adopted. Using window-based multi-head attention (W-MSA) in the size of The feature update in each Transformer block is calculated as: , where LN is layer normalization, Indicates the The input feature tensor of the layer Transformer block, Represents the intermediate features after W-MSA calculation and residual connection, represents the output features after SW-MSA calculation and residual connection. In this way, W-MSA focuses on local flow field structures, such as the velocity gradient pattern near the vortex core, and captures the velocity field correlation within the window through self-attention. SW-MSA breaks the independence of windows and captures cross-regional flow correlations, such as the interaction between vortices and adjacent shear layers, simulating the long-range physical effects of fluids. In this scheme, W-MSA is used for odd-numbered layers and SW-MSA is used for even-numbered layers, forming a local, global, and local feature extraction cycle to balance computational efficiency and global information capture capabilities.
[0068] Step S14: fine-tuning the output structure of the vortex recognition model to obtain a predicted value of the vortex area through transposed convolution of the multi-scale flow features, and performing voxel-level supervised training to obtain a trained vortex recognition model; wherein the vortex recognition model is a model obtained based on the self-supervised Swin Transformer pre-training strategy and transfer learning fine-tuning supervised training.
[0069] In this embodiment, the output structure is a U-Net structure with transposed convolution; accordingly, the output structure of the vortex recognition model is fine-tuned to obtain the predicted value of the vortex area through the transposed convolution of the multi-scale flow features, and voxel-level supervised training is performed, including: upsampling the multi-scale flow features through the transposed convolution layer of the U-Net structure to generate a vortex probability distribution map, and performing voxel-level supervised training. It is understandable that the multi-scale flow features after receiving the encoding are reconstructed using a lightweight U-Net structure with transposed convolution, and upsampling and refinement are performed. The formulas for upsampling and refinement are as follows:
[0070] ;
[0071] in, Indicates the Multi-scale flow features after layer encoding, Indicates the Multi-scale flow features after layer encoding, represents upsampling, represents a three-dimensional convolution operation, Represents the convolution kernel, and through upsampling and refinement processing, the vortex probability distribution map is obtained .
[0072] In this embodiment, a trained vortex identification model is used to restore the spatial resolution of multi-scale flow characteristics and generate a vortex probability distribution map. A three-dimensional connected component analysis is performed on the vortex probability distribution map based on a preset connected domain labeling function, with the largest connected vortex region in the analysis result being used as the predicted vortex region. It is understood that the predicted value is then judged by a threshold classifier to obtain the final predicted vortex region. , where τ is a predefined threshold, Is the labeling function. The binary prediction obtained , perform 3D connected component analysis and retain only the largest connected vortex area, that is, the predicted vortex area: ,in, is the connected component labeling function.
[0073] It can be seen that the present application discloses an aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning, comprising: obtaining irregular grid velocity field data of a target aircraft; wherein the irregular grid velocity field data is velocity field data generated after the irregular geometric shape of the target aircraft surface is simulated by fluid mechanics; performing data conversion processing on the irregular grid velocity field data based on coordinate transformation technology, so that the preprocessing module of the vortex identification model reconstructs the irregular grid velocity field data to obtain a Cartesian grid velocity field suitable for the vortex identification model; through the Swin of the vortex identification model The multi-head attention mechanism of the Transformer module performs self-supervised learning on the velocity field blocks of the Cartesian grid velocity field, extracts hierarchical features, and obtains multi-scale flow features; wherein, the multi-scale flow features include multi-scale spatial features of the velocity field, dynamic features of the velocity field, spatial position and geometric constraint information, and hierarchical information of multi-scale flow patterns; the output structure of the vortex recognition model is fine-tuned to obtain the predicted value of the vortex area through transposed convolution of the multi-scale flow features, and voxel-level supervised training is performed to obtain a trained vortex recognition model; wherein, the vortex recognition model is a model obtained based on the self-supervised Swin Transformer pre-training strategy and transfer learning fine-tuning supervised training. It can be seen that by processing the acquired irregular grid velocity field data into a Cartesian grid velocity field, the curvature characteristics of the aircraft surface are preserved, information loss in data format conversion is avoided, and deviations in vortex core positioning at geometric boundaries during subsequent vortex positioning are avoided. Furthermore, the hierarchical feature extraction of the multi-head attention mechanism of the vortex recognition model can extract multi-dimensional and multi-scale flow features from the local to the global velocity field. Multi-scale feature fusion can suppress turbulent noise interference in the flow field and reduce false vortex detection caused by local flow disturbances. The fine-tuned output structure then restores the spatial resolution of the feature map through operations such as upsampling, generates a continuous vortex probability distribution map, quantifies the confidence level of the vortex existence, and avoids boundary blurring or missed detection caused by hard thresholds. This is particularly suitable for the identification of weak vortices. Based on the three-dimensional connected domain analysis of the probability distribution map, the complete morphology of the vortex can be identified from the spatial topological structure level. Automated identification is achieved through the vortex recognition model, significantly reducing computational time. This is particularly suitable for the rapid evaluation of multiple schemes in the aircraft design stage.
[0074] Reference Figure 3 As shown, the present invention also discloses a vortex recognition model training method, which specifically includes:
[0075] Step S21: construct an initial vortex recognition model with a three-dimensional Swin Transformer as the skeleton network; reconstruct and normalize the unlabeled aircraft velocity field data to obtain a preprocessed velocity field.
[0076] In this embodiment, a 3D Swin Transformer model is constructed as the skeleton network of the transfer learning vortex identification (Vortex-SSTL); a coordinate transformation is introduced to transform a large amount of unlabeled aircraft velocity field data from an irregular physical space coordinate system to a uniform computational space coordinate system to form regular Cartesian grid flow field data. After obtaining the regular velocity field data, it is normalized and the flow field variable values are scaled to the [0, 1] interval. Velocity field of components As model input, normalized velocity field The calculation formula is:
[0077] ;
[0078] in, and are the minimum and maximum values of the velocity component in each dimension, and 𝜀 is a small constant to prevent division by zero, such as 10 −8 . So far, the preprocessed velocity field is obtained.
[0079] Step S22: performing clipping processing on the pre-processed velocity field according to a preset spatial clipping rule to obtain an enhanced velocity field that characterizes the spatial distribution diversity of vortices in the aircraft velocity field.
[0080] In this embodiment, random spatial cropping is performed on the normalized pre-processed velocity field to crop sub-regions of a fixed size of 128×128×128. The calculation formula for the number of flow field blocks N is:
[0081] ;
[0082] in, is the step length, is the degree of overlap between adjacent blocks. The overlapping areas are fused using a weighted average strategy:
[0083] ;
[0084] in, The fused three-dimensional velocity field in coordinates The value at represents the velocity value of a point in the final reconstructed velocity field after weighted averaging of the overlapping areas, which is used to eliminate the boundary discontinuity caused by the block processing. Representative The contribution weight of each block to the overlapping area is usually related to the position and overlap degree of the block. The purpose is to make the center area have a higher weight and the edge area have a lower weight to ensure smooth fusion. Indicates the Blocks at coordinates The velocity value at that point is the value of the velocity field at that point that is independently predicted or reconstructed by each block after block processing.
[0085] A hierarchical and refined Vortex-SSTL model skeleton network is established based on 3D Swin Transformer. For a given pre-processed velocity field data, the data dimension is , represents the number of channels of the velocity field, Preprocess the velocity field in three spatial dimensions separately, split the input into non-overlapping blocks of size P×P×P, and project each block into an embedding space of dimension E to form a block token sequence. The total number of tokens is: . Position encoding is performed on each tokenized block, and the normalized center coordinates of each block are mapped through a multi-layer perceptron. Come learn to code: ,in, is the initial block embedding, For the enhanced block embedding with position encoding added. Establish a hierarchical architecture, increase the feature dimension and reduce the spatial resolution layer by layer. Let the initial block embedding dimension be , then in The number of layers, feature resolutions, and dimensions are: For each stage, self-attention is applied on a local window, followed by a transfer attention mechanism. Window-based multi-head attention (W-MSA) is used on a scale of The feature update in each Swin Transformer block is calculated as: , where LN is layer normalization. A feed-forward network with GeLU activation function is deployed for each Swin Transformer block to refine the learned feature representation. During pre-training, the input is masked with probability m=0.25 to produce the etched input , the model reconstructs the missing token based on the token visible area and records it as , set a minimum reconstruction loss .
[0086] In this way, the model skeleton network is established through the above process, and the pre-processed velocity field is cropped to obtain the enhanced velocity field.
[0087] Step S23: performing block processing and masking processing on the enhanced velocity field to obtain unmasked velocity field blocks; wherein the unmasked velocity field blocks are visible areas of the velocity field blocks after the enhanced velocity field blocks are not covered by the mask.
[0088] In this embodiment, data pre-training is performed based on the established model skeleton network to obtain a flow field feature representation with strong generalization. The specific steps are as follows: encoding and masking operations are performed on the input data. The input velocity field is divided into 4×4×4 non-overlapping blocks. According to a pre-set mask ratio m, a random subset of these blocks is masked to obtain unmasked velocity field blocks. The masking operation is formally expressed as: ,in, is a binary mask, is the indicator function, is the spatial dimension of the input.
[0089] Step S24: Inputting the unmasked velocity field blocks into the SwinTransformer module of the initial vortex identification model, so that the SwinTransformer module performs block projection on the enhanced velocity field to obtain an initial block label sequence.
[0090] In this embodiment, the mask data is passed through the block embedding layer: ,in, is the velocity field input, is the convolution kernel size, is the stride, and the output of the block embedding layer is used as the initial block label sequence.
[0091] Step S25: down-sampling training is performed on the Swin Transformer module of the initial vortex recognition model using the initial block label sequence and block merging technology to obtain a down-sampled feature map.
[0092] In this embodiment, the initial block label sequence obtained by the block embedding layer is processed by the skeleton network established in the above steps. The skeleton network uses block merging to downsample the initial block label sequence at each stage to obtain a downsampled feature map. The downsampling formula is: , while expanding the feature dimension, the spatial resolution is reduced by 2 times, under different backbone network configurations, where the Transformer depth is d=[2,2,18,2] and heads=[3,6,12,24].
[0093] Step S26: Input the downsampled feature map into the output structure of the initial vortex recognition model so that the output structure upsamples the downsampled feature map to obtain an upsampled feature map, and performs masked area reconstruction processing based on the upsampled feature map to obtain a reconstructed velocity field.
[0094] In this embodiment, the downsampled feature maps obtained after masking and downsampling are reconstructed using a lightweight U-Net structure with transposed convolution. The latent features after receiving the encoding are reconstructed using a lightweight U-Net structure with transposed convolution for regional upsampling and refinement: . Then, the mask region is reconstructed using the features after gradual upsampling and refinement: , where σ(∙) represents the activation function to ensure effective speed output, Represents the predicted speed, and the reconstructed velocity field is finally obtained through upsampling and masked area reconstruction. In this way, the reconstruction of the masked area in the sample is learned through network self-supervision, without relying on labeled data. Only by reconstructing the masked area task, the model is forced to learn the intrinsic structure of the velocity field, providing a highly generalized feature representation for subsequent vortex recognition tasks.
[0095] Step S27: Utilize the preset reconstruction loss function and calculate the loss value of the masked area according to the reconstructed velocity field and the preprocessed velocity field, and reversely update the module parameters of each module of the initial vortex identification model based on the loss value until the loss value meets the first preset loss value condition, then stop updating, and output the model under the current module parameters as the vortex identification model.
[0096] In this embodiment, the reconstruction error is solved based on the obtained upsampled feature map and the original data. First, the reconstruction loss function is established as , where Ω represents the masked area, Indicates location The predicted 3D velocity field data and the actual data are then compared using the loss function established in the previous step to calculate the mask region loss. The mask region only contributes to the loss calculation, ensuring that the model learns valid prediction information.
[0097] In this embodiment, the transposed convolution of the output structure of the vortex recognition model is used to perform tensor prediction of the vortex structure on the downsampled feature map to output the tensor prediction value of the corresponding voxel; a preset combined loss function is constructed based on the preset binary cross entropy loss and L2 loss; the target loss value of each voxel is calculated based on the preset combined loss function and the true label value of each voxel and the tensor prediction value, and the module parameters of the output structure are reversely updated based on the target loss value until the target loss value meets the second preset loss value condition and stops updating to obtain the fine-tuned output structure. It can be understood that the flow field data is input into the pre-trained model to obtain hierarchical features. For a given input velocity field , extracting a series of hierarchical features through pre-trained Swin Transformer encoder ,in, Indicates the encoder The feature maps extracted at each stage are downsampled by a factor of 2 to capture both fine and coarse flow structures. The resulting hierarchical features are then passed through a transposed convolution to obtain the predicted value of the vortex region. The extracted features are first passed through a lightweight decoder containing a transposed convolution structure, which outputs a tensor representing the predicted vortex structure. , where σ(·) is the sigmoid activation function, ensuring that the output value is in the interval [0,1]. The predicted value is then judged by the threshold classifier to obtain the final predicted vortex area: . Design a combined loss function for voxel-level supervised training. First, set the binary cross entropy loss to correct the predicted value. ,in, is a voxel The true label, is a voxel Then set the L2 loss to correct the predicted value. Finally, the binary cross entropy loss is combined with the L2 loss to obtain the combined loss. , where α and β are hyperparameters that control the contribution of each loss.
[0098] The binary , perform 3D connected component analysis and keep only the largest connected vortex regions: ,in, is the connected component labeling function.
[0099] To further demonstrate the ability of the present method to efficiently and accurately identify three-dimensional vortex regions, a comparative test was conducted using multiple vortex flow scenarios based on the method described in the preceding embodiment. The dataset configuration is shown in Table 1. The test computer configuration is as follows: an Intel Core i9-9900K 3.60GHz CPU and an NVIDIA Tesla A40 GPU. Current mainstream data-driven vortex identification methods (Vortex-Net, Vortex-Seg-Net, and Vortex-U-Net), as well as the Q-criterion, Ω-criterion, Δ-criterion, and Λ²-criterion methods, were compared with the present method (Vortex-SSTL). The accuracy, recall, and judgment time of the comparison results are listed.
[0100] Table 1
[0101]
[0102] At low Reynolds numbers (Re=160), the flow is less turbulent, and Vortex-SSTL effectively captures the vortex structure and its shedding pattern, showing a high degree of consistency with the real situation. Vortex-Seg-Net and Vortex-Net also perform well, but Vortex-SSTL clearly stands out in its ability to detect and maintain vortex coherence. As the Reynolds number increases (Re=320), turbulence becomes more pronounced. Vortex-SSTL continues to provide high-precision vortex detection, capturing both large-scale and smaller turbulent vortices, which is more challenging for other methods such as Vortex-Seg-Net and Vortex-Net. As the Reynolds number continues to increase (Re=640), Vortex-SSTL still maintains a high level of vortex detection accuracy, especially in more chaotic flow environments, and is able to accurately identify the dynamic process of vortex shedding. In extremely turbulent environments (Re=6400), due to the extremely high degree of turbulence, vortex interactions become more complex, but Vortex-SSTL can still accurately capture these fine features and outperforms other methods in both large-scale and small-scale vortex detection.
[0103] The recognition results of different methods in different data scenarios are shown in Table 2 below, and the best data are highlighted in bold.
[0104] Table 2
[0105]
[0106] In addition, to demonstrate the effectiveness and generalization of the proposed model, a comparative test was conducted using untrained out-of-case (OOD) 2D and 3D environmental flow field data. The test results are shown in Tables 3 and 4, and the best data are highlighted in bold.
[0107] As shown in Tables 3 and 4, the proposed model demonstrates excellent recall and precision for vortex identification in both 2D and 3D flow scenarios, respectively, surpassing state-of-the-art methods. The model's ability to generalize to non-distributed scenarios, such as high Reynolds number flows and previously unseen turbulent conditions, highlights its practical applicability in real industrial and engineering settings. Overall, the Vortex-SSTL framework provides a new benchmark for vortex identification in fluid dynamics, offering a scalable, generalizable, and cost-effective solution for complex flow analysis.
[0108] Table 3
[0109]
[0110] Table 4
[0111]
[0112] Thus, by constructing a 3D Swin Transformer model as the backbone network for transfer learning vortex identification (Vortex-SSTL), a self-supervised pre-training approach was performed on a large amount of unlabeled flow field data by masking and reconstructing it. This model was then fine-tuned to adjust its output structure and, through supervised learning, rapidly adapted to the task of vortex structure identification.
[0113] Reference Figure 4 As shown, the present invention also discloses an aircraft vortex identification training device based on self-supervised Swin Transformer and transfer learning, comprising:
[0114] The data acquisition module 11 is used to acquire irregular grid velocity field data of the target aircraft; wherein the irregular grid velocity field data is velocity field data generated by fluid dynamics simulation of the irregular geometric shape of the target aircraft surface;
[0115] A flow field reconstruction module 12 is used to perform data conversion processing on the irregular grid velocity field data based on a coordinate transformation technology to obtain a Cartesian grid velocity field suitable for a vortex identification model;
[0116] a hierarchical feature extraction module 13 for performing self-supervised learning on the velocity field blocks of the Cartesian grid velocity field through the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model, extracting hierarchical features to obtain multi-scale flow features; wherein the multi-scale flow features include multi-scale spatial features of the velocity field, dynamic features of the velocity field, spatial position and geometric constraint information, and hierarchical information of multi-scale flow patterns;
[0117] The vortex prediction module 14 is used to fine-tune the output structure of the vortex recognition model to obtain a predicted value of the vortex area through transposed convolution of the multi-scale flow features, and perform voxel-level supervised training to obtain a trained vortex recognition model; wherein the vortex recognition model is a model obtained based on the self-supervised Swin Transformer pre-training strategy and transfer learning fine-tuning supervised training.
[0118] It can be seen that the present application discloses obtaining irregular grid velocity field data of a target aircraft; wherein, the irregular grid velocity field data is velocity field data generated after fluid mechanics simulation of the irregular geometric shape of the target aircraft surface; the irregular grid velocity field data is subjected to data conversion processing based on coordinate transformation technology to obtain a Cartesian grid velocity field suitable for a vortex recognition model; the velocity field blocks of the Cartesian grid velocity field are self-supervised learned through the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model, and hierarchical features are extracted to obtain multi-scale flow features; wherein, the multi-scale flow features include multi-scale spatial features of the velocity field, dynamic features of the velocity field, spatial position and geometric constraint information, and hierarchical information of multi-scale flow patterns; the output structure of the vortex recognition model is fine-tuned to obtain a predicted value of the vortex area through transposed convolution of the multi-scale flow features, and voxel-level supervised training is performed to obtain a trained vortex recognition model; wherein, the vortex recognition model is a model obtained based on the self-supervised Swin Transformer pre-training strategy and transfer learning fine-tuning supervised training. It can be seen that by processing the acquired irregular grid velocity field data into a Cartesian grid velocity field, the curvature characteristics of the aircraft surface are preserved, information loss in data format conversion is avoided, and deviations in vortex core positioning at geometric boundaries during subsequent vortex positioning are avoided. Furthermore, the hierarchical feature extraction of the multi-head attention mechanism of the vortex recognition model can extract multi-dimensional and multi-scale flow features from the local to the global velocity field. Multi-scale feature fusion can suppress turbulent noise interference in the flow field and reduce false vortex detection caused by local flow disturbances. The fine-tuned output structure then restores the spatial resolution of the feature map through operations such as upsampling, generates a continuous vortex probability distribution map, quantifies the confidence level of the vortex existence, and avoids boundary blurring or missed detection caused by hard thresholds. This is particularly suitable for the identification of weak vortices. Based on the three-dimensional connected domain analysis of the probability distribution map, the complete morphology of the vortex can be identified from the spatial topological structure level. Automated identification is achieved through the vortex recognition model, significantly reducing computational time. This is particularly suitable for the rapid evaluation of multiple schemes in the aircraft design stage.
[0119] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.
[0120] Figure 5The present invention provides a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0121] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0122] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0123] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0124] Among them, the operating system 221 is used to manage and control the various hardware devices and computer programs 222 on the electronic device 20 to enable the processor 21 to calculate and process the massive data 223 in the memory 22. It can be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs that can be used to complete the aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks. In addition to including data received by the electronic device and transmitted from external devices, the data 223 can also include data collected by its own input and output interface 25.
[0125] Furthermore, this application discloses a computer-readable storage medium for storing a computer program. When executed by a processor, the computer program implements the aforementioned method for training aircraft vortex identification based on a self-supervised Swin Transformer and transfer learning. The specific steps of this method can be found in the corresponding sections disclosed in the aforementioned embodiments and will not be further elaborated here.
[0126] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0127] Professionals may further appreciate that the units and algorithmic steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory RAM (Random Access Memory), memory, read-only memory ROM (Read Only Memory), electrically programmable EPROM (Electrically Programmable Read Only Memory), electrically erasable programmable EEPROM (Electric Erasable Programmable Read Only Memory), registers, hard disk, removable disk, CD-ROM (Compact Disc-Read Only Memory), or any other form of storage medium known in the technical field.
[0128] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0129] The above is a detailed introduction to the solution provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A method for aircraft vortex identification training based on self-supervised Swin Transformer and transfer learning, characterized in that: include: Obtaining irregular grid velocity field data of the target aircraft; wherein the irregular grid velocity field data is velocity field data generated by fluid dynamics simulation of the irregular geometric shape of the target aircraft surface; Performing data conversion processing on the irregular grid velocity field data based on coordinate transformation technology to obtain a Cartesian grid velocity field suitable for a vortex identification model; The multi-head attention mechanism of the Swin Transformer module of the vortex identification model is used to perform self-supervised learning on the velocity field blocks of the Cartesian grid velocity field to extract hierarchical features to obtain multi-scale flow features; wherein the multi-scale flow features include multi-scale spatial features of the velocity field, dynamic features of the velocity field, spatial position and geometric constraint information, and hierarchical information of multi-scale flow patterns; The output structure of the vortex recognition model is fine-tuned to obtain a predicted value of the vortex area through transposed convolution of the multi-scale flow features, and voxel-level supervised training is performed to obtain a trained vortex recognition model; wherein the vortex recognition model is a model obtained based on a self-supervised Swin Transformer pre-training strategy and transfer learning fine-tuning supervised training.
2. The aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning according to claim 1 is characterized in that: The data conversion process of the irregular grid velocity field data based on the coordinate transformation technology to obtain a Cartesian grid velocity field suitable for the vortex identification model includes: The irregular grid velocity field data is converted according to a preset mapping rule to obtain initial converted velocity field data; wherein the preset mapping rule is a rule for mapping between the velocity field data of the aircraft surface flow field and the velocity field data of the uniform calculation space; The velocity field data after the initial transformation is normalized and selected, and the normalized velocity field is used as the Cartesian grid velocity field.
3. The aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning according to claim 1 is characterized in that: The Swin Transformer module includes a block embedding layer and a hierarchical feature extraction layer; Accordingly, the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model is used to perform self-supervised learning on the velocity field blocks of the Cartesian grid velocity field, extracting hierarchical features to obtain multi-scale flow features, including: Inputting the velocity field blocks into the block embedding layer, so that the block embedding layer performs block projection on the velocity field blocks to obtain a plurality of block label sequences; Constructing a position deviation matrix based on the relative position information of each block marker sequence in the corresponding preset local window; The attention weights of the block mark sequence and the position deviation matrix in each preset local window are calculated by the multi-head attention mechanism of the hierarchical feature extraction layer, and then all the attention weights are spliced and output to extract local multi-scale flow features; The multi-head attention mechanism of the hierarchical feature extraction layer is used to calculate the attention weights of the block label sequence and the local multi-scale flow features based on a preset shift window to obtain updated multi-scale flow features.
4. The aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning according to claim 1 is characterized in that: The output structure is a U-Net structure with transposed convolution; Accordingly, the output structure of the vortex recognition model is fine-tuned to obtain the predicted value of the vortex area by transposed convolution of the multi-scale flow features, and voxel-level supervised training is performed, including: The multi-scale flow features are upsampled by the transposed convolution of the U-Net structure to generate a vortex probability distribution map for voxel-level supervised training.
5. The aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning according to claim 1 is characterized in that: Before performing self-supervised learning on the velocity field blocks of the Cartesian grid velocity field through the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model, the method further includes: Construct an initial vortex recognition model with a three-dimensional Swin Transformer as the backbone network; Reconstruct and normalize the unlabeled aircraft velocity field data to obtain the preprocessed velocity field; Clipping the preprocessed velocity field according to a preset spatial clipping rule to obtain an enhanced velocity field that characterizes the spatial distribution diversity of vortices in the aircraft velocity field; Performing block processing and masking processing on the enhanced velocity field to obtain unmasked velocity field blocks; wherein the unmasked velocity field blocks are visible areas of the velocity field blocks after the enhanced velocity field blocks are not covered by the mask; Inputting the unmasked velocity field blocks into the Swin Transformer module of the initial vortex identification model so that the Swin Transformer module projects the enhanced velocity field blocks to obtain an initial block label sequence; Downsampling training is performed on the SwinTransformer module of the initial vortex recognition model using the initial block label sequence and a block merging technique to obtain a downsampled feature map; Inputting the downsampled feature map into the output structure of the initial vortex identification model so that the output structure upsamples the downsampled feature map to obtain an upsampled feature map, and performing masked region reconstruction processing based on the upsampled feature map to obtain a reconstructed velocity field; A preset reconstruction loss function is used to calculate the loss value of the masked area according to the reconstructed velocity field and the preprocessed velocity field, and the module parameters of each module of the initial vortex identification model are reversely updated based on the loss value until the loss value meets the first preset loss value condition and the updating is stopped, and the model under the current module parameters is output as the vortex identification model.
6. The aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning according to claim 5 is characterized in that: Also includes: Performing tensor prediction of the vortex structure on the downsampled feature map using a transposed convolution of the output structure of the vortex recognition model to output a tensor prediction value of the corresponding voxel; Construct a preset combined loss function based on the preset binary cross entropy loss and L2 loss; The preset combined loss function is used to calculate the target loss value of each voxel based on the true label value of each voxel and the tensor prediction value, and the module parameters of the output structure are reversely updated based on the target loss value until the target loss value meets the second preset loss value condition and the updating is stopped to obtain the fine-tuned output structure.
7. The aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning according to claim 1 is characterized in that: Also includes: The trained vortex identification model is used to restore the spatial resolution of multi-scale flow features and generate a vortex probability distribution map. A three-dimensional connected component analysis is performed on the vortex probability distribution map based on a preset connected domain labeling function, so as to take the largest connected vortex region in the analysis result as the predicted vortex region.
8. An aircraft vortex identification training device based on self-supervised Swin Transformer and transfer learning, characterized in that: include: A data acquisition module is used to acquire irregular grid velocity field data of the target aircraft; wherein the irregular grid velocity field data is velocity field data generated by fluid dynamics simulation of the irregular geometric shape of the target aircraft surface; A flow field reconstruction module is used to perform data conversion processing on the irregular grid velocity field data based on coordinate transformation technology to obtain a Cartesian grid velocity field suitable for a vortex identification model; a hierarchical feature extraction module for performing self-supervised learning on the velocity field blocks of the Cartesian grid velocity field through the multi-head attention mechanism of the Swin Transformer module of the vortex recognition model, extracting hierarchical features to obtain multi-scale flow features; wherein the multi-scale flow features include multi-scale spatial features of the velocity field, dynamic features of the velocity field, spatial position and geometric constraint information, and hierarchical information of multi-scale flow patterns; A vortex prediction module is used to fine-tune the output structure of the vortex recognition model to obtain a predicted value of the vortex area through transposed convolution of the multi-scale flow features, and perform voxel-level supervised training to obtain a trained vortex recognition model; wherein the vortex recognition model is a model obtained based on a self-supervised Swin Transformer pre-training strategy and transfer learning fine-tuning supervised training.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the steps of the aircraft vortex identification training method based on self-supervised Swin Transformer and transfer learning as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Three-dimensional flow field super-resolution reconstruction method based on Transform network
CN117974886A
Spectral cross-domain transfer super-resolution reconstruction method for multi-domain image
WO2024082796A1