Oil-water two-phase flow parameter measurement system and method based on multi-stage sharing
By adopting multi-level sharing technology in the oil-water two-phase flow parameter measurement system, high-level feature sharing and adaptive fusion of flow type classification and moisture content prediction tasks is achieved, and the problem of feature sharing limitations in the existing technology is solved, which significantly improves the measurement accuracy.
Patent Information
- Application Number
- CN202510550724.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-06-13
AI Technical Summary
In the measurement of oil and water two-phase flow parameters, the existing multi-task learning is limited to the feature map stage because feature sharing is limited to the feature map stage, making it difficult to achieve higher-level feature sharing, resulting in limited measurement accuracy.
The oil-water two-phase flow parameter measurement system based on multi-stage sharing is adopted, and by constructing a multi-stage feature extraction unit and a multi-stage expert gating unit, the flow classification task and moisture content prediction task are realized in depth sharing between feature maps of different scales, and the multi-stage expert gating unit is used to adaptively fusion of the feature vectors of the dual-tasks.
It significantly improves the accuracy of flow type classification and the accuracy of moisture content prediction, realizes high-precision measurement of multiple parameters of oil and water flow with two phases, and alleviates conflicts between tasks.
Smart Images

Figure CN120139808A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent signal processing, and in particular to an oil-water two-phase flow parameter measurement system and method based on multi-level sharing. Background Art
[0002] As the domestic oilfield development enters the middle and late stages, the exploitation method of water injection and pressurization makes most water injection oilfields gradually enter the high water cut stage in the middle and late stages. At present, petroleum and its derivatives are still energy products that cannot be completely replaced in a short time. However, the current situation of oil well exploitation with high water cut and low productivity makes it very difficult to accurately measure the flow parameters in the oil well. The accurate measurement of oil-water two-phase flow parameters is crucial for optimizing the production efficiency of oilfields and ensuring the safe operation of equipment. Therefore, a more accurate and effective method for measuring oil-water two-phase flow parameters is needed.
[0003] At present, the measurement of oil-water two-phase flow parameters is mainly divided into two categories: direct measurement and soft measurement methods. Direct measurement methods often require complex physical models and expensive high-tech sensors, with high costs and unable to be widely applied. Therefore, soft measurement methods are often used in recent research on the measurement of oil-water two-phase flow parameters. The soft measurement method refers to the use of the complex nonlinear processing and feature extraction capabilities of the model to achieve the mapping between the sensor measurement value and the parameter to be measured. Among them, the soft measurement method based on multi-task learning can measure multiple oil-water two-phase flow parameters simultaneously and can more completely describe the complex flow characteristics of oil-water two-phase flow. However, in the existing multi-task learning for measuring oil-water two-phase flow parameters, the information sharing of multiple tasks is often limited to the feature map stage, making it difficult to achieve high-precision measurement of multiple oil-water two-phase flow parameters. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an oil-water two-phase flow parameter measurement system and method based on multi-level sharing, aiming to solve the problem that conventional multi-task learning is limited to information sharing at the feature map stage when measuring oil-water two-phase flow parameters, making it difficult to achieve higher-level feature sharing, resulting in limited measurement accuracy.
[0005] To solve the above technical problem, the technical solution adopted by the present invention is: an oil-water two-phase flow parameter measurement system based on multi-level sharing, characterized in that it includes a multi-level feature extraction unit, a global parallel pooling layer, and a multi-level expert gating unit connected in sequence, and a flow pattern classification unit and a water cut prediction unit are respectively connected to the multi-level expert gating unit.
[0006] A further improvement of the technical solution of the present invention is that the specific secondary structures of each unit are as follows:
[0007] The multi-level feature extraction unit includes a shared feature extraction unit, a primary feature extraction unit, and a secondary feature extraction unit that are connected to each other; among them, the shared feature extraction unit includes a shared feature extraction module, the primary feature extraction unit includes a parallel primary flow pattern classification feature extraction module and a primary water cut prediction feature extraction module, and a primary hybrid attention module is connected to the primary flow pattern classification feature extraction module; the secondary feature extraction unit includes a parallel secondary flow pattern classification feature extraction module and a secondary water cut prediction feature extraction module, and a secondary hybrid attention module is connected to the secondary flow pattern classification feature extraction module;
[0008] The multi-level expert gating unit includes a primary expert gating unit and a secondary expert gating unit that are connected to each other. The primary expert gating unit is connected to a flow pattern classification unit, and the secondary expert gating unit is connected to a water cut prediction unit; among them, the primary expert gating unit includes a parallel primary flow pattern classification expert module, a primary fusion expert module, a primary water cut prediction expert module, a primary flow pattern classification gating module, a primary fusion gating module, and a primary water cut prediction gating module; the secondary expert gating unit includes a parallel secondary fusion expert module, a secondary water cut prediction expert module, and a secondary fusion gating module;
[0009] The flow pattern classification unit includes a flow pattern classification module; the water cut prediction unit includes a water cut prediction module.
[0010] A further improvement of the technical solution of the present invention lies in: the specific structures of each module are as follows:
[0011] The shared feature extraction module sequentially includes a convolutional layer, a batch normalization layer, a ReLU activation function layer, and a max pooling layer from the input to the output direction;
[0012] The primary flow pattern classification feature extraction module sequentially includes a convolutional layer, a batch normalization layer, a ReLU activation function layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer, an addition operation, a convolutional layer, a batch normalization layer, a ReLU activation function layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer, and an addition operation from the input to the output direction;
[0013] The primary water cut prediction feature extraction module sequentially includes a convolutional layer, a batch normalization layer, a ReLU activation function layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer, an addition operation, a convolutional layer, a batch normalization layer, a ReLU activation function layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer, and an addition operation from the input to the output direction;
[0014] The first-level hybrid attention module, from the input to the output direction, sequentially includes: a parallel adaptive average pooling layer and an adaptive max pooling layer. After the adaptive average pooling layer, there are a convolutional layer, a ReLU activation function layer, and a convolutional layer. After the adaptive max pooling layer, there are a convolutional layer, a ReLU activation function layer, and a convolutional layer. There is an addition operation, a Sigmod activation function layer, a multiplication operation, a parallel average operation along the channel dimension and a maximum operation along the channel dimension, a concatenation operation, a convolutional layer, a Sigmod activation function layer, and a multiplication operation;
[0015] The second-level flow pattern classification feature extraction module, from the input to the output direction, sequentially includes a parallel convolutional layer and a convolutional layer. After the convolutional layer, there are a batch normalization layer, a ReLU activation function layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer. There is an addition operation, a convolutional layer, a batch normalization layer, a ReLU activation function layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer, and an addition operation;
[0016] The second-level water content prediction feature extraction module, from the input to the output direction, sequentially includes a parallel convolutional layer and a convolutional layer. After the convolutional layer, there are a batch normalization layer, a ReLU activation function layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer. There is an addition operation, a convolutional layer, a batch normalization layer, a ReLU activation function layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer, and an addition operation;
[0017] The second-level hybrid attention module, from the input to the output direction, sequentially includes a parallel adaptive average pooling layer and an adaptive max pooling layer. After the adaptive average pooling layer, there are a convolutional layer, a ReLU activation function layer, and a convolutional layer. After the adaptive max pooling layer, there are a convolutional layer, a ReLU activation function layer, and a convolutional layer. There is an addition operation, a Sigmod activation function layer, a multiplication operation, a parallel average operation along the channel dimension and a maximum operation along the channel dimension, a concatenation operation, a convolutional layer, a Sigmod activation function layer, and a multiplication operation;
[0018] The first-level flow pattern classification expert module includes N1 parallel expert layers. Each expert layer, from the input to the output direction, sequentially includes a fully connected layer, a ReLU activation function layer, a fully connected layer, and a ReLU activation function layer;
[0019] The first-level fusion expert module includes N2 parallel expert layers. From the input to the output direction, each expert layer sequentially includes a fully connected layer, a ReLU activation function layer, a fully connected layer, and a ReLU activation function layer;
[0020] The first-level water content prediction expert module includes N3 parallel expert layers. From the input to the output direction, each expert layer sequentially includes a fully connected layer, a ReLU activation function layer, a fully connected layer, and a ReLU activation function layer;
[0021] The first-level flow pattern classification gating module sequentially includes a fully connected layer with an output size of N1, a Softmax activation function layer, and a transpose operation from the input to the output direction;
[0022] The first-level fusion gating module sequentially includes a fully connected layer with an output size of N1+N2, a Softmax activation function layer, and a transpose operation from the input to the output direction;
[0023] The first-level water content prediction gating module sequentially includes a fully connected layer with an output size of N3, a Softmax activation function layer, and a transpose operation from the input to the output direction;
[0024] The second-level fusion expert module includes N4 parallel expert layers. From the input to the output direction, each expert layer sequentially includes a fully connected layer, a ReLU activation function layer, a fully connected layer, and a ReLU activation function layer;
[0025] The second-level water content prediction expert module includes N5 parallel expert layers. From the input to the output direction, each expert layer sequentially includes a fully connected layer, a ReLU activation function layer, a fully connected layer, and a ReLU activation function layer;
[0026] The second-level fusion gating module sequentially includes a fully connected layer with an output size of N4+N5, a Softmax activation function layer, and a transpose operation from the input to the output direction;
[0027] The flow pattern classification module sequentially includes a fully connected layer, a ReLU activation function, and a fully connected layer from the input to the output direction;
[0028] The water content prediction module sequentially includes a fully connected layer, a ReLU activation function, and a fully connected layer from the input to the output direction.
[0029] A method for measuring oil-water two-phase flow parameters based on multi-level sharing is as follows:
[0030] Step 1: Recursively encode the electromagnetic time series signal of the measured oil-water two-phase flow to obtain a recurrence plot transformed from the electromagnetic signal;
[0031] Step 2: Input the recursive graph into the shared feature extraction unit to obtain a primary feature map;
[0032] Step 3: Input the primary feature map into the first-level feature extraction unit to obtain a first-level flow pattern classification feature map and a first-level water cut prediction enhanced feature map;
[0033] Step 4: Input the first-level flow pattern classification feature map and the first-level water cut prediction enhanced feature map into the second-level feature extraction unit to obtain a second-level flow pattern classification feature map and a second-level water cut prediction enhanced feature map;
[0034] Step 5: Input the second-level flow pattern classification feature map and the second-level water cut prediction enhanced feature map into the global average pooling layer to obtain a primary flow pattern classification feature vector and a primary water cut prediction feature vector;
[0035] Step 6: Input the primary flow pattern classification feature vector and the primary water cut prediction feature vector into the first-level expert gating unit to obtain a first-level flow pattern classification feature vector, a first-level fusion feature vector, and a first-level water cut prediction feature vector;
[0036] Step 7: Input the first-level flow pattern classification feature vector into the flow pattern classification unit to obtain a flow pattern classification result;
[0037] Step 8: Input the first-level fusion feature vector and the first-level water cut prediction feature vector into the second-level expert gating unit to obtain a second-level water cut prediction feature vector;
[0038] Step 9: Input the second-level water cut prediction feature vector into the water cut prediction feature unit to obtain a water cut prediction result.
[0039] A further improvement of the technical solution of the present invention lies in: The specific steps of Step 3 are as follows:
[0040] Step 3.1: Input the primary feature map into the first-level flow pattern classification feature extraction module to obtain a first-level flow pattern classification feature map;
[0041] Step 3.2: Input the primary feature map into the first-level water cut prediction feature extraction module to obtain a first-level water cut prediction feature map;
[0042] Step 3.3: Input the first-level flow pattern classification feature map into the first-level hybrid attention module to obtain a first-level attention feature map;
[0043] Step 3.4: Perform an addition operation on the first-level attention feature map and the first-level water cut prediction feature map to obtain a first-level water cut prediction enhanced feature map.
[0044] A further improvement of the technical solution of the present invention lies in: The specific steps of Step 4 are as follows:
[0045] Step 4.1: Input the first-level flow pattern classification feature map into the second-level flow pattern classification feature extraction module to obtain the second-level flow pattern classification feature map;
[0046] Step 4.2: Input the first-level water content prediction enhanced feature extraction map into the second-level water content prediction feature extraction module to obtain the second-level water content prediction feature map;
[0047] Step 4.3: Input the second-level flow pattern classification feature map into the second-level hybrid attention module to obtain the second-level attention feature map;
[0048] Step 4.4: Perform an addition operation on the second-level attention feature map and the second-level water content prediction feature map to obtain the second-level water content prediction enhanced feature map.
[0049] A further improvement of the technical solution of the present invention is that the specific steps of step 6 are as follows:
[0050] Step 6.1: Input the primary flow pattern classification feature vector into the first-level flow pattern classification expert module to obtain the first-level multi-expert flow pattern classification feature vector;
[0051] Step 6.2: Input the primary flow pattern classification feature vector into the first-level flow pattern classification gating module to obtain the first-level flow pattern classification expert weight;
[0052] Step 6.3: Perform a multiplication operation on the first-level flow pattern classification expert weight and the first-level multi-expert flow pattern classification feature vector to obtain the first-level flow pattern classification feature vector;
[0053] Step 6.4: Input the primary water content prediction feature vector into the first-level fusion expert module to obtain the first-level multi-expert fusion feature vector;
[0054] Step 6.5: Input the primary water content prediction feature vector into the first-level fusion gating module to obtain the first-level fusion expert weight;
[0055] Step 6.6: Perform an addition operation on the first-level multi-expert fusion feature vector and the first-level multi-expert flow pattern classification feature vector, and then perform a multiplication operation with the first-level fusion expert weight to obtain the first-level fusion feature vector;
[0056] Step 6.7: Input the primary water content prediction feature vector into the first-level water content prediction expert module to obtain the first-level multi-expert water content prediction feature vector;
[0057] Step 6.8: Input the primary water content prediction feature vector into the first-level water content prediction gating module to obtain the first-level water content prediction expert weight;
[0058] Step 6.9: Perform a multiplication operation on the first-level water content prediction expert weight and the first-level multi-expert water content prediction feature vector to obtain the first-level water content prediction feature vector.
[0059] A further improvement of the technical solution of the present invention lies in: The specific steps of step 8 are as follows:
[0060] Step 8.1: Input the first-level fusion feature vector into the second-level fusion expert module to obtain a second-level multi-expert fusion feature vector;
[0061] Step 8.2: Input the first-level water content prediction feature vector into the second-level water content prediction expert module to obtain a second-level multi-expert water content prediction feature vector;
[0062] Step 8.3: Input the first-level water content prediction feature vector into the second-level fusion gating module to obtain the second-level fusion expert weights;
[0063] Step 8.4: After performing an addition operation on the second-level multi-expert fusion feature vector and the second-level multi-expert water content prediction feature vector, perform a multiplication operation with the second-level fusion expert weights to obtain a second-level water content prediction feature vector.
[0064] Due to the adoption of the above technical solution, the technical progress achieved by the present invention is: combining the flow pattern and water content parameters in the oil-water two-phase flow, using the recurrence plot encoding of electromagnetic signals as the input, and using a multi-task learning network to simultaneously predict two tasks, where the flow pattern classification is used as an auxiliary task for water content prediction. After the features are independently learned in the two task branches, a hybrid attention mechanism is used to extract the features required for water content prediction from the flow pattern classification task to enhance the features for water content prediction at different scales. When the feature map is converted into a feature vector, the flow pattern classification features learned by the expert layer are hierarchically filtered into the water content prediction task features of the gating layer, reducing the conflict between tasks, and finally obtaining high-precision flow pattern classification and water content prediction results. Description of the Drawings
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts;
[0066] Figure 1 is a schematic structural diagram of the oil-water two-phase flow parameter measurement system of the present invention;
[0067] Figure 2 is a schematic flow diagram of the oil-water two-phase flow parameter measurement method of the present invention;
[0068] Figure 3 is a schematic diagram of measuring the oil-water two-phase flow parameters using electromagnetic signals of the present invention. Detailed Embodiments
[0069] The present invention will be further described in detail below with reference to embodiments:
[0070] As Figure 1 shown, it is a schematic structural diagram of an oil-water two-phase flow parameter measurement system based on multi-level sharing, including a multi-level feature extraction unit, a global parallel pooling layer, and a multi-level expert gating unit connected in sequence. A flow pattern classification unit and a water cut prediction unit are respectively connected to the multi-level expert gating unit. The specific secondary structures of each unit are as follows:
[0071] The multi-level feature extraction unit includes a shared feature extraction unit, a first-level feature extraction unit, and a second-level feature extraction unit connected to each other; among them, the shared feature extraction unit includes a shared feature extraction module, the first-level feature extraction unit includes parallel first-level flow pattern classification feature extraction modules and first-level water cut prediction feature extraction modules, and a first-level hybrid attention module is connected to the first-level flow pattern classification feature extraction module; the second-level feature extraction unit includes parallel second-level flow pattern classification feature extraction modules and second-level water cut prediction feature extraction modules, and a second-level hybrid attention module is connected to the second-level flow pattern classification feature extraction module;
[0072] The multi-level expert gating unit includes a first-level expert gating unit and a second-level expert gating unit connected to each other. The first-level expert gating unit is connected to a flow pattern classification unit, and the second-level expert gating unit is connected to a water cut prediction unit; among them, the first-level expert gating unit includes parallel first-level flow pattern classification expert modules, first-level fusion expert modules, first-level water cut prediction expert modules, first-level flow pattern classification gating modules, first-level fusion gating modules, and first-level water cut prediction gating modules; the second-level expert gating unit includes parallel second-level fusion expert modules, second-level water cut prediction expert modules, and second-level fusion gating modules;
[0073] The flow pattern classification unit includes a flow pattern classification module; the water cut prediction unit includes a water cut prediction module.
[0074] The specific structures of each module are as follows:
[0075] The shared feature extraction module sequentially includes a 3×3 convolutional layer with 64 output channels, a batch normalization layer, a ReLU activation function layer, and a max pooling layer with a stride of 2 from the input to the output direction;
[0076] The first-level flow pattern classification feature extraction module sequentially includes, from the input to the output direction, a 3×3 convolutional layer with 64 output channels, a batch normalization layer, a ReLU activation function layer, a 3×3 convolutional layer with 64 output channels, a batch normalization layer, a ReLU activation function layer, an addition operation, a 3×3 convolutional layer with 64 output channels, a batch normalization layer, a ReLU activation function layer, a 3×3 convolutional layer with 64 output channels, a batch normalization layer, a ReLU activation function layer, and an addition operation;
[0077] The first-level water content prediction feature extraction module sequentially includes, from the input to the output direction, a 3×3 convolutional layer with 64 output channels, a batch normalization layer, a ReLU activation function layer, a 3×3 convolutional layer with 64 output channels, a batch normalization layer, a ReLU activation function layer, an addition operation, a 3×3 convolutional layer with 64 output channels, a batch normalization layer, a ReLU activation function layer, a 3×3 convolutional layer with 64 output channels, a batch normalization layer, a ReLU activation function layer, and an addition operation;
[0078] The first-level hybrid attention module sequentially includes, from the input to the output direction, in parallel, an adaptive average pooling layer with an output size of 1×1 and an adaptive max pooling layer with an output size of 1×1. After the adaptive average pooling layer, there is a 1×1 convolutional layer with 64 output channels, a ReLU activation function layer, and a 1×1 convolutional layer with 64 output channels. After the adaptive max pooling layer, there is a 1×1 convolutional layer with 64 output channels, a ReLU activation function layer, and a 1×1 convolutional layer with 64 output channels. There is an addition operation, a Sigmod activation function layer, a multiplication operation, in parallel, an average operation along the channel dimension and a maximum operation along the channel dimension, a concatenation operation, a 7×7 convolutional layer with 64 output channels, a Sigmod activation function layer, and a multiplication operation;
[0079] The second-level flow pattern classification feature extraction module sequentially includes, from the input to the output direction, in parallel, a 3×3 convolutional layer with 128 output channels and a 1×1 convolutional layer with 128 output channels. After the 3×3 convolutional layer with 128 output channels, there is a batch normalization layer, a ReLU activation function layer, a 3×3 convolutional layer with 128 output channels, a batch normalization layer, a ReLU activation function layer, an addition operation, a 3×3 convolutional layer with 128 output channels, a batch normalization layer, a ReLU activation function layer, a 3×3 convolutional layer with 128 output channels, a batch normalization layer, a ReLU activation function layer, and an addition operation;
[0080] The secondary moisture content prediction feature extraction module sequentially includes, from the input to the output direction, a 3×3 convolutional layer with 128 output channels in parallel, a 1×1 convolutional layer with 128 output channels, a batch normalization layer, a ReLU activation function layer, a 3×3 convolutional layer with 128 output channels, a batch normalization layer, a ReLU activation function layer, an addition operation, a 3×3 convolutional layer with 128 output channels, a batch normalization layer, a ReLU activation function layer, a 3×3 convolutional layer with 128 output channels, a batch normalization layer, a ReLU activation function layer, and an addition operation;
[0081] The secondary hybrid attention module sequentially includes, from the input to the output direction, an adaptive average pooling layer with an output size of 1×1 in parallel, an adaptive max pooling layer with an output size of 1×1, a 1×1 convolutional layer with 128 output channels, a ReLU activation function layer, a 1×1 convolutional layer with 128 output channels after the adaptive average pooling layer, a 1×1 convolutional layer with 64 output channels, a ReLU activation function layer, a 1×1 convolutional layer with 64 output channels after the adaptive max pooling layer, an addition operation, a Sigmod activation function layer, a multiplication operation, an average operation along the channel dimension in parallel, a maximum operation along the channel dimension, a concatenation operation, a 7×7 convolutional layer with 64 output channels, a Sigmod activation function layer, and a multiplication operation;
[0082] The primary flow pattern classification expert module includes 2 expert layers in parallel. The expert layer sequentially includes, from the input to the output direction, a fully connected layer with an output size of 64, a ReLU activation function layer, a fully connected layer with an output size of 64, and a ReLU activation function layer;
[0083] The primary fusion expert module includes 2 expert layers in parallel. The expert layer sequentially includes, from the input to the output direction, a fully connected layer with an output size of 64, a ReLU activation function layer, a fully connected layer with an output size of 64, and a ReLU activation function layer;
[0084] The primary moisture content prediction expert module includes 2 expert layers in parallel. The expert layer sequentially includes, from the input to the output direction, a fully connected layer with an output size of 64, a ReLU activation function layer, a fully connected layer with an output size of 64, and a ReLU activation function layer;
[0085] The primary flow pattern classification expert module includes N1 expert layers in parallel. The expert layer sequentially includes, from the input to the output direction, a fully connected layer with an output size of 64, a ReLU activation function layer, a fully connected layer with an output size of 64, and a ReLU activation function layer;
[0086] The first-level fusion expert module includes N2 parallel expert layers. From the input to the output direction, each expert layer sequentially includes a fully-connected layer with an output size of 64, a ReLU activation function layer, a fully-connected layer with an output size of 64, and a ReLU activation function layer;
[0087] The first-level moisture content prediction expert module includes N3 parallel expert layers. From the input to the output direction, each expert layer sequentially includes a fully-connected layer with an output size of 64, a ReLU activation function layer, a fully-connected layer with an output size of 64, and a ReLU activation function layer;
[0088] The first-level flow pattern classification gating module sequentially includes a fully-connected layer with an output size of N1, a Softmax activation function layer, and a transpose operation from the input to the output direction;
[0089] The first-level fusion gating module sequentially includes a fully-connected layer with an output size of N1 + N2, a Softmax activation function layer, and a transpose operation from the input to the output direction;
[0090] The first-level moisture content prediction gating module sequentially includes a fully-connected layer with an output size of N3, a Softmax activation function layer, and a transpose operation from the input to the output direction;
[0091] The second-level fusion expert module includes N4 parallel expert layers. From the input to the output direction, each expert layer sequentially includes a fully-connected layer with an output size of 32, a ReLU activation function layer, a fully-connected layer with an output size of 32, and a ReLU activation function layer;
[0092] The second-level moisture content prediction expert module includes N5 parallel expert layers. From the input to the output direction, each expert layer sequentially includes a fully-connected layer with an output size of 32, a ReLU activation function layer, a fully-connected layer with an output size of 32, and a ReLU activation function layer;
[0093] The second-level fusion gating module sequentially includes a fully-connected layer with an output size of N4 + N5, a Softmax activation function layer, and a transpose operation from the input to the output direction;
[0094] The flow pattern classification module sequentially includes a fully-connected layer with an output size of 32, a ReLU activation function, and a fully-connected layer with an output size of 3 from the input to the output direction;
[0095] The moisture content prediction module sequentially includes a fully-connected layer with an output size of 16, a ReLU activation function, and a fully-connected layer with an output size of 1 from the input to the output direction.
[0096] With the above oil-water two-phase flow parameter measurement system, the oil-water two-phase flow parameter measurement method can be used, and the process is as follows: Figure 2 as shown below, the steps are as follows:
[0097] Step 1: Recursively encode the electromagnetic time series signal for measuring the oil-water two-phase flow to obtain a recurrence plot transformed from the electromagnetic signal;
[0098] Step 2: Input the recurrence plot into the shared feature extraction unit to obtain a primary feature map;
[0099] Step 3: Input the primary feature map into the first-level feature extraction unit to obtain a first-level flow pattern classification feature map and a first-level water cut prediction enhanced feature map;
[0100] Step 3.1: Input the primary feature map into the first-level flow pattern classification feature extraction module to obtain a first-level flow pattern classification feature map;
[0101] Step 3.2: Input the primary feature map into the first-level water cut prediction feature extraction module to obtain a first-level water cut prediction feature map;
[0102] Step 3.3: Input the first-level flow pattern classification feature map into the first-level hybrid attention module to obtain a first-level attention feature map;
[0103] Step 3.4: Perform an addition operation on the first-level attention feature map and the first-level water cut prediction feature map to obtain a first-level water cut prediction enhanced feature map;
[0104] Step 4: Input the first-level flow pattern classification feature map and the first-level water cut prediction enhanced feature map into the second-level feature extraction unit to obtain a second-level flow pattern classification feature map and a second-level water cut prediction enhanced feature map;
[0105] Step 4.1: Input the first-level flow pattern classification feature map into the second-level flow pattern classification feature extraction module to obtain a second-level flow pattern classification feature map;
[0106] Step 4.2: Input the first-level water cut prediction enhanced feature extraction map into the second-level water cut prediction feature extraction module to obtain a second-level water cut prediction feature map;
[0107] Step 4.3: Input the second-level flow pattern classification feature map into the second-level hybrid attention module to obtain a second-level attention feature map;
[0108] Step 4.4: Perform an addition operation on the second-level attention feature map and the second-level water cut prediction feature map to obtain a second-level water cut prediction enhanced feature map;
[0109] Step 5: Input the second-level flow pattern classification feature map and the second-level water cut prediction enhanced feature map into the global average pooling layer to obtain a primary flow pattern classification feature vector and a primary water cut prediction feature vector;
[0110] Step 6: Input the primary flow pattern classification feature vector and the primary water cut prediction feature vector into the first-level expert gating unit to obtain the first-level flow pattern classification feature vector, the first-level fusion feature vector, and the first-level water cut prediction feature vector;
[0111] Step 6.1: Input the primary flow pattern classification feature vector into the first-level flow pattern classification expert module to obtain the first-level multi-expert flow pattern classification feature vector;
[0112] Step 6.2: Input the primary flow pattern classification feature vector into the first-level flow pattern classification gating module to obtain the first-level flow pattern classification expert weight;
[0113] Step 6.3: Perform a multiplication operation on the first-level flow pattern classification expert weight and the first-level multi-expert flow pattern classification feature vector to obtain the first-level flow pattern classification feature vector;
[0114] Step 6.4: Input the primary water cut prediction feature vector into the first-level fusion expert module to obtain the first-level multi-expert fusion feature vector;
[0115] Step 6.5: Input the primary water cut prediction feature vector into the first-level fusion gating module to obtain the first-level fusion expert weight;
[0116] Step 6.6: Perform an addition operation on the first-level multi-expert fusion feature vector and the first-level multi-expert flow pattern classification feature vector, and then perform a multiplication operation with the first-level fusion expert weight to obtain the first-level fusion feature vector;
[0117] Step 6.7: Input the primary water cut prediction feature vector into the first-level water cut prediction expert module to obtain the first-level multi-expert water cut prediction feature vector;
[0118] Step 6.8: Input the primary water cut prediction feature vector into the first-level water cut prediction gating module to obtain the first-level water cut prediction expert weight;
[0119] Step 6.9: Perform a multiplication operation on the first-level water cut prediction expert weight and the first-level multi-expert water cut prediction feature vector to obtain the first-level water cut prediction feature vector;
[0120] Step 7: Input the first-level flow pattern classification feature vector into the flow pattern classification unit to obtain the flow pattern classification result;
[0121] Step 8: Input the first-level fusion feature vector and the first-level water cut prediction feature vector into the second-level expert gating unit to obtain the second-level water cut prediction feature vector;
[0122] Step 8.1: Input the first-level fusion feature vector into the second-level fusion expert module to obtain the second-level multi-expert fusion feature vector;
[0123] Step 8.2: Input the primary moisture content prediction feature vector into the secondary moisture content prediction expert module to obtain the secondary multi-expert moisture content prediction feature vector;
[0124] Step 8.3: Input the primary moisture content prediction feature vector into the secondary fusion gating module to obtain the secondary fusion expert weights;
[0125] Step 8.4: After performing an addition operation on the secondary multi-expert fusion feature vector and the secondary multi-expert moisture content prediction feature vector, perform a multiplication operation with the secondary fusion expert weights to obtain the secondary moisture content prediction feature vector;
[0126] Step 9: Input the secondary moisture content prediction feature vector into the moisture content prediction feature unit to obtain the moisture content prediction result.
[0127] Figure 3 This is a schematic diagram of the present invention for measuring oil-water two-phase flow parameters using electromagnetic signals. After converting one-dimensional electromagnetic signals into two-dimensional images by using recurrence plot coding and inputting them into the oil-water two-phase flow parameter measurement system based on multi-level sharing, the flow pattern classification result and the moisture content prediction result are obtained. Aiming at the problems of single-level feature sharing and insufficient feature interaction between tasks in multi-task learning for oil-water two-phase flow parameter measurement, the present invention proposes an oil-water two-phase flow parameter measurement system and method based on multi-level sharing. The system realizes the deep sharing of the flow pattern classification task and the moisture content prediction task in feature maps at different scales by constructing multi-level feature extraction units, and uses multi-level expert gating units to adaptively fuse the feature vectors of the dual tasks, effectively alleviating the conflict between tasks. This method will significantly improve the accuracy of flow pattern classification and the precision of moisture content prediction, and finally achieve high-precision measurement of multi-parameters of oil-water two-phase flow.
[0128] The embodiments described above are only used to describe the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. An oil-water two-phase flow parameter measurement system based on multi-stage sharing, characterized in that: It includes a multi-level feature extraction unit, a global parallel pooling layer, and a multi-level expert gating unit which are connected in sequence. The multi-level expert gating unit is respectively connected with a flow type classification unit and a water content prediction unit.
2. The oil-water two-phase flow parameter measurement system based on multi-stage sharing according to claim 1 is characterized in that: The secondary structures of each unit are as follows: The multi-level feature extraction unit includes a shared feature extraction unit, a primary feature extraction unit and a secondary feature extraction unit which are interconnected; wherein the shared feature extraction unit includes a shared feature extraction module, the primary feature extraction unit includes a parallel primary flow pattern classification feature extraction module and a primary water content prediction feature extraction module, and the primary flow pattern classification feature extraction module is connected with a primary mixed attention module; the secondary feature extraction unit includes a parallel secondary flow pattern classification feature extraction module and a secondary water content prediction feature extraction module, and the secondary flow pattern classification feature extraction module is connected with a secondary mixed attention module; The multi-level expert gating unit includes a first-level expert gating unit and a second-level expert gating unit connected to each other, the first-level expert gating unit is connected to a flow pattern classification unit, and the second-level expert gating unit is connected to a moisture content prediction unit; wherein the first-level expert gating unit includes a parallel first-level flow pattern classification expert module, a first-level fusion expert module, a first-level moisture content prediction expert module, a first-level flow pattern classification gating module, a first-level fusion gating module, and a first-level moisture content prediction gating module; the second-level expert gating unit includes a parallel second-level fusion expert module, a second-level moisture content prediction expert module, and a second-level fusion gating module; The flow pattern classification unit includes a flow pattern classification module; the water content prediction unit includes a water content prediction module.
3. The oil-water two-phase flow parameter measurement system based on multi-stage sharing according to claim 2 is characterized in that: The specific structure of each module is as follows: The shared feature extraction module includes a convolution layer, a batch normalization layer, a ReLU activation function layer, and a maximum pooling layer from input to output. The first-level flow classification feature extraction module includes, from input to output, a convolution layer, a batch normalization layer, a ReLU activation function layer, a convolution layer, a batch normalization layer, a ReLU activation function layer, an addition operation, a convolution layer, a batch normalization layer, a ReLU activation function layer, a convolution layer, a batch normalization layer, a ReLU activation function layer, and an addition operation; The first-level moisture content prediction feature extraction module includes, from input to output, a convolution layer, a batch normalization layer, a ReLU activation function layer, a convolution layer, a batch normalization layer, a ReLU activation function layer, an addition operation, a convolution layer, a batch normalization layer, a ReLU activation function layer, a convolution layer, a batch normalization layer, a ReLU activation function layer, and an addition operation; The first-level hybrid attention module includes, from input to output, a parallel adaptive average pooling layer, an adaptive maximum pooling layer, an adaptive average pooling layer followed by a convolutional layer, a ReLU activation function layer, a convolutional layer, an adaptive maximum pooling layer followed by a convolutional layer, a ReLU activation function layer, a convolutional layer, an addition operation, a Sigmod activation function layer, a multiplication operation, a parallel average operation along the channel dimension, a maximum value operation along the channel dimension, a concatenation operation, a convolutional layer, a Sigmod activation function layer and a multiplication operation; The secondary flow type classification feature extraction module includes, from input to output, a parallel convolution layer, a convolution layer, followed by a batch normalization layer, a ReLU activation function layer, a convolution layer, a batch normalization layer, a ReLU activation function layer, an addition operation, a convolution layer, a batch normalization layer, a ReLU activation function layer, a convolution layer, a batch normalization layer, a ReLU activation function layer, and an addition operation. The secondary moisture content prediction feature extraction module includes, from input to output, a parallel convolution layer, a convolution layer, followed by a batch normalization layer, a ReLU activation function layer, a convolution layer, a batch normalization layer, a ReLU activation function layer, an addition operation, a convolution layer, a batch normalization layer, a ReLU activation function layer, a convolution layer, a batch normalization layer, a ReLU activation function layer, and an addition operation; The secondary hybrid attention module includes, from input to output, a parallel adaptive average pooling layer, an adaptive maximum pooling layer, the adaptive average pooling layer is followed by a convolution layer, a ReLU activation function layer, a convolution layer, the adaptive maximum pooling layer is followed by a convolution layer, a ReLU activation function layer, a convolution layer, an addition operation, a Sigmod activation function layer, a multiplication operation, a parallel average operation along the channel dimension, a maximum value operation along the channel dimension, a concatenation operation, a convolution layer, a Sigmod activation function layer and a multiplication operation; The first-level flow classification expert module includes N1 parallel expert layers, and the expert layers include a fully connected layer, a ReLU activation function layer, a fully connected layer, and a ReLU activation function layer from input to output. The first-level fusion expert module includes N2 parallel expert layers, and the expert layers include a fully connected layer, a ReLU activation function layer, a fully connected layer, and a ReLU activation function layer from input to output. The first-level moisture content prediction expert module includes N3 parallel expert layers, which include a fully connected layer, a ReLU activation function layer, a fully connected layer, and a ReLU activation function layer from input to output. The first-level flow classification gating module includes a fully connected layer with an output size of N1, a Softmax activation function layer, and a transposition operation from input to output. The first-level fusion gating module includes a fully connected layer with an output size of N1+N2, a Softmax activation function layer, and a transposition operation from input to output. The first-level moisture content prediction gating module includes a fully connected layer with an output size of N3, a Softmax activation function layer, and a transposition operation from input to output. The secondary fusion expert module includes N4 parallel expert layers, and the expert layers include one fully connected layer, one ReLU activation function layer, one fully connected layer, and one ReLU activation function layer in order from input to output. The secondary moisture content prediction expert module includes N5 parallel expert layers, and the expert layers include a fully connected layer, a ReLU activation function layer, a fully connected layer, and a ReLU activation function layer from input to output. The two-level fusion gating module includes a fully connected layer with an output size of N4+N5, a Softmax activation function layer, and a transposition operation from input to output. The flow classification module includes a fully connected layer, a ReLU activation function, and a fully connected layer from input to output. The moisture content prediction module includes a fully connected layer, a ReLU activation function, and a fully connected layer from input to output.
4. A method for measuring oil-water two-phase flow parameters based on multi-stage sharing, applied to the measurement system according to any one of claims 1 to 3, characterized in that: The specific steps are as follows: Step 1: Encode the electromagnetic time series signal for measuring the oil-water two-phase flow by a recursive graph to obtain a recursive graph transformed from the electromagnetic signal; Step 2: Input the recursive graph into the shared feature extraction unit to obtain the primary feature graph; Step 3: Input the primary feature map into the primary feature extraction unit to obtain the primary flow pattern classification feature map and the primary water content prediction enhancement feature map; Step 4: Input the primary flow pattern classification feature map and the primary water content prediction enhancement feature map into the secondary feature extraction unit to obtain the secondary flow pattern classification feature map and the secondary water content prediction enhancement feature map; Step 5: Input the secondary flow pattern classification feature map and the secondary water content prediction enhancement feature map into the global average pooling layer to obtain the primary flow pattern classification feature vector and the primary water content prediction feature vector; Step 6: Input the primary flow pattern classification feature vector and the primary water content prediction feature vector into the first-level expert gating unit to obtain the first-level flow pattern classification feature vector, the first-level fusion feature vector, and the first-level water content prediction feature vector; Step 7: Input the first-level flow type classification feature vector into the flow type classification unit to obtain the flow type classification result; Step 8: Input the first-level fusion feature vector and the first-level water content prediction feature vector into the second-level expert gating unit to obtain the second-level water content prediction feature vector; Step 9: Input the secondary moisture content prediction feature vector into the moisture content prediction feature unit to obtain the moisture content prediction result.
5. The method for measuring oil-water two-phase flow parameters based on multi-stage sharing according to claim 4 is characterized in that: Step 3 The specific steps are as follows: Step 3.1: Input the primary feature map into the primary flow type classification feature extraction module to obtain the primary flow type classification feature map; Step 3.2: Input the primary feature map into the primary moisture content prediction feature extraction module to obtain the primary moisture content prediction feature map; Step 3.3: Input the first-level flow type classification feature map into the first-level hybrid attention module to obtain the first-level attention feature map; Step 3.4: Add the first-level attention feature map and the first-level moisture content prediction feature map to obtain the first-level moisture content prediction enhanced feature map.
6. The method for measuring oil-water two-phase flow parameters based on multi-stage sharing according to claim 4, characterized in that: Step 4 The specific steps are as follows: Step 4.1: Input the primary flow pattern classification feature map into the secondary flow pattern classification feature extraction module to obtain the secondary flow pattern classification feature map; Step 4.2: Input the primary moisture content prediction enhanced feature extraction map into the secondary moisture content prediction feature extraction module to obtain the secondary moisture content prediction feature map; Step 4.3: Input the secondary flow type classification feature map into the secondary hybrid attention module to obtain the secondary attention feature map; Step 4.4: Add the secondary attention feature map and the secondary moisture content prediction feature map to obtain the secondary moisture content prediction enhanced feature map.
7. The method for measuring oil-water two-phase flow parameters based on multi-stage sharing according to claim 4, characterized in that: Step 6 The specific steps are as follows: Step 6.1: Input the primary flow pattern classification feature vector into the primary flow pattern classification expert module to obtain a primary multi-expert flow pattern classification feature vector; Step 6.2: Input the primary flow type classification feature vector into the primary flow type classification gating module to obtain the primary flow type classification expert weight; Step 6.3: Multiply the first-level flow type classification expert weight and the first-level multi-expert flow type classification feature vector to obtain the first-level flow type classification feature vector; Step 6.4: Input the primary moisture content prediction feature vector into the first-level fusion expert module to obtain the first-level multi-expert fusion feature vector; Step 6.5: Input the primary moisture content prediction feature vector into the first-level fusion gating module to obtain the first-level fusion expert weight; Step 6.6: After adding the first-level multi-expert fusion feature vector and the first-level multi-expert flow type classification feature vector, multiply it with the first-level fusion expert weight to obtain the first-level fusion feature vector; Step 6.7: Input the primary moisture content prediction feature vector into the first-level moisture content prediction expert module to obtain the first-level multi-expert moisture content prediction feature vector; Step 6.8: Input the primary moisture content prediction feature vector into the primary moisture content prediction gating module to obtain the primary moisture content prediction expert weight; Step 6.9: Multiply the first-level moisture content prediction expert weight and the first-level multi-expert moisture content prediction feature vector to obtain the first-level moisture content prediction feature vector.
8. The method for measuring oil-water two-phase flow parameters based on multi-stage sharing according to claim 4, characterized in that: Step 8 The specific steps are as follows: Step 8.1: Input the first-level fusion feature vector into the second-level fusion expert module to obtain the second-level multi-expert fusion feature vector; Step 8.2: Input the first-level moisture content prediction feature vector into the second-level moisture content prediction expert module to obtain the second-level multi-expert moisture content prediction feature vector; Step 8.3: Input the first-level moisture content prediction feature vector into the second-level fusion gating module to obtain the second-level fusion expert weight; Step 8.4: After adding the second-level multi-expert fusion feature vector and the second-level multi-expert moisture content prediction feature vector, multiply it with the second-level fusion expert weight to obtain the second-level moisture content prediction feature vector.