A multi-module deep learning gas-liquid two-phase swirl flow pattern identification method and system

Through the multi-module deep learning method, combined with CNN, BiGRU and global attention mechanism, the accuracy and robustness of gas-liquid cyclone flow type recognition are solved, and efficient identification of complex cyclone working conditions is achieved, and recognition accuracy and adaptability are improved.

CN120217114BActive Publication Date: 2025-08-26FOSHAN UNIVERSITY
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510687517.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-08-26
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

The existing gas-liquid cyclone flow type recognition methods are difficult to accurately model and classify. The traditional methods are difficult to measure, costly and poor real-time. The single neural network structure lacks dynamic modeling capabilities in the face of voltage drop fluctuations, and the feature extraction is limited, making it difficult to adapt to complex cyclone flow conditions.

Method used

The multi-module deep learning method is adopted to extract the time-frequency characteristics of the voltage drop signal through the CNN network, combine the bidirectional gating cycle unit and the global attention mechanism, enhance feature processing, build a loss function for model training, and dynamically adjust the balance factor and adjustment factor to improve recognition accuracy.

Benefits of technology

It improves the accuracy and system robustness of gas-liquid cyclone flow type recognition, adapts to complex working conditions, and has good engineering practicality and value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217114B_ABST
    Figure CN120217114B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and provides a multi-module deep learning gas-liquid two-phase swirl flow pattern identification method and system, the method comprising: obtaining a pressure drop signal and performing data slicing processing on the pressure drop signal; classifying and predicting the flow pattern of the spiral airflow through a trained classification prediction model, specifically comprising: extracting the time domain features and frequency domain features of the pressure drop signal after data slicing processing through a CNN network; performing enhancement processing on the time domain features and frequency domain features to obtain enhanced time domain features and frequency domain features; performing feature fusion processing on the enhanced time domain features and frequency domain features to obtain a fused feature vector; and classifying and predicting the flow pattern of the spiral airflow based on the fused feature vector and a fully connected layer. The present invention can achieve joint modeling of multi-dimensional and multi-scale features, thereby improving the flow pattern identification accuracy and system robustness under complex swirl conditions, and has good engineering practicality and engineering value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a multi-module deep learning gas-liquid two-phase swirl flow pattern recognition method and system. Background Art

[0002] Currently, relatively little research has been conducted on identifying gas-liquid two-phase swirl flow patterns based on pressure drop fluctuation signals. Gas-liquid swirls have highly complex internal flow structures and significant non-steady-state characteristics. Different flow patterns exhibit certain differences in phase interface morphology, velocity field distribution, and pressure field characteristics. Furthermore, because the flow process is significantly affected by random perturbations, feature extraction is difficult, making it difficult for traditional identification methods to accurately model and classify them.

[0003] Existing traditional recognition methods often rely on image analysis, empirical formulas, or invasive sensors. These methods, limited by operating conditions, data noise, and sensor placement, present challenges such as high measurement difficulty, high cost, poor real-time performance, and insufficient engineering adaptability. To improve recognition accuracy, some studies have introduced deep learning methods, but these typically employ single neural network structures (such as CNN or LSTM). These methods are limited in their dynamic modeling capabilities, limited spatial feature extraction, and limited ability to capture key local features when dealing with the strong nonlinearity, multi-scale variations, and spatiotemporal characteristics of pressure drop fluctuation signals. Therefore, efficient recognition of complex flow patterns in gas-liquid cyclones remains challenging. Summary of the Invention

[0004] Based on this, the present invention provides a multi-module deep learning gas-liquid two-phase swirl flow pattern recognition method and system, the specific technical solution of which is as follows:

[0005] A multi-module deep learning method for identifying gas-liquid two-phase swirl flow patterns comprises the following steps:

[0006] collecting a pressure difference signal of the spiral airflow in the vertical tube, obtaining a pressure drop signal according to the pressure difference signal, and performing data slicing processing on the pressure drop signal;

[0007] Constructing a classification prediction model and a loss function, training the classification prediction model based on the loss function, and classifying and predicting the flow pattern of the spiral airflow using the trained classification prediction model;

[0008] The specific method for classifying and predicting the flow pattern of the spiral airflow using the trained classification prediction model includes:

[0009] Extracting the time domain features and frequency domain features of the voltage drop signal after data slicing through a CNN network;

[0010] The time domain features and the frequency domain features are enhanced by a bidirectional gated recurrent unit and a global attention mechanism to obtain enhanced time domain features and frequency domain features;

[0011] Performing feature fusion processing on the enhanced time domain features and frequency domain features to obtain a fused feature vector;

[0012] The flow pattern of the spiral airflow is classified and predicted based on the fused feature vector and the fully connected layer.

[0013] The multi-module deep learning gas-liquid two-phase swirl flow pattern recognition method uses a CNN network to expand the time-frequency features of the pressure drop signal, thereby enhancing the feature expression. The BiGRU is then used to capture the time dependency and bidirectional dynamic features in the signal. Finally, a global attention mechanism is introduced to achieve weighted enhancement of key feature areas. This combined model can achieve joint modeling of multi-dimensional and multi-scale features, thereby improving the flow pattern recognition accuracy and system robustness under complex swirl conditions, and has good engineering practicality and engineering value.

[0014] Preferably, the specific method of collecting the pressure difference signal of the spiral airflow in the vertical tube and obtaining the pressure drop signal according to the pressure difference signal includes the following steps:

[0015] generating a gas-liquid two-phase flow, and passing the gas-liquid two-phase flow through a honeycomb mixer for mixing before entering a vertical tube;

[0016] A swirler is installed at the outlet of the stable section of the vertical pipe, so that the gas-liquid two-phase flow passes through the stable section and then forms a gas-liquid two-phase spiral flow through the swirler;

[0017] A pressure measuring hole is set at the outlet of the spinner and at a preset distance from the spinner, and a pressure differential sensor is installed between the pressure measuring holes to measure the interval length of the two pressure measuring holes. The differential pressure signal ;

[0018] Process the pressure difference signal to obtain the initial pressure drop signal , perform dimensionless processing on the initial pressure drop signal to obtain the final pressure drop signal ;

[0019] in, It represents the pressure drop between the two pressure measuring holes when the vertical pipe is in still water.

[0020] Preferably, the time domain features and the frequency domain features are enhanced, and a specific method for obtaining the enhanced time domain features and the frequency domain features comprises the following steps:

[0021] Capturing the forward and reverse information of the time domain features and the frequency domain features through a bidirectional gated recurrent unit to obtain a 128-dimensional time domain feature sequence and a 128-dimensional frequency domain feature sequence;

[0022] Each time step of the 128-dimensional time domain feature sequence and the 128-dimensional frequency domain feature sequence is weighted through a global attention mechanism to obtain enhanced time domain features and frequency domain features.

[0023] Preferably, the loss function ;

[0024] in, represents the predicted probability of the correct category, represents the balance factor, represents the adjustment factor, Represents the loss value.

[0025] Preferably, the gas-liquid two-phase cyclonic flow pattern identification method further comprises the following steps:

[0026] Calculate the number of minority class samples in each training batch of the classification prediction model The number of samples of the majority class The ratio between ;

[0027] Dynamically adjust the balance factor according to the ratio ;

[0028] in, represents a natural constant, represents the preset first sensitivity parameter, Indicates the preset first threshold parameter.

[0029] Preferably, the gas-liquid two-phase cyclonic flow pattern identification method further comprises the following steps:

[0030] Get the loss value of the current training batch And the loss value of the previous training batch , calculate the loss value change rate based on the current training batch loss value and the previous training batch loss value ;

[0031] Dynamically adjust the adjustment factor according to the loss value change rate ;

[0032] in, Indicates the baseline value of the adjustment factor, represents the adjustment amplitude control coefficient, represents the loss sensitivity adjustment coefficient, Indicates the rate of change of loss value.

[0033] A multi-module deep learning gas-liquid two-phase swirl flow pattern recognition system, used to implement the gas-liquid two-phase swirl flow pattern recognition method, comprising:

[0034] a data acquisition module, configured to acquire a pressure difference signal of the spiral airflow in the vertical tube, and obtain a pressure drop signal based on the pressure difference signal;

[0035] A data processing module, configured to perform data slicing processing on the voltage drop signal;

[0036] A model building module is used to build a classification prediction model and a loss function, and train the classification prediction model based on the loss function;

[0037] Wherein, the classification prediction model includes:

[0038] A CNN network is used to extract the time domain features and frequency domain features of the voltage drop signal after data slicing processing;

[0039] A feature processing module is used to sequentially enhance the time domain features and the frequency domain features through a bidirectional gated recurrent unit and a global attention mechanism to obtain enhanced time domain features and frequency domain features;

[0040] A feature fusion module is used to perform feature fusion processing on the enhanced time domain features and frequency domain features to obtain a fused feature vector;

[0041] The fully connected layer is used to classify and predict the flow type of the spiral airflow according to the fused feature vector.

[0042] Preferably, the model building module is based on the formula Construct loss function;

[0043] in, represents the predicted probability of the correct category, represents the balance factor, represents the adjustment factor, Represents the loss value.

[0044] Preferably, the multi-module deep learning gas-liquid two-phase swirl flow pattern recognition system further includes:

[0045] The ratio acquisition module is used to calculate the number of minority class samples in each training batch of the classification prediction model. The number of samples of the majority class The ratio between ;

[0046] A balance factor adjustment module is used to dynamically adjust the balance factor according to the ratio ;

[0047] in, represents a natural constant, represents the preset first sensitivity parameter, Indicates the preset first threshold parameter.

[0048] Preferably, the multi-module deep learning gas-liquid two-phase swirl flow pattern recognition system further includes:

[0049] The change rate acquisition module is used to obtain the loss value of the current training batch And the loss value of the previous training batch , calculate the loss value change rate based on the current training batch loss value and the previous training batch loss value ;

[0050] The adjustment factor adjustment module is used to dynamically adjust the adjustment factor according to the loss value change rate ;

[0051] in, Indicates the baseline value of the adjustment factor, represents the adjustment amplitude control coefficient, represents the loss sensitivity adjustment coefficient, Indicates the rate of change of loss value. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The present invention can be further understood from the following description in conjunction with the accompanying drawings. The components in the figures are not necessarily drawn to scale, but rather the emphasis is placed on illustrating the principles of the embodiments. In different views, the same reference numerals designate corresponding parts.

[0053] Figure 1 This is a schematic diagram of the overall process of a multi-module deep learning gas-liquid two-phase swirl flow pattern identification method in one embodiment of the present invention;

[0054] Figure 2 1 is a flow chart of a specific method for collecting a pressure difference signal of a spiral airflow in a vertical tube and obtaining a pressure drop signal based on the pressure difference signal in one embodiment of the present invention;

[0055] Figure 3 Schematic diagram of the working principle of the FFT-BiGRU-CNN-Attention model in one embodiment of the present invention;

[0056] Figure 4 1 is a flow chart of a specific method for obtaining enhanced time domain features and frequency domain features in one embodiment of the present invention;

[0057] Figure 5 This is a schematic diagram of a multi-module deep learning gas-liquid two-phase swirl flow pattern recognition method in another embodiment of the present invention. Figure 1;

[0058] Figure 6 This is a schematic diagram of a multi-module deep learning gas-liquid two-phase swirl flow pattern recognition method in another embodiment of the present invention. Figure 2 ;

[0059] Figure 7 This is the overall structure of a multi-module deep learning gas-liquid two-phase swirl flow pattern recognition system in one embodiment of the present invention;

[0060] Figure 8 1 is a schematic structural diagram of an experimental device for collecting differential pressure signals of spiral airflow in a vertical tube according to one embodiment of the present invention;

[0061] Figure 9 1 is a graph showing the accuracy and loss changes of the model during training and verification in one embodiment of the present invention;

[0062] Figure 10 1 is a confusion matrix diagram of the test set accuracy in one embodiment of the present invention.

[0063] Description of reference numerals:

[0064] 1. First flow regulating valve; 2. First flow meter; 3. Second flow regulating valve; 4. Second flow meter; 5. Honeycomb mixer; 6. Vertical pipe; 7. Swirler; 8. Cyclone gas-liquid separator; 9. Water tank; 10. Multi-stage centrifugal pump. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with its embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0066] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly attached to the other element or there may be an intermediate element. When an element is referred to as being "connected to" another element, it may be directly connected to the other element or there may be an intermediate element. The terms "vertical," "horizontal," "left," "right," and similar expressions used herein are for illustrative purposes only and do not represent the only implementation methods.

[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used herein in the specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0068] The "first" and "second" in the present invention do not represent specific quantities and orders, but are only used to distinguish names.

[0069] Before describing the embodiments of the present invention, a brief introduction to the prior art is given first.

[0070] Spiral flow exhibits unique flow characteristics in gas-liquid two-phase flows and is widely used in important industrial fields such as oil extraction, chemical production, and nuclear cooling systems. When gas and liquid flow simultaneously in a pipeline, their phase distribution is affected by a variety of factors, such as the size and shape of the pipeline and the physical properties of the fluid, which form a variety of different flow states. Therefore, it can be divided into different flow patterns based on different flow states. The flow pattern reflects the complex flow interface structure of the two-phase flow. The heat and mass transfer characteristics and pressure drop characteristics of different flow patterns can vary significantly. Since the flow pattern directly affects the efficiency of heat transfer equipment, the stability of the pipeline system, and energy consumption control, accurate identification of the flow pattern is crucial for the optimized design and control operation of pipeline transportation systems. By accurately identifying the flow pattern in real time, process parameters can be better optimized, heat transfer efficiency can be improved, energy consumption can be reduced, and the safe operation of the system can be ensured.

[0071] In recent years, domestic and foreign scholars have conducted research on the identification of non-swirling gas-liquid two-phase flow patterns in vertical tubes, mainly based on image data or fluctuation signal characteristics. Image data requires processing of a visual experimental section and the cooperation of a high-speed camera. This leads to problems such as complex measurement methods, high requirements for experimental section materials, and high costs, making it difficult to implement in industrial practice. While implementation based on pressure differentials or pressure fluctuation signals is relatively simple and low-cost in industrial practice, current methods have low measurement accuracy. Since pressure differential signals are indirect measurements and cannot directly observe flow patterns, they are easily affected by factors such as flow velocity changes, pipeline vibration, and pressure measurement device sensitivity, resulting in insufficient recognition accuracy. Furthermore, under certain operating conditions (such as transition states), the pressure differential fluctuation characteristics corresponding to different flow patterns are relatively small, resulting in blurred classification boundaries and increasing the difficulty of identification.

[0072] At present, the identification of gas-liquid two-phase flow patterns mainly focuses on non-swirl flow patterns without swirlers. The Chinese invention patent with publication number CN112113742A discloses an online identification method for gas-liquid two-phase flow patterns based on a GRU neural network, which is a non-swirl flow pattern identification based on a pressure difference signal. The Chinese invention patent with publication number CN115861707A discloses a gas-liquid two-phase flow pattern identification method based on a GoogLeNet model, which is a horizontal tube non-swirl flow pattern identification based on image data. The Chinese invention patent with publication number CN118861797A discloses a gas-liquid two-phase flow pattern identification method based on DAS logging data, which is a non-swirl flow pattern identification based on acoustic DAS signals. The Chinese invention patent with publication number CN117972328A discloses a gas-liquid multiphase flow pattern identification method and system based on differential pressure fluctuation analysis, which is a horizontal tube non-swirl flow pattern identification based on the parity splitting of the pressure difference signal. Chinese invention patent publication number CN118072069A discloses a two-phase flow pattern recognition method, device, computer equipment, and storage medium based on an attention mechanism and convolutional neural network. This method uses deep learning to recognize non-swirl flow patterns based on image data. Chinese invention patent publication number CN117725362A discloses a gas-liquid two-phase flow pattern recognition method based on wavelet analysis. This method uses traditional machine learning to recognize non-swirl flow patterns based on pressure fluctuations.

[0073] In summary, most existing methods are based on image or pressure differential signal modeling, typically employing single neural network or traditional signal processing algorithms, and their research focuses on identifying non-swirl flow patterns. Therefore, there is still considerable room for research and development in identifying swirl flow patterns in gas-liquid two-phase flows.

[0074] In response to the above problems, Figure 1 as well as Figure 3 As shown, a multi-module deep learning gas-liquid two-phase swirl flow pattern recognition method in one embodiment of the present invention includes the following steps:

[0075] S1, collecting a pressure difference signal of the spiral airflow in the vertical tube, obtaining a pressure drop signal according to the pressure difference signal, and performing data slicing processing on the pressure drop signal;

[0076] As a preferred technical solution, Figure 2 As shown, step S1 includes the following steps:

[0077] S11, generating a gas-liquid two-phase flow, and passing the gas-liquid two-phase flow through a honeycomb mixer for mixing and then entering a vertical tube.

[0078] S12, installing a swirler at the outlet of the stable section of the vertical pipe, so that the gas-liquid two-phase flow passes through the stable section and then forms a gas-liquid two-phase spiral flow through the swirler.

[0079] S13, setting pressure measuring holes at the outlet of the spinner and at a preset distance from the spinner, installing a pressure differential sensor between the pressure measuring holes, and measuring the interval length between the two pressure measuring holes The differential pressure signal .

[0080] Specifically, the gas-liquid two-phase flow, after mixing in a honeycomb mixer, flows into a vertical experimental section made of transparent plexiglass. It first flows into the stable section to ensure full development of the flow pattern. A vortexer is installed at the outlet of the stable section. After the gas-liquid two-phase flow passes through the vortexer, a gas-liquid two-phase spiral flow forms downstream. Pressure taps are drilled at the outlet of the vortexer and 725 mm from the vortexer. A differential pressure sensor is installed to measure the differential pressure signal along this section. The recording time is 60 seconds and the data acquisition frequency is 200 Hz.

[0081] S14, performing data processing on the pressure difference signal to obtain an initial pressure drop signal , perform dimensionless processing on the initial pressure drop signal to obtain the final pressure drop signal ;in, It represents the pressure drop between the two pressure measuring holes when the vertical pipe is in still water.

[0082] This embodiment identifies the flow pattern of the gas-liquid two-phase spiral flow based on the pressure difference fluctuation signal. First, the collected pressure difference signal is processed and converted into a dimensionless pressure drop signal. The signal collected in this embodiment is a pressure difference signal, which reflects the instantaneous pressure change in the pipeline during the gas-liquid two-phase flow process. Since the original pressure difference signal may contain noise and high-frequency interference, it needs to go through steps such as data preprocessing and signal analysis to extract flow characteristic information. By processing the data, the pressure difference signal is converted into pressure drop data, which is used to characterize the pressure drop fluctuations under different flow patterns and further analyze its impact on the gas-liquid flow. At the same time, in order to eliminate the influence of factors such as pipe diameter, flow rate and fluid properties, and to make the pressure drop data under different working conditions more widely applicable, this embodiment further performs dimensionless normalization on the pressure drop data to facilitate comparative analysis of the pressure drop under different experimental conditions. This processing method helps to reveal the resistance characteristics of the gas-liquid two-phase flow and provides a more universal reference basis for summarizing the flow laws under different working conditions.

[0083] Interval length It can be understood as the pipeline distance between the two pressure sensors. Preferably, =0.725m.

[0084] S2, constructing a classification prediction model and a loss function, training the classification prediction model based on the loss function, and performing classification prediction on the flow pattern of the spiral airflow through the trained classification prediction model.

[0085] Among them, Figure 1 As shown, the specific method for classifying and predicting the flow pattern of the spiral airflow using the trained classification prediction model includes:

[0086] S21, extracting the time domain features and frequency domain features of the voltage drop signal after data slicing through a CNN network;

[0087] S22, sequentially enhancing the time domain features and the frequency domain features through a bidirectional gated recurrent unit and a global attention mechanism to obtain enhanced time domain features and frequency domain features;

[0088] S23, performing feature fusion processing on the enhanced time domain features and frequency domain features to obtain a fused feature vector;

[0089] S24: classify and predict the flow pattern of the spiral airflow according to the fused feature vector and the fully connected layer.

[0090] A CNN typically consists of convolutional layers, pooling layers, and fully connected layers. Convolutional layers perform convolution operations on input data slices using convolution kernels to extract local features. Pooling layers typically follow convolutional layers and downsample feature maps, reducing the amount of data and computation while also preventing overfitting. Fully connected layers expand the convolutional and pooling feature maps into one-dimensional vectors, which are then mapped to different output dimensions through fully connected layers for subsequent classification or regression tasks.

[0091] like Figure 3 As shown, after completing the dimensionless conversion of the pressure difference signal into the pressure drop signal, this embodiment proposes a secondary preprocessing method for the dimensionless pressure drop sequence signal, namely, a data slicing method.

[0092] First, through statistical analysis, we ensure that each slice contains at least one complete slug / spiral cycle (to ensure the integrity of the sliced ​​data flow pattern), and reduce the input dimensionality by approximately 75% compared to the original sequence. We then use a random sliding window to slice each sequence, effectively expanding the sample and alleviating class imbalance.

[0093] As an optimal technical solution, this method is based on converting the collected pressure difference signal into a pressure drop signal, integrating the fast Fourier transform (FFT) to convert the frequency domain, and then using the convolutional neural network (CNN) to deeply extract the time domain and frequency domain features of the pressure drop signal to enhance the feature expression.

[0094] Specifically, the time-domain signal feature extraction component uses one-dimensional convolution to extract features from the time-domain signal. The convolution kernel size is 3, meaning each convolution operation scans a sliding window of size 3, focusing on local time-domain features. The entire time-domain signal is progressively extracted through three groups of convolution operations (two layers per group, totaling 6, with 32, 64, and 128 channels, respectively). The specific structure is as follows: the first group of convolutions uses two convolutional layers, each with 32 output channels; the second group of convolutions uses two convolutional layers, each with 64 output channels; and the third group of convolutions uses two convolutional layers, each with 128 output channels. After each convolution layer in each group, a Reluctant Unit (ReLU) activation is performed, followed by a max pooling operation. The purpose of pooling is to gradually extract higher-level features by reducing the length of the signal. Pooling layers help reduce the dimensionality of the convolution result, gradually reducing the spatial size of the features, reducing the complexity of subsequent computations, and extracting key signal information. More specifically, in the initial temporal feature extraction phase, a ReLU activation function is connected after the one-dimensional convolution to activate the convolution result. This is to introduce nonlinear transformations and enhance expressiveness. The ReLU activation function is then connected to a max pooling layer, which uses a 2×2 pooling window to perform max pooling, aiming to reduce the data dimension while preserving key features. The max pooling layer is followed by a ReLU activation function, which is then followed by a normalization layer using BatchNorm1d for normalization, which helps accelerate training and improve model stability. In other words, the initial temporal feature extraction phase consists of three groups of six convolutional layers. Each convolution layer sequentially includes five steps: one-dimensional convolution with ReLU activation, max pooling, ReLU activation, and BatchNorm1d normalization. The difference is that the first group has two convolution layers with 32 channels, the second group has two convolution layers with 64 channels, and the third group has two convolution layers with 128 channels.

[0095] The frequency domain signal feature extraction component converts the time domain signal into the frequency domain by performing a Fourier transform on the signal. Three one-dimensional convolutional layers are then used to extract frequency domain features, with each layer having 16, 32, and 64 channels, respectively. Unlike the time domain feature extraction component, the frequency domain component uses fewer convolutional layers, meaning the feature dimensionality of the frequency domain signal is relatively low. These convolution operations aim to extract the frequency components of the signal in the frequency domain, helping the model understand the frequency characteristics. This complements the information extracted from the time domain features and improves overall feature representation. In the initial frequency domain feature extraction component, a ReLU activation function is applied after the one-dimensional convolution to activate the convolution result, introducing nonlinear transformations and enhancing representational capabilities. The ReLU activation function is then connected to a max pooling layer, which uses a 2×2 pooling window to reduce data dimensionality while preserving key features. The max pooling layer is followed by a ReLU activation function, which is then followed by a normalization layer using BatchNorm1d for normalization, accelerating training and improving model stability. Here, each group of convolutions includes only one layer of convolution, and each layer of convolution includes five steps in sequence: 1D convolution ReLU activation, maximum pooling, ReLu activation, and normalization BatchNorm1d. The number of channels of the three groups of convolutions are 16, 32, and 64 respectively.

[0096] Through the above-mentioned parallel feature extraction method in the time domain and frequency domain, the model can simultaneously capture the complex characteristics of the signal in the time and frequency dimensions, thereby providing a more comprehensive signal representation for subsequent classification.

[0097] The bidirectional gated recurrent unit consists of a sequentially connected input layer, a forward hidden layer, a backward hidden layer, and an output layer. The input layer is connected to the normalization layer used for the initial frequency domain feature extraction and the initial time domain feature extraction. The output layer is connected to the input layer of the global attention mechanism. The bidirectional gated recurrent unit uses two layers of bidirectional gated recurrent units (with 128 and 64 hidden units), and finally outputs 128-dimensional features in the time domain and the frequency domain.

[0098] The global attention mechanism includes the input layer, BiGRU layer and output layer connected in sequence. The output layer outputs a 128-dimensional time domain feature sequence and a 128-dimensional frequency domain feature sequence. Figure 3 As shown, represents the hidden state of the Bidirectional Gated Recurrent Unit (BiGRU) at time t, represents the target hidden state obtained by BiGRU at time t, Represents the context vector, which can be understood as the weighted combination of all hidden states at t moments, with the same length as the time step. Represents the global alignment weight, which is used to sum the output of each time step of BiGRU with the attention weight to obtain the context vector. Represents the final output.

[0099] As a preferred technical solution, Figure 4 As shown, step S22 includes the following steps:

[0100] S221 , capturing forward and reverse information of the time domain features and the frequency domain features through a bidirectional gated recurrent unit to obtain a 128-dimensional time domain feature sequence and a 128-dimensional frequency domain feature sequence.

[0101] S222: Perform weighted processing on each time step of the 128-dimensional time-domain feature sequence and the 128-dimensional frequency-domain feature sequence through a global attention mechanism to obtain enhanced time-domain features and frequency-domain features.

[0102] After extracting features in the time and frequency domains, this model uses a bidirectional gated recurrent unit (BiGRU) and a global attention mechanism to further extract and enhance features.

[0103] The BiGRU is a bidirectional GRU (Gated Recurrent Unit) network. A variant of the RNN (Recurrent Neural Network), the GRU, through its gating mechanism (update gate and reset gate), effectively avoids the vanishing gradient problem common in traditional RNNs, enabling it to better capture complex patterns in long time series. Compared to traditional RNNs, the GRU is more capable of capturing long-term dependencies in sequences. The BiGRU not only processes forward information from the input sequence but also processes backward information, propagating information back from the last time step of the sequence. Therefore, the BiGRU output is a vector containing both forward and backward hidden states. In this example, the BiGRU model uses two BiGRU layers, with the first layer having a hidden dimension of 128 and the second layer having a hidden dimension of 64. Because the BiGRU can capture both forward and backward information in the sequence, the output dimension needs to be multiplied by two (each layer has two hidden states, one forward and one backward).

[0104] The global attention mechanism weights each time step in the sequence based on the BiGRU output, selecting the most important time steps for the classification task. This mechanism allows the model to adaptively focus on key parts of the input sequence, thereby improving feature selection. The BiGRU output is passed to the attention layer, where the attention mechanism learns a weight distribution based on the importance of each time step. These weights are used to weight the BiGRU output to extract the most informative parts of the sequence. In feature extraction in the time and frequency domains, the time and frequency domain features each have 128-dimensional outputs. After the attention mechanism, both the time and frequency domain features are weighted to highlight important features. Through the global attention mechanism, the model can automatically select the most useful parts of the signal, which not only improves performance but also enhances the model's interpretability.

[0105] After the time and frequency domain features are processed by the BiGRU and global attention mechanisms, two 128-dimensional feature vectors are generated, one from the time and one from the frequency domain attention layers. These two feature vectors are then combined into a single 256-dimensional feature vector using the concatenation operation ( torch.cat() ). The significance of the concatenation operation lies in combining key information extracted from the time and frequency domain signals, thereby providing a richer feature representation for subsequent classification. This 256-dimensional feature vector integrates the signal's information in both the time and frequency domains, enhancing the expressive power of the classification model.

[0106] The loss function used in this embodiment is not the traditional cross entropy function, but the FocalLoss loss function. Focal Loss effectively improves the classification accuracy of the model for minority categories by applying greater weight to difficult-to-classify samples, thereby improving the overall recognition effect.

[0107] Preferably, the loss function ;in, represents the predicted probability of the correct category, represents the balance factor, represents the adjustment factor, Indicates the loss value. Generally speaking, in the experiment, =0.25, =4.

[0108] like Figure 3 As shown in the figure, the concatenated 256-dimensional feature vector is input to a fully connected layer for final classification prediction. The output dimension of the fully connected layer is 5, corresponding to each category in the five classification tasks. The final output of the model is a 5-dimensional vector representing the probability distribution of the gas-liquid flow pattern belonging to each category.

[0109] The training of the classification prediction model specifically includes: first obtaining a large amount of data sliced ​​and processed voltage drop signals as training samples; then processing the training samples, such as cleaning, labeling, and dividing them into training and test sets, to obtain a training data set; and finally, batch training the classification prediction model based on the loss function and training results, continuously iterating and optimizing until a preset number of training epochs is reached or the loss value converges to a satisfactory level, thereby obtaining a trained classification prediction model. Since training a classification prediction model based on a training data set is a conventional technical means in the field, it will not be further described here.

[0110] In summary, the multi-module deep learning gas-liquid two-phase swirl flow pattern recognition method integrates the hybrid deep learning technology of FFT-BiGRU-CNN and global attention mechanism. It is based on the acquisition of pressure difference signal into pressure drop signal, integrates fast Fourier transform (FFT) to convert the frequency domain, and uses CNN network to expand the time-frequency features of the pressure drop signal to enhance the feature expression. Then, BiGRU is used to capture the time dependence and bidirectional dynamic features in the signal. Finally, the global attention mechanism is introduced to achieve weighted enhancement of key feature areas. The combined model can realize the joint modeling of multi-dimensional and multi-scale features, is suitable for complex swirl flow fields, and can comprehensively mine the hierarchical information of time and frequency features. Compared with existing methods, it has significant advantages in recognition accuracy, generalization ability and adaptability to complex working conditions, improves the flow pattern recognition accuracy and system robustness under complex swirl conditions, and has good engineering practicality and engineering value.

[0111] The balance factor and adjustment factor in traditional Focal Loss are usually set to fixed values ​​based on experience before the experiment begins, such as =0.25, which cannot adapt to the dynamic data distribution at different training stages. In order to better adapt to the training requirements at different stages and further improve the model's ability to handle minority classes and difficult-to-classify samples, in one embodiment, Figure 5 As shown, the gas-liquid two-phase cyclonic flow pattern identification method further includes the following steps:

[0112] S3, in each training batch of the classification prediction model, calculate the number of minority class samples The number of samples of the majority class The ratio between .

[0113] S4, dynamically adjusting the balance factor according to the ratio ;in, represents a natural constant, represents the preset first sensitivity parameter, Indicates the preset first threshold parameter. Used to reflect the degree of imbalance in real-time data distribution.

[0114] It should be noted here that minority class samples and majority class samples are two important concepts in classification problems, referring to the categories with fewer and more samples in the dataset, respectively. In classification problems, the dataset usually contains multiple categories. When the number of samples in a certain category is far less than that of other categories, the samples in that category are called "minority class samples." Conversely, the categories with more samples are called "majority class samples." For example, in the task of click-through rate prediction, users rarely click on ads, so clicked samples are considered minority class samples, while non-clicked samples are considered majority class samples.

[0115] Specifically, if the input sample data includes multiple categories, the number of minority class samples can be understood as the number of samples in the smallest category, and correspondingly, the number of majority class samples can be understood as the number of samples in the largest category. For example, assuming the number of samples is 1000, there are 5 categories, one of which has 100 samples, and the other categories have 225 samples each. Then the number of minority class samples is 100, and the number of majority class samples is 225.

[0116] The preset first sensitivity parameter is an empirical value, and its value range can be set to 5-20, and is used to control the steepness of the change of the balance factor with the ratio r. The larger the value is, the more sensitive the balance factor is to the change of the contrast r. The preset first threshold parameter is also an empirical value, and its value range can be set to 0.1-0.5, which determines the middle value position of the balance factor. When , the balance factor = 0.5. If you want the model to start paying attention to the minority class when r is smaller, you can reduce value.

[0117] function Dynamically adjust the balance factor through the Sigmoid activation function , its core function is to adaptively give more reasonable weights to minority class samples according to the category distribution characteristics of the current batch.

[0118] Adjust the balance factor based on the ratio r of the number of minority class / majority class samples in each training batch To balance the loss weight. When the category distribution is close to balance, that is, r→1, the balance factor →0.5, which can avoid overcorrection; when the minority class accounts for a very low proportion, that is, r→0, the balance factor Tends to 1, strengthening the focus on the minority class. The ratio r is mapped to the [0,1] interval through the Sigmoid function to ensure the balance factor It is always a legal weight coefficient and smoothly adapts to the training requirements of different stages. It has a nonlinear mapping effect.

[0119] That is, through the function , which can flexibly balance the importance of categories during training while avoiding overfitting or underfitting problems caused by fixed parameters.

[0120] In one embodiment, Figure 6 As shown, the gas-liquid two-phase cyclonic flow pattern identification method further includes the following steps:

[0121] S5, get the loss value of the current training batch And the loss value of the previous training batch , calculate the loss value change rate based on the current training batch loss value and the previous training batch loss value .

[0122] S6, dynamically adjusting the adjustment factor according to the loss value change rate ;in, Indicates the baseline value of the adjustment factor, represents the adjustment amplitude control coefficient, represents the loss sensitivity adjustment coefficient, Indicates the rate of change of loss value.

[0123] Specifically, the adjustment factor baseline value is used to provide a reference value for the adjustment factor to avoid relying entirely on dynamic adjustment, which may lead to numerical instability. For control The range of change, The bigger, The more drastic the adjustment. Used to adjust the loss value change rate (reflecting the convergence trend of the model in the current training stage) The larger the value, the more sensitive the model is to loss changes.

[0124] The hyperbolic tangent function tanh takes the input Mapped to the interval [-1,1], ensuring The adjustment range is controllable, making the adjustment process smooth and avoiding gradient explosion. Usually set to 0.1-0.5 to avoid Excessive adjustments can lead to unstable training. It can be adjusted according to the complexity of data distribution, and complex tasks can be increased , such as 1.5-2.0, to increase sensitivity.

[0125] when <0 and the absolute value is large, Output negative value, Reduce, reduce the penalty for difficult samples, and accelerate convergence; when close to ≈0 or >0, The output is close to 0 or positive, Increase, enhance the attention to difficult samples. In the target detection task, when the model converges quickly to simple background samples ( is negative and large), It can be reduced to 2 to reduce the weight of simple samples; when the model falls into the local optimum ( close to 0), It can be increased to 5 to force attention to difficult-to-classify samples.

[0126] function By combining the rate of change of the loss value and the hyperbolic tangent function tanh, dynamic adjustment of the regulation factor can be achieved. Its core function is to dynamically balance the attention paid to easy-to-classify samples and difficult-to-classify samples according to the convergence state of the model training process, thereby improving the model robustness and convergence efficiency.

[0127] That is, through the function ,The model can adapt to the needs of different training stages, effectively alleviate the category imbalance problem, and improve the final classification accuracy.

[0128] In one embodiment, the present invention provides a multi-module deep learning gas-liquid two-phase swirl flow pattern recognition system for implementing the gas-liquid two-phase swirl flow pattern recognition method, such as Figure 7 As shown, it includes a data acquisition module, a data processing module and a model building module.

[0129] The data acquisition module is used to collect the pressure difference signal of the spiral airflow in the vertical tube and obtain the pressure drop signal based on the pressure difference signal; the data processing module is used to perform data slicing processing on the pressure drop signal; the model construction module is used to construct a classification prediction model and a loss function, and train the classification prediction model based on the loss function.

[0130] Among them, the classification prediction model includes a CNN network, a feature processing module, a feature fusion module and a fully connected layer.

[0131] The data acquisition module is used to collect the pressure difference signal of the spiral airflow in the vertical tube and obtain a pressure drop signal based on the pressure difference signal. The data processing module is used to perform data slicing on the pressure drop signal. The CNN network is used to extract the time domain and frequency domain features of the pressure drop signal after data slicing. The feature processing module is used to enhance the time domain and frequency domain features using a sequential bidirectional gated recurrent unit and a global attention mechanism to obtain enhanced time domain and frequency domain features.

[0132] Specifically, if Figure 8 As shown in Figure 1, the experimental setup for collecting pressure drop signals of spiral airflow in a vertical tube in this embodiment mainly consists of two air and water circuits, a vertical tube, a collection system, and related connecting pipes and valves (flow control valves). The basic workflow of the experimental system is as follows:

[0133] (1) Compressed air is provided by a compressor, the flow rate of which is controlled by a first flow regulating valve 1, and the flow rate is measured by a first flow meter 2; water in a water tank 9 passes through a multi-stage centrifugal pump 10, the flow rate of which is controlled by a second flow regulating valve 3, and the flow rate of water is measured by a second flow meter 4.

[0134] (2) After the gas-liquid two-phase flow is mixed by the honeycomb mixer 5, it flows into the vertical tube 6 made of transparent organic glass. It first flows into the stable section of the vertical tube 6 to ensure the full development of the flow pattern. The vortexer 7 is installed at the outlet of the stable section. After the gas-liquid two-phase flow flows through the vortexer 7, a gas-liquid two-phase spiral flow is formed downstream of the vortexer 7. Pressure measuring holes are drilled at the outlet of the vortexer 7 and 725 mm away from the outlet of the vortexer 7. A differential pressure sensor is installed to measure the differential pressure signal of the length of the interval. The recording time is 60 s and the data acquisition frequency is 200 Hz.

[0135] (3) The gas-liquid mixed fluid flowing out of the outlet of the vertical pipe 6 is separated by the cyclone gas-liquid separator 8, and the liquid phase flows back to the water tank 9 for recycling, and the air is directly discharged through the exhaust port of the separator.

[0136] The data processing module includes a time domain feature extraction unit and a frequency domain feature extraction unit.

[0137] Time Domain Feature Extraction Unit: The time domain signal feature extraction component uses one-dimensional convolution to extract features from the time domain signal. The convolution kernel size is 3, meaning each convolution operation scans a sliding window of size 3, focusing on local time domain features. The entire time domain signal is progressively extracted through three sets of convolution operations. The specific structure is as follows: the first set of convolutions uses two convolutional layers, each with 32 output channels; the second set of convolutions uses two convolutional layers, each with 64 output channels; and the third set of convolutions uses two convolutional layers, each with 128 output channels. Each set of convolutions is followed by a maximum pooling operation. The purpose of pooling is to gradually extract higher-level features by reducing the length of the signal. Pooling layers help reduce the dimensionality of the convolution results, gradually reducing the spatial size of the features, reducing the complexity of subsequent computations, and extracting key signal information.

[0138] Frequency Domain Feature Extraction Unit: The frequency domain signal feature extraction unit converts the time domain signal into the frequency domain by performing a Fourier transform on the signal. Three one-dimensional convolutional layers are then used to extract frequency domain features, with each convolutional layer having 16, 32, and 64 channels, respectively. Unlike the time domain feature extraction unit, the frequency domain unit uses fewer convolutional layers, meaning the frequency domain signal has a relatively low feature dimension. The goal of these convolution operations is to extract the frequency components of the signal in the frequency domain, helping the model understand the frequency characteristics, thereby supplementing the information extracted from the time domain features and improving the overall feature representation capability.

[0139] Through the above-mentioned parallel feature extraction method in the time domain and frequency domain, the model can simultaneously capture the complex characteristics of the signal in the time and frequency dimensions, thereby providing a more comprehensive signal representation for subsequent classification and effectively enhancing the multi-dimensional expression capability of the features.

[0140] The feature fusion module is used to perform feature fusion processing on the enhanced time domain features and frequency domain features to obtain a fusion feature vector; the fully connected layer is used to classify and predict the flow type of the spiral airflow according to the fusion feature vector.

[0141] After the time-domain and frequency-domain features are processed by the BiGRU and global attention mechanisms, the model generates two 128-dimensional feature vectors, one from the time-domain and one from the frequency-domain attention layers. These two feature vectors are then combined into a single 256-dimensional feature vector using the concatenation operation ( torch.cat() ), which is fed into the fully connected layer for final classification. The concatenation operation combines key information extracted from the time-domain and frequency-domain signals, providing a richer and more comprehensive feature representation for subsequent classification. This 256-dimensional feature vector integrates signal information from both the time and frequency domains, enhancing the expressive power of the classification model and improving its ability to distinguish different flow patterns. It can better reflect the global characteristics of the signal, especially in the identification of complex flow patterns.

[0142] The model building module is based on the formula Construct a loss function; where, represents the predicted probability of the correct category, represents the balance factor, represents the adjustment factor.

[0143] The concatenated 256-dimensional feature vector is input to a fully connected layer for final classification prediction. The fully connected layer has an output dimension of 5, corresponding to each of the five classification tasks. The final output of the model is a 5-dimensional vector representing the probability distribution of the gas-liquid flow pattern belonging to each category.

[0144] The multi-module deep learning gas-liquid two-phase swirl flow pattern recognition system successfully achieves high-precision recognition of gas-liquid swirl flow patterns by constructing a hybrid deep learning model, combining FFT, BiGRU, CNN and global attention mechanism, and is particularly suitable for multi-phase flow pattern recognition tasks in complex industrial environments. The model can provide accurate classification under challenging working conditions such as high noise and complex flow patterns by fusing multi-scale and multi-feature information through the parallel extraction of time domain and frequency domain signal features. Compared with traditional methods, the present invention exhibits stronger robustness and adaptability under complex working conditions. Through automated processes, the present invention significantly improves the level of automation in industrial environments, reduces human errors and interference, and enhances the monitoring and intelligent classification capabilities of gas-liquid two-phase swirl flow patterns, and has a wide range of engineering application value.

[0145] In one embodiment, the model was experimentally tested. This model uses the Adam optimizer, with a learning rate set to 0.0002 and dynamically decayed by 20% based on the model's performance evaluation to improve training stability and convergence speed. After multiple rounds of experimental verification, the final number of training rounds was set to 65. To comprehensively evaluate model performance, the experiment used training and loss value changes, recall rate, precision rate, and F1-score metrics to ensure the scientific and comprehensive nature of the evaluation.

[0146] Figure 9 The data shows the changing trends of the model's accuracy and loss function during training. It can be observed that the training accuracy increases rapidly initially and reaches saturation after approximately epoch 65, ultimately reaching 100%. Simultaneously, the loss value steadily decreases, approaching 0, indicating that the model has adequately fitted the training set. The validation accuracy shows an overall upward trend. Although there were some fluctuations during some iterations, the fluctuations were minor and the overall trend was stable, ultimately converging to 99.32%. This slight fluctuation is common in deep learning training and may be due to uneven data distribution or fluctuations during model parameter fine-tuning, but it did not affect the overall convergence. This trend indicates that the model did not exhibit significant overfitting during training and exhibited good fitting ability and stability.

[0147] Table 1 shows the classification performance evaluation metrics for five swirl flow patterns. The model demonstrated excellent classification results for all five flow patterns. The average accuracy for the five flow patterns was 98.16%. All metrics for the spiral intermittent flow and spiral column flow patterns reached 100%, indicating that the model achieved completely accurate recognition for these two flow patterns, with no false positives or false negatives. This demonstrates that their characteristics are distinct and easy for the model to distinguish. The slug flow pattern achieved 100% precision and 96.67% recall, with an F1 score of 98.31%. This indicates that all samples predicted as slug flow were correctly classified, but some slug flow samples were not identified, indicating minor missed detections. The spiral annular flow pattern performed well across all four metrics, with an accuracy of 96%, a close precision and recall, and an F1 score of 96.48%. This indicates that the model's classification of this flow pattern is relatively stable, but its discrimination is slightly lower than that of the spiral intermittent flow and spiral column flow. The recall rate for the churning flow pattern was 98.33%, indicating that the model could identify the majority of churning flow samples. However, the precision rate was 93.65%, the lowest among all flow patterns, indicating that some samples from other types were misclassified as churning flows, suggesting that their features may overlap with those of other types. Overall, the model demonstrated good accuracy and generalization across various flow patterns, achieving particularly good recognition results for spiral gap flow and spiral gas column patterns, demonstrating strong engineering application value.

[0148]

[0149] Table 1 Test classification performance evaluation index values ​​for five types of flow types

[0150] The confusion matrix is ​​as follows Figure 10 The output label of the flow type uses the number "1" to represent slug flow (SF), the number "2" to represent spiral annular flow (SA), the number "3" to represent spiral intermittent flow (SI), the number "4" to represent stirring flow (CF), and the number "5" to represent spiral gas column flow (SG).

[0151] In summary, the present invention achieves joint modeling of the time-frequency characteristics of pressure drop signals through the Fast Fourier Transform (FFT), significantly enhancing the expressiveness of flow pattern features. Combining the structural advantages of BiGRU and CNN, the present invention models the temporal dependency and local spatial structure of the signal, respectively. This overcomes the limitations of existing single network architectures in sequence modeling or local feature extraction. By introducing a global attention mechanism, the model automatically focuses on the most discriminative feature segments in time series data, improving the recognition accuracy of various complex flow patterns (such as spiral annular flow and air column flow). Experiments have demonstrated that the present invention achieves an accuracy of 98.16% in typical flow pattern recognition tasks, significantly outperforming existing models. Compared to some flow pattern recognition methods that require image, visualization, or invasive sensors, the present invention utilizes a non-invasive approach based on pressure drop signals. This approach offers simple measurement, low cost, and ease of operation, and is applicable to experimental sections of any material, simplifying field deployment requirements and offering greater engineering adaptability and practical application value.

[0152] As a preferred technical solution, the multi-module deep learning gas-liquid two-phase swirl flow pattern identification system also includes a ratio acquisition module and a balance factor adjustment module.

[0153] The ratio acquisition module is used to calculate the number of minority class samples in each training batch of the classification prediction model. The number of samples of the majority class The ratio between The balance factor adjustment module is used to dynamically adjust the balance factor according to the ratio ;in, represents a natural constant, represents the preset first sensitivity parameter, Indicates the preset first threshold parameter.

[0154] function Dynamically adjust the balance factor through the Sigmoid activation function Its core function is to adaptively assign more reasonable weights to minority class samples based on the category distribution characteristics of the current batch.

[0155] Adjust the balance factor based on the ratio r of the number of minority class / majority class samples in each training batch To balance the loss weight. When the category distribution is close to balance, that is, r→1, the balance factor →0.55, which can avoid overcorrection; when the minority class accounts for a very low proportion, that is, r→0, the balance factor Tends to 1, strengthening the focus on the minority class. The ratio r is mapped to the [0,1] interval through the Sigmoid function to ensure the balance factor It is always a legal weight coefficient and smoothly adapts to the training requirements of different stages. It has a nonlinear mapping effect.

[0156] That is, through the function , which can flexibly balance the importance of categories during training while avoiding overfitting or underfitting problems caused by fixed parameters.

[0157] As a preferred technical solution, the multi-module deep learning gas-liquid two-phase swirl flow pattern identification system also includes a change rate acquisition module and a regulation factor adjustment module.

[0158] The change rate acquisition module is used to obtain the loss value of the current training batch And the loss value of the previous training batch , calculate the loss value change rate based on the current training batch loss value and the previous training batch loss value ; The adjustment factor adjustment module is used to dynamically adjust the adjustment factor according to the loss value change rate ;in, Indicates the baseline value of the adjustment factor, represents the adjustment amplitude control coefficient, represents the loss sensitivity adjustment coefficient, Indicates the rate of change of loss value.

[0159] function By combining the rate of change of the loss value and the hyperbolic tangent function tanh, dynamic adjustment of the regulation factor can be achieved. Its core function is to dynamically balance the attention paid to easy-to-classify samples and difficult-to-classify samples according to the convergence state of the model training process, thereby improving the model robustness and convergence efficiency.

[0160] That is, through the function ,The model can adapt to the needs of different training stages, effectively alleviate the category imbalance problem, and improve the final classification accuracy.

[0161] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0162] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.

Claims

1. A multi-module deep learning gas-liquid two-phase swirl flow pattern identification method, characterized in that: The identification method comprises the following steps: collecting a pressure difference signal of the spiral airflow in the vertical tube, obtaining a pressure drop signal according to the pressure difference signal, and performing data slicing processing on the pressure drop signal; Constructing a classification prediction model and a loss function, training the classification prediction model based on the loss function, and classifying and predicting the flow pattern of the spiral airflow using the trained classification prediction model; The specific method for classifying and predicting the flow pattern of the spiral airflow using the trained classification prediction model includes: Extracting the time domain features and frequency domain features of the voltage drop signal after data slicing through a CNN network; The time domain features and the frequency domain features are enhanced by a bidirectional gated recurrent unit and a global attention mechanism to obtain enhanced time domain features and frequency domain features; Performing feature fusion processing on the enhanced time domain features and frequency domain features to obtain a fused feature vector; Classify and predict the flow pattern of the spiral airflow according to the fused feature vector and the fully connected layer; The loss function ; in, represents the predicted probability of the correct category, represents the balance factor, represents the adjustment factor, Indicates the loss value; The gas-liquid two-phase cyclonic flow pattern identification method further comprises the following steps: Calculate the number of minority class samples in each training batch of the classification prediction model The number of samples of the majority class The ratio between ; Dynamically adjust the balance factor according to the ratio ; in, represents a natural constant, represents the preset first sensitivity parameter, represents a preset first threshold parameter; The gas-liquid two-phase cyclonic flow pattern identification method further comprises the following steps: Get the loss value of the current training batch And the loss value of the previous training batch , calculate the loss value change rate based on the current training batch loss value and the previous training batch loss value ; Dynamically adjust the adjustment factor according to the loss value change rate ; in, Indicates the baseline value of the adjustment factor, represents the adjustment amplitude control coefficient, represents the loss sensitivity adjustment coefficient, Indicates the rate of change of loss value.

2. The multi-module deep learning gas-liquid two-phase swirl flow pattern identification method according to claim 1, characterized in that: The specific method of collecting the pressure difference signal of the spiral airflow in the vertical tube and obtaining the pressure drop signal according to the pressure difference signal includes the following steps: generating a gas-liquid two-phase flow, and passing the gas-liquid two-phase flow through a honeycomb mixer for mixing before entering a vertical tube; A swirler is installed at the outlet of the stable section of the vertical pipe, so that the gas-liquid two-phase flow passes through the stable section and then forms a gas-liquid two-phase spiral flow through the swirler; A pressure measuring hole is set at the outlet of the spinner and at a preset distance from the spinner, and a pressure differential sensor is installed between the pressure measuring holes to measure the interval length of the two pressure measuring holes. The differential pressure signal ; Process the pressure difference signal to obtain the initial pressure drop signal , perform dimensionless processing on the initial pressure drop signal to obtain the final pressure drop signal ; in, It represents the pressure drop between the two pressure measuring holes when the vertical pipe is in still water.

3. The multi-module deep learning gas-liquid two-phase swirl flow pattern identification method according to claim 2, characterized in that: The specific method of enhancing the time domain features and the frequency domain features to obtain the enhanced time domain features and the frequency domain features includes the following steps: Capturing the forward and reverse information of the time domain features and the frequency domain features through a bidirectional gated recurrent unit to obtain a 128-dimensional time domain feature sequence and a 128-dimensional frequency domain feature sequence; Each time step of the 128-dimensional time domain feature sequence and the 128-dimensional frequency domain feature sequence is weighted through a global attention mechanism to obtain enhanced time domain features and frequency domain features.

4. A multi-module deep learning gas-liquid two-phase swirl flow pattern recognition system, used to implement the gas-liquid two-phase swirl flow pattern recognition method according to any one of claims 1 to 3, characterized in that: include: a data acquisition module, configured to acquire a pressure difference signal of the spiral airflow in the vertical tube, and obtain a pressure drop signal based on the pressure difference signal; A data processing module, configured to perform data slicing processing on the voltage drop signal; A model building module is used to build a classification prediction model and a loss function, and train the classification prediction model based on the loss function; Wherein, the classification prediction model includes: A CNN network is used to extract the time domain features and frequency domain features of the voltage drop signal after data slicing processing; A feature processing module is used to sequentially enhance the time domain features and the frequency domain features through a bidirectional gated recurrent unit and a global attention mechanism to obtain enhanced time domain features and frequency domain features; A feature fusion module is used to perform feature fusion processing on the enhanced time domain features and frequency domain features to obtain a fused feature vector; A fully connected layer, configured to perform classification prediction on the flow pattern of the spiral airflow according to the fused feature vector; The model building module is based on the formula Construct loss function; in, represents the predicted probability of the correct category, represents the balance factor, represents the adjustment factor, Indicates the loss value; Also includes: The ratio acquisition module is used to calculate the number of minority class samples in each training batch of the classification prediction model. The number of samples of the majority class The ratio between ; A balance factor adjustment module is used to dynamically adjust the balance factor according to the ratio ; in, represents a natural constant, represents the preset first sensitivity parameter, represents a preset first threshold parameter; Also includes: The change rate acquisition module is used to obtain the loss value of the current training batch And the loss value of the previous training batch , calculate the loss value change rate based on the current training batch loss value and the previous training batch loss value ; The adjustment factor adjustment module is used to dynamically adjust the adjustment factor according to the loss value change rate ; in, Indicates the baseline value of the adjustment factor, represents the adjustment amplitude control coefficient, represents the loss sensitivity adjustment coefficient, Indicates the rate of change of loss value.

Citation Information

Patent Citations

  • Gas-liquid two-phase flow pattern online identification method based on GRU neural network

    CN112113742A

  • Gas-liquid two-phase flow pattern identification method based on GoogLeNet model

    CN115861707A

  • Gas-liquid two-phase flow pattern identification method based on wavelet analysis

    CN117725362A

  • Gas-liquid multiphase flow pattern identification method and system based on differential pressure fluctuation analysis

    CN117972328A

  • Two-phase flow pattern recognition method and device based on attention mechanism and convolutional neural network, computer equipment and storage medium

    CN118072069A