Method and device for identifying flow pattern of fluid in water conveying pipeline and storage medium

By obtaining the acceleration and high-frequency pressure of the target pipeline in the water supply pipeline, using the flow type to identify the model fusion distribution probability, accurately analyzing the flow type in the pipeline, solving the problem that high-frequency pressure in the existing technology cannot analyze the flow type state in the pipeline, ensuring that Pipeline safety.

CN119267799APending Publication Date: 2025-01-07DALIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411418349.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

In the prior art, the flow state in the water supply pipeline cannot be accurately analyzed by relying on high-frequency pressure, resulting in the inability to accurately analyze the safety conditions in the pipeline.

Method used

By obtaining the target pipeline acceleration and high-frequency pressure in the water supply pipeline, the flow recognition model, including a convolutional neural network and a metaclassifier, is used to fuse the distribution probability of multiple fluid types to determine the flow recognition results in the pipeline.

Benefits of technology

A comprehensive analysis based on the target pipeline acceleration and high-frequency pressure is realized to accurately obtain the flow state in the pipeline, ensuring accurate analysis of safety conditions in the pipeline, and solving the problem that high-frequency pressure cannot obtain the flow state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119267799A_ABST
    Figure CN119267799A_ABST
Patent Text Reader

Abstract

The invention discloses a flow pattern recognition method and device for fluid in a water conveying pipeline and a storage medium. The method comprises the steps that the target pipeline acceleration of fluid in the water conveying pipeline and the target fluid high-frequency pressure in the water conveying pipeline are obtained; based on the target pipeline acceleration, first distribution probabilities of the multiple fluid types in the water conveying pipeline are obtained; based on the target fluid high-frequency pressure, second distribution probabilities of the multiple fluid types in the water conveying pipeline are obtained; fusing the first distribution probabilities corresponding to the plurality of fluid types and the corresponding second distribution probabilities to obtain third distribution probabilities corresponding to the plurality of fluid types; and determining a flow pattern identification result of the fluid in the water conveying pipeline based on the third distribution probability of the multiple fluid types in the water conveying pipeline. The technical problem that the safety in the pipeline cannot be accurately analyzed due to the fact that the flow pattern state in the pipeline cannot be obtained through high-frequency pressure in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of pipeline monitoring, and in particular to a flow pattern identification method, device and storage medium for a fluid in a water pipeline. Background Art

[0002] Long-distance water transfer projects from water-rich areas to water-deficient areas can be used to alleviate water supply pressure in water-deficient areas. However, in long-distance water pipelines, the phenomenon of gas-water two-phase flow caused by gas stagnation is more common. However, the existence of gas-water two-phase flow makes the high-frequency pressure and hydraulic conditions of the fluid complex and changeable, which will reduce the water transfer capacity, increase the loss of water transmission, and cause pipeline vibration and even lead to pipe burst accidents.

[0003] In the related technology, the monitoring method of the two-phase flow state of gas and water in the pipeline is mainly adopted by pressure sensor monitoring. The flow type in the pipeline is judged based on the high-frequency pressure fluctuation in the pipeline. However, the high-frequency pressure signal is easily affected by hydraulic transient fluctuations such as pipeline leakage, valve or water pump opening and closing, and it is impossible to accurately analyze the safety situation in the pipeline by only detecting high-frequency pressure.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a method, device and storage medium for identifying the flow pattern of fluid in a water pipeline, so as to at least solve the technical problem that the safety in the pipeline cannot be accurately analyzed due to the inability to obtain the flow pattern state in the pipeline by relying on high-frequency pressure in the related technology.

[0006] According to one aspect of an embodiment of the present invention, a method for identifying a flow pattern of a fluid in a water pipeline is provided, comprising: obtaining a target pipeline acceleration of the fluid in the water pipeline, and a high-frequency pressure of the target fluid in the water pipeline, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate a pressure signal corresponding to when the sampling frequency of the pressure change in the water pipeline is higher than a preset acquisition frequency; based on the target pipeline acceleration, obtaining first distribution probabilities of a plurality of fluid types in the water pipeline, wherein the fluid type is used to indicate the type of gas-water mixture formed after the gas flowing in the pipeline enters the liquid; based on the high-frequency pressure of the target fluid, obtaining second distribution probabilities of the plurality of fluid types in the water pipeline; fusing the first distribution probabilities of the plurality of fluid types in the water pipeline with the corresponding second distribution probabilities to obtain third distribution probabilities of the plurality of fluid types in the water pipeline; and determining a flow pattern identification result of the fluid in the water pipeline based on the third distribution probabilities of the plurality of fluid types in the water pipeline.

[0007] Optionally, the method of obtaining a target pipeline acceleration of the fluid in the water pipeline and a target high-frequency pressure of the fluid in the water pipeline includes: obtaining an initial pipeline acceleration of the fluid in the time domain and an initial high-frequency pressure of the fluid in the water pipeline in the time domain; preprocessing the initial pipeline acceleration and the initial fluid high-frequency pressure, respectively, to obtain first preprocessed data corresponding to the initial pipeline acceleration and second preprocessed data corresponding to the initial fluid high-frequency pressure, wherein the preprocessing includes signal amplification processing and / or signal filtering processing; performing fast Fourier transform on the first preprocessed data and the second preprocessed data to obtain the target pipeline acceleration of the fluid in the frequency domain and the target high-frequency pressure of the fluid in the water pipeline in the frequency domain.

[0008] Optionally, obtaining first distribution probabilities of the multiple fluid types in the water pipeline based on the target pipeline acceleration includes: based on the target pipeline acceleration, using the first basic classifier in the flow pattern recognition model to obtain first distribution probabilities of the multiple fluid types in the water pipeline, wherein the flow pattern recognition model includes a first basic classifier, a second basic classifier, and a meta-classifier, and the flow pattern recognition model is obtained through machine learning based on multiple groups of pipeline accelerations and corresponding multiple groups of fluid high-frequency pressures; obtaining second distribution probabilities of the multiple fluid types in the water pipeline based on the target fluid high-frequency pressure includes: based on the target fluid high-frequency pressure, using the second basic classifier to obtain second distribution probabilities of the multiple fluid types in the water pipeline; fusing the first distribution probabilities of the multiple fluid types in the water pipeline with the corresponding second distribution probabilities to obtain third distribution probabilities of the multiple fluid types in the water pipeline includes: based on the first distribution probabilities of the multiple fluid types in the water pipeline and the corresponding second distribution probabilities, using the meta-classifier to obtain third distribution probabilities of the multiple fluid types in the water pipeline.

[0009] Optionally, when the first basic classifier includes a first convolutional neural network, and the first convolutional neural network includes a first convolutional layer, a first activation layer, a first pooling layer and a first fully connected layer, the first basic classifier in the flow type recognition model is used based on the target pipeline acceleration to obtain the first distribution probabilities of the multiple fluid types in the water pipeline, including: inputting the target pipeline acceleration into the first convolutional layer for feature extraction processing to obtain M first flow type features, where M is an integer greater than or equal to 1; inputting the M first flow type features into the first activation layer for nonlinear spatial mapping to obtain M second flow type features; inputting the M second flow type features into the first pooling layer for downsampling processing to obtain N third flow type features, where N is an integer less than or equal to M; inputting the N third flow type features into the first fully connected layer, and classifying the N third flow type features based on the flow type state characteristics of the multiple fluid types to obtain the first classification results corresponding to the multiple fluid types; based on the first classification results corresponding to the multiple fluid types, determining the first distribution probabilities of the multiple fluid types in the water pipeline.

[0010] Optionally, when the second basic classifier includes a second convolutional neural network, and the second convolutional neural network includes a second convolutional layer, a second activation layer, a second pooling layer, and a second fully connected layer, the second basic classifier is used based on the high-frequency pressure of the target fluid to obtain the second distribution probabilities of the multiple fluid types in the water pipeline, including: inputting the high-frequency pressure of the target fluid into the second convolutional layer for feature extraction processing to obtain X fourth flow pattern features, where X is an integer greater than or equal to 1; inputting the X fourth flow pattern features into the second activation layer for nonlinear spatial mapping to obtain X fifth flow pattern features; inputting the X fifth flow pattern features into the second pooling layer for downsampling processing to obtain Y sixth flow pattern features, where Y is an integer less than or equal to X; inputting the Y sixth flow pattern features into the second fully connected layer, classifying the Y sixth flow pattern features based on the flow pattern state characteristics of the multiple fluid types, and obtaining second classification results corresponding to the multiple fluid types; and determining the second distribution probabilities of the multiple fluid types in the water pipeline based on the second classification results corresponding to the multiple fluid types.

[0011] Optionally, in the case where the meta-classifier includes a third fully connected layer, the meta-classifier is used to obtain third distribution probabilities of the multiple fluid types in the water pipeline based on the first distribution probabilities of the multiple fluid types in the water pipeline and the corresponding second distribution probabilities, including: inputting the first distribution probabilities of the multiple fluid types in the water pipeline and the corresponding second distribution probabilities into the third fully connected layer to obtain third distribution probabilities of the multiple fluid types in the water pipeline.

[0012] Optionally, determining the flow type identification result of the fluid in the water pipeline based on the third distribution probabilities of the multiple fluid types in the water pipeline respectively includes: determining the maximum distribution probability among the third distribution probabilities of the multiple fluid types in the water pipeline respectively; and determining the fluid type corresponding to the maximum distribution probability as the flow type identification result.

[0013] According to another aspect of an embodiment of the present invention, a method and device for identifying the flow pattern of a fluid in a water pipeline is provided, comprising: an acquisition module, used to acquire a target pipeline acceleration of the fluid in the water pipeline, and a high-frequency pressure of the target fluid in the water pipeline, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate a pressure signal corresponding to a sampling frequency of a pressure change in the water pipeline that is higher than a preset acquisition frequency; a first distribution probability determination module, used to obtain first distribution probabilities of a plurality of fluid types in the water pipeline based on the target pipeline acceleration, wherein the fluid type is used to indicate the flow in the pipeline. a second distribution probability determination module, for obtaining, based on the high-frequency pressure of the target fluid, the second distribution probability of the multiple fluid types in the water pipeline; a third distribution probability determination module, for fusing the first distribution probability of the multiple fluid types in the water pipeline with the corresponding second distribution probability, to obtain the third distribution probability of the multiple fluid types in the water pipeline; a manifold recognition result determination module, for determining the flow type recognition result of the fluid in the water pipeline based on the third distribution probability of the multiple fluid types in the water pipeline.

[0014] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing any one of the flow pattern identification methods for fluid in a water pipeline.

[0015] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any one of the flow pattern identification methods for a fluid in a water pipeline are implemented.

[0016] In an embodiment of the present invention, a target pipeline acceleration of a fluid in a water pipeline and a high-frequency pressure of a target fluid in the water pipeline are obtained, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate the pressure signal corresponding to the sampling frequency of the pressure change in the water pipeline being higher than the preset acquisition frequency; based on the target pipeline acceleration, first distribution probabilities of multiple fluid types in the water pipeline are obtained, wherein the fluid type is used to indicate the type of gas-water mixture formed after the gas flowing in the pipeline enters the liquid; based on the high-frequency pressure of the target fluid, second distribution probabilities of the multiple fluid types in the water pipeline are obtained; the first distribution probabilities of the multiple fluid types in the water pipeline are merged with the corresponding second distribution probabilities to obtain third distribution probabilities of the multiple fluid types in the water pipeline; based on the third distribution probabilities of the multiple fluid types in the water pipeline, flow pattern recognition results of the fluids in the water pipeline are determined. The purpose of obtaining the flow pattern state in the pipeline based on the comprehensive analysis of the target pipeline acceleration and the high-frequency pressure of the target fluid is achieved, thereby realizing the technical effect of accurately analyzing the safety situation in the pipeline based on the flow pattern state, and further solving the technical problem of being unable to accurately analyze the safety in the pipeline due to the inability to obtain the flow pattern state in the pipeline by relying on high-frequency pressure in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 is a diagram of an experimental pipeline loop device corresponding to the identification of fluid flow patterns in a water pipeline according to an embodiment of the present invention;

[0019] Figure 2 is a flow chart of a method for identifying a flow pattern of a fluid in a water pipeline according to an embodiment of the present invention;

[0020] Figure 3 is a structural diagram of a flow pattern identification model in a flow pattern identification method for a fluid in a water pipeline according to an embodiment of the present invention;

[0021] Figure 4 is a structural diagram of a convolutional neural network in a method for identifying a flow pattern of a fluid in a water pipeline according to an embodiment of the present invention;

[0022] Figure 5 is a hyperparameter distribution diagram of a convolutional neural network in a method for identifying a flow pattern of a fluid in a water pipeline according to an embodiment of the present invention;

[0023] Figure 6 is a schematic diagram of the third fully connected layer structure of multivariate signal fusion in the method for identifying fluid flow patterns in a water pipeline according to an embodiment of the present invention;

[0024] Figure 7 It is an optional fluid type diagram of a water pipeline photographed by a high-speed camera according to an embodiment of the present invention;

[0025] Figure 8 is a flow chart of an optional method for identifying flow patterns of fluid in a water pipeline according to an embodiment of the present invention;

[0026] Fig. 9 It is a schematic diagram of a method and device for identifying flow patterns of fluid in a water pipeline according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] First, to facilitate understanding of the embodiments of the present invention, some terms or nouns involved in the present invention are explained below:

[0030] Two-phase flow refers to the flow phenomenon of two or more fluids in different phases coexisting in the same system. Common two-phase flows include gas-liquid, gas-solid, liquid-solid and other combinations. In two-phase flow, the two phases of fluid interact and influence each other, so its flow characteristics and laws may be very different from those of single-phase flow.

[0031] Convolutional neural network refers to a deep learning model that consists of multiple layers of neural networks, each of which contains at least some convolutional layers and pooling layers. Convolutional layers are used to extract features from input data, while pooling layers are used to reduce the size of feature maps and the amount of computation. By stacking these layers, convolutional neural networks can learn the complex features of input data and can efficiently classify and recognize complex data such as images and videos.

[0032] like Figure 1 As shown, Figure 1 1 is a diagram of an experimental pipeline loop device corresponding to the identification of fluid flow patterns in a water pipeline according to an embodiment of the present invention. The following embodiments of the present invention are analyzed based on an experimental pipeline loop, and the specific experimental pipeline structure is:

[0033] The bottom of the water tank 1 is connected to both ends of the water pipeline. The total length of the water pipeline is determined according to the actual situation. The pipeline material is organic glass, which is convenient for observing whether the fluid type in the water pipeline is the same as the fluid type obtained in the model experiment. The outer diameter and inner diameter of the pipeline are 110mm and 90mm respectively. The pipelines connected to one side of the water tank 1 are all horizontal pipe sections, inclined descending pipe sections, and horizontal pipe sections. The first horizontal pipe section is provided with a pump 2, an ultrasonic flowmeter 3, an electric ball valve 4, a pneumatic butterfly valve 5 and multiple air inlets in sequence. The inclined descending pipe section is the pipe section to be tested. The terminal horizontal pipe section is connected to the high-level water tank 7, which is provided with a manual ball valve 6 for manually controlling the delivery of the fluid in the water pipeline in the experiment; the air inlet is connected to the air compressor 9 through a pipeline, and a gas rotor flowmeter 8 is provided on the water pipeline; the ultrasonic flowmeter 3 and the electric ball valve 4 are connected to the mobile computing terminal 12 through the data acquisition instrument 11.

[0034] The other end of the water delivery pipeline is a horizontal pipe section, an inclined descending pipe section, a horizontal pipe section, an inclined rising pipe section, and a horizontal pipe section in sequence. The inclined descending pipe section is provided with two sensors 10 (accelerometer sensor, high-frequency pressure sensor) of an accelerometer. The inclined descending pipe section is the pipe section to be measured, and the end horizontal pipe section is connected to the high-level water tank 7 to form a circulation loop. The plane where the inclined rising and inclined descending pipe sections and the horizontal pipes between them are located should be perpendicular to the horizontal plane where the remaining pipe sections are located, and the angle between the inclined rising and inclined descending pipe sections and the horizontal plane is 45°. Pump 2 is used to maintain the circulation motion of the fluid in the experimental device. The gas is injected into the pipeline by an air compressor 9, and the gas flow rate is controlled by a pneumatic butterfly valve 5, and the accurate value is obtained by a gas rotor flowmeter 8. The water flow rate is controlled by an electric ball valve 4, and the accurate value is obtained by an ultrasonic flowmeter 3. The acceleration signal and the high-frequency pressure signal are obtained by two sensors 10 located at the accelerometer position 10. Among them, a high-speed camera is placed on the side of the entire experimental device to take pictures of the gas-liquid two-phase flow in the measured pipe section (the downward inclined pipe section where the accelerometer sensor is located).

[0035] According to the embodiments of the present invention and the experimental pipeline structure provided above, a method embodiment of a method for identifying the flow pattern of a fluid in a water pipeline is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] Figure 2 FIG. 1 is a flow chart of a method for identifying a flow pattern of a fluid in a water pipeline according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0037] Step S102, obtaining a target pipeline acceleration of the fluid in the water pipeline and a target fluid high-frequency pressure in the water pipeline, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate a pressure signal corresponding to when the sampling frequency of the pressure change in the water pipeline is higher than a preset acquisition frequency;

[0038] Optionally, a water pipeline is used to transport liquid resources from one end to the other. For example, liquid can be transported from a liquid supply area to a liquid demand area through a water pipeline. However, during the process of transporting the liquid, gas may be stored in the pipeline. Under normal circumstances, the gas is distributed above the liquid, and the gas and liquid do not mix. However, during long-distance transportation of the water pipeline, the water pipeline has turns, and the liquid and gas collide in the water pipeline, causing the gas and liquid to mix, that is, the gas enters the liquid and is distributed in the form of bubbles. When the bubbles are unevenly distributed or there is a reverse flow of gas and liquid, the high-frequency pressure in the water pipeline increases, and there is a risk of bursting. Therefore, it is necessary to obtain the target pipeline acceleration of the fluid (gas and liquid) in the water pipeline and the high-frequency pressure of the target fluid in the water pipeline to analyze the fluid type in the water pipeline.

[0039] Optionally, high-frequency pressure in a water pipeline refers to pressure fluctuations with a frequency higher than a certain range. High-frequency pressure may be caused by fluid movement in the water pipeline, pump pressurization of fluid, or valve operation, which may cause vibration, increased noise, or damage to the pipeline system. Therefore, it is necessary to detect the high-frequency pressure in the pipeline in real time to effectively avoid damage to the water pipeline caused by high-frequency pressure. Among them, high frequency can refer to pressure fluctuations higher than 1000 Hz (HZ), or a pressure acquisition frequency value preset according to actual conditions.

[0040] Optionally, the fluid types include at least bubbly flow, slug flow, reverse airflow and stratified flow, among which bubbly flow is the normal flow type under safe transportation conditions, while when reverse airflow and stratified flow exist in the water pipeline, the probability of pipe bursting in the water pipeline increases significantly. Since both reverse airflow and stratified flow represent serious clamping conditions (dangerous conditions of water pipelines) and the amount of stratified flow scene data is small, the reverse airflow and stratified flow are combined into reverse airflow for analysis, that is, the fluid types in this embodiment include bubbly flow, slug flow and reverse airflow.

[0041] In an optional embodiment, a target pipeline acceleration of a fluid in a water pipeline and a target high-frequency pressure of the fluid in the water pipeline are obtained, including: obtaining an initial pipeline acceleration of the fluid in a time domain and an initial high-frequency pressure of the fluid in the water pipeline in a time domain; preprocessing the initial pipeline acceleration and the initial fluid high-frequency pressure, respectively, to obtain first preprocessed data corresponding to the initial pipeline acceleration and second preprocessed data corresponding to the initial fluid high-frequency pressure, wherein the preprocessing includes signal amplification processing and / or signal filtering processing; performing fast Fourier transform on the first preprocessed data and the second preprocessed data to obtain the target pipeline acceleration of the fluid in a frequency domain and the target high-frequency pressure of the fluid in the water pipeline in the frequency domain.

[0042] Optionally, an accelerometer sensor and a high-frequency pressure sensor are installed in the water pipeline to obtain the initial pipeline acceleration of the fluid and the initial fluid high-frequency pressure of the water pipeline, respectively, wherein the data obtained by the accelerometer sensor and the high-frequency pressure sensor are all data in the time domain, that is, real-time data, data obtained according to time changes. The above-mentioned initial pipeline acceleration and initial fluid high-frequency pressure may contain repeated data or unclear data and other unusable data. The obtained initial pipeline acceleration and initial fluid high-frequency pressure need to be preprocessed. Specifically, the above-mentioned data are subjected to signal amplification or signal filtering processing, and the initial pipeline acceleration and initial fluid high-frequency pressure can be effectively applied.

[0043] Optionally, in the above method, the time domain signal can be converted into a frequency domain signal through fast Fourier transform processing, so that the model training can more easily capture the features in the frequency domain and increase the accuracy of model recognition.

[0044] Optionally, 7 gas flow rates (0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0 m3 / h) can be preset as fluid types, that is, different gas flow rates are introduced into the water pipeline from the air inlet to change the proportion of gas and liquid in the water pipeline. Under the conditions of 7 gas flow rates, the liquid flow rate changes from small to large, and the liquid flow rate reaches each target value (0.7, 0.9, 1.1, 1.3, 1.5, 1.7, 1.8, 1.9 m / s). Each experiment is repeated 3 times to obtain the initial pipeline acceleration and initial fluid high-frequency pressure under the corresponding conditions. Among them, the sampling frequency of the acceleration signal is 1 kilohertz (kHz), the sampling frequency of the high-frequency pressure signal is 1kHz, and the sampling time is 20s each time. Based on the above multiple groups of experimental processes, the time series sample data corresponding to the initial pipeline acceleration and the initial fluid high-frequency pressure under 49 different gas and liquid flow parameters are obtained. The sample augmentation technique was used to expand the initial pipeline acceleration and initial fluid high-frequency pressure sample data corresponding to 49 scenarios. The slicing technique was used to slice the 49 sample data obtained. A single sample data was sliced ​​into 5s of data. The starting point time interval between two consecutive sample data was 1s. Based on the above rules, a sample data containing 20s was sliced ​​into 16 sample data. The experiment was repeated three times for 49 sample data, and finally 147 sample data were obtained. After slicing the 147 sample data, 2352 sample data were generated. The 2352 sample data were amplified and filtered. Finally, the fast Fourier transform method was used to convert the sample data from time domain data to frequency domain data.

[0045] It should be noted that among the time series sample data corresponding to the initial pipeline acceleration and initial fluid high-frequency pressure under 49 different gas and liquid flow parameters, there are 7 sample data with an air flow velocity of 0 m / s. 3 / h, that is, unidirectional flow of liquid only.

[0046] Step S104, based on the target pipeline acceleration, obtaining first distribution probabilities of multiple fluid types in the water pipeline, wherein the fluid type is used to indicate the type of gas-water mixture formed after the gas flowing in the pipeline enters the liquid;

[0047] Optionally, the target fluid acceleration method is used to indicate the acceleration of the flow direction after the gas and liquid merge, wherein the target pipeline acceleration can be an axial acceleration or a radial acceleration, and the first distribution probability can be identified based on the axial acceleration, or based on the radial acceleration, or based on a comprehensive consideration of the axial acceleration and the radial acceleration. Specifically, the axial acceleration is the acceleration of the fluid in the flow direction of the water pipeline, and the radial acceleration is the acceleration of the fluid in the direction of the cross section of the water pipeline.

[0048] Optionally, when identification is performed based on comprehensive consideration of axial acceleration and radial acceleration, the axial distribution probabilities of multiple fluid types in the water pipe can be obtained based on the axial acceleration, and the radial distribution probabilities of multiple fluid types in the water pipe can be obtained based on the radial acceleration. The axial distribution probability and the radial distribution probability are weighted together to obtain the first distribution probabilities of the multiple fluid types in the water pipe.

[0049] In an optional embodiment, based on the target pipeline acceleration, first distribution probabilities of multiple fluid types in the water pipeline are obtained, including: based on the target pipeline acceleration, using the first basic classifier in the flow pattern recognition model to obtain the first distribution probabilities of the multiple fluid types in the water pipeline, wherein the flow pattern recognition model includes the first basic classifier, the second basic classifier, and the meta-classifier, and the flow pattern recognition model is based on multiple groups of pipeline accelerations and corresponding multiple groups of fluid high-frequency pressures, and is obtained through machine learning; based on the target fluid high-frequency pressure, second distribution probabilities of the multiple fluid types in the water pipeline are obtained, including: based on the target fluid high-frequency pressure, using the second basic classifier to obtain the second distribution probabilities of the multiple fluid types in the water pipeline; the first distribution probabilities of the multiple fluid types in the water pipeline are merged with the corresponding second distribution probabilities to obtain third distribution probabilities of the multiple fluid types in the water pipeline, including: based on the first distribution probabilities of the multiple fluid types in the water pipeline and the corresponding second distribution probabilities, using the meta-classifier to obtain the third distribution probabilities of the multiple fluid types in the water pipeline.

[0050] Optionally, a flow pattern recognition model can be constructed through a machine learning method based on the 2352 sample data obtained in the above experiment, wherein the flow pattern recognition model includes a first basic classifier, a second basic classifier, and a meta-classifier. The first basic classifier and the second basic classifier are two parallel and complete neural network structures. The meta-classifier is a single fully connected layer based on the first basic classifier and the second basic classifier. The first basic classifier and the second basic classifier output the first distribution probability and the second distribution probability and transmit them to the meta-classifier. The meta-classifier further analyzes and outputs the third distribution probability, such as Figure 3 As shown, Figure 3 It is a structural diagram of a flow pattern identification model in a flow pattern identification method for a fluid in a water pipeline according to an embodiment of the present invention.

[0051] Optionally, during the construction of the above flow pattern recognition model, a cross entropy loss is set as a loss function to train the flow pattern recognition model to achieve a higher recognition accuracy. The specific loss function is as follows:

[0052]

[0053] Where Q is the number of flow types, that is, 3 (bubble flow, slug flow, reverse flow); y ic is a sign function (0 or 1), if the true category of sample i is equal to c, it takes 1, otherwise it takes 0; p ic is the predicted probability that the observed sample i belongs to category c.

[0054] In an optional embodiment, when the first basic classifier includes a first convolutional neural network, and the first convolutional neural network includes a first convolutional layer, a first activation layer, a first pooling layer, and a first fully connected layer, based on the target pipeline acceleration, the first basic classifier in the flow pattern recognition model is used to obtain first distribution probabilities of multiple fluid types in the water pipeline, including: inputting the target pipeline acceleration into the first convolutional layer for feature extraction processing to obtain M first flow pattern features, where M is an integer greater than or equal to 1; inputting the M first flow pattern features into the first activation layer for nonlinear spatial mapping to obtain M second flow pattern features; inputting the M second flow pattern features into the first pooling layer for downsampling processing to obtain N third flow pattern features, where N is an integer less than or equal to M; inputting the N third flow pattern features into the first fully connected layer, and classifying the N third flow pattern features based on the flow pattern state characteristics of the multiple fluid types to obtain first classification results corresponding to the multiple fluid types; based on the first classification results corresponding to the multiple fluid types, determining the first distribution probabilities of the multiple fluid types in the water pipeline.

[0055] Optionally, the first convolutional neural network is composed of a first convolutional layer, a first activation layer, a first pooling layer, and a first fully connected layer. The convolutional neural network structure (the first convolutional neural network structure and the second convolutional neural network structure are the same) is as follows: Figure 4 As shown, Figure 4 is a diagram of the structure of a convolutional neural network in a method for identifying flow patterns of fluids in a water pipeline according to an embodiment of the present invention. The hyperparameters in the convolutional neural network are set as follows: Figure 5 As shown, Figure 5 This is a distribution diagram of hyperparameters of a convolutional neural network in a method for identifying flow patterns in a water pipeline according to an embodiment of the present invention. In the first convolutional neural network structure, multiple stage layers (each stage layer includes a first convolutional layer, a first activation layer, a first pooling layer, and a first fully connected layer) and corresponding hyperparameters are designed to process the acceleration of the target pipeline and perform feature extraction, thereby effectively improving the accuracy of the first classification result.

[0056] Optionally, in the first stage, the first convolution layer uses 20 convolution kernels of size 20 and sets the step size to 10, so that the network can extract features in a wide range of multiple target pipeline acceleration sample data; the first pooling layer uses a one-dimensional convolutional neural network with a pooling size of 2 for dimensionality reduction, and introduces an overfitting parameter (Dropout) of 0.4 to prevent overfitting. In the second stage, the first convolution layer maintains the same number of convolution kernels and the first pooling layer maintains the same pooling size, so that the features in the target pipeline acceleration can be further refined. In the third stage, the number of convolution kernels in the first convolution layer is increased to 25, but the size is increased to 10, and the step size is shortened to 5, so that more fine-grained features can be focused on, and the first pooling layer still maintains the same pooling size. In the above three stages, the Dropout ratio of each stage is 0.4, which effectively prevents the first convolutional neural network from overfitting at different stage levels and effectively prevents the flow pattern recognition model from overfitting. The first fully connected layer includes 5 neurons and the first activation layer includes 3 neurons. The activation function of the first convolutional layer is ReLU, and the activation function of the first activation layer is Softmax. The first convolutional neural network uses the first convolutional layer and the first pooling layer stacked in three stages to gradually narrow the focal length from the broad basic features in the acceleration of the target pipeline to the finer local features, thereby achieving in-depth analysis of the acceleration of the target pipeline, thereby providing accurate identification of the flow type category in the water pipeline.

[0057] Step S106, based on the high-frequency pressure of the target fluid, obtaining second distribution probabilities of the multiple fluid types in the water pipeline;

[0058] Optionally, based on the high-frequency pressure of the target fluid, the second distribution probability of multiple fluid types in the water pipeline is obtained, wherein the multiple fluid types are bubbly flow, slug flow or reverse flow, and the second distribution probability is the probability corresponding to the three fluid types, that is, the probability that each fluid type may exist, and the output result of the second distribution probability is three probability values. It should be noted that the first distribution probability is the same as the second distribution probability, which is also the probability corresponding to the three fluid types, and the output result is also three probability values.

[0059] In an optional embodiment, when the second basic classifier includes a second convolutional neural network, and the second convolutional neural network includes a second convolutional layer, a second activation layer, a second pooling layer, and a second fully connected layer, based on the high-frequency pressure of the target fluid, the second basic classifier is used to obtain second distribution probabilities of multiple fluid types in the water pipeline, including: inputting the high-frequency pressure of the target fluid into the second convolutional layer for feature extraction processing to obtain X fourth flow pattern features, where X is an integer greater than or equal to 1; inputting the X fourth flow pattern features into the second activation layer for nonlinear spatial mapping to obtain X fifth flow pattern features; inputting the X fifth flow pattern features into the second pooling layer for downsampling processing to obtain Y sixth flow pattern features, where Y is an integer less than or equal to X; inputting the Y sixth flow pattern features into the second fully connected layer, classifying the Y sixth flow pattern features based on the flow pattern state characteristics of the multiple fluid types, and obtaining second classification results corresponding to the multiple fluid types; and determining the second distribution probabilities of the multiple fluid types in the water pipeline based on the second classification results corresponding to the multiple fluid types.

[0060] Optionally, the second convolutional neural network structure is the same as the first neural network structure, both of which include three stages, and the second fully connected layer includes 5 neurons, and the second activation layer includes 3 neurons. The activation function of the second convolutional layer is ReLU, and the activation function of the second activation layer is Softmax.

[0061] Optionally, the high-frequency pressure of the target fluid is input to the second convolution layer of the first stage, and the second convolution layer performs feature extraction to obtain X fourth flow pattern features extracted for the first time, and the obtained X fourth flow pattern features extracted for the first time are input to the second convolution layer of the second stage to obtain X fourth flow pattern features extracted for the second time, and finally the X fourth flow pattern features extracted for the second time are input to the second convolution layer of the third stage to obtain X fourth flow pattern features, wherein the fourth flow pattern feature is the flow pattern state feature of the current fluid obtained according to the high-frequency pressure of the target fluid. After multiple extractions, the fourth flow pattern feature is refined, which effectively improves the accuracy of the subsequent second distribution probability. The X fourth flow pattern features are input into the second activation layer for nonlinear space mapping to obtain X fifth flow pattern features in the nonlinear space, wherein the fifth flow pattern feature is a nonlinear flow pattern state feature obtained after mapping the fourth flow pattern feature, and the X fifth flow pattern features are input into the second pooling layer for downsampling processing, that is, the same features of the X fifth flow pattern features are merged or repeated groups of features are deleted to obtain Y sixth flow pattern features, wherein Y is an integer less than or equal to X. When Y is equal to X, the fifth flow pattern feature is the same as the sixth flow pattern feature, and the sixth flow pattern feature is a filtered and classified flow pattern state feature obtained after downsampling the fifth flow pattern feature.

[0062] Optionally, the Y sixth flow pattern features are input into the second fully connected layer, and the Y sixth flow pattern features are classified based on the flow pattern state features of multiple fluid types, that is, according to the characteristics of the three flow pattern features, the Y flow pattern features are respectively divided into the features corresponding to the three flow pattern features, and second classification results corresponding to the multiple fluid types are obtained; based on the proportion of the number of Y sixth flow pattern features respectively assigned to the three flow pattern features to the total number of Y flow pattern features, the probabilities of the three flow pattern features appearing are respectively determined, wherein the probabilities of the three flow pattern features appearing are the second distribution probabilities.

[0063] Step S108, merging the first distribution probabilities of the multiple fluid types in the water pipeline with the corresponding second distribution probabilities to obtain third distribution probabilities of the multiple fluid types in the water pipeline;

[0064] Optionally, the above-mentioned first distribution probability and second distribution probability are both flow type distribution probabilities obtained by considering single signal data. In order to effectively ensure the accuracy of the prediction, the first distribution probability and the second distribution probability are comprehensively considered to determine the final third distribution probability of multiple fluid types in the water pipeline, thereby effectively achieving the accuracy of the flow type identification model prediction.

[0065] In an optional embodiment, when the meta-classifier includes a third fully connected layer, based on the first distribution probabilities of the multiple fluid types in the water pipeline and the corresponding second distribution probabilities, the meta-classifier is used to obtain third distribution probabilities of the multiple fluid types in the water pipeline, including: inputting the first distribution probabilities of the multiple fluid types in the water pipeline and the corresponding second distribution probabilities into the third fully connected layer to obtain third distribution probabilities of the multiple fluid types in the water pipeline.

[0066] Optionally, a stacked generalization information fusion method may be used to fuse the first distribution probability and the second distribution probability to improve the prediction accuracy of the flow pattern recognition model. Figure 6 As shown, Figure 6 It is a schematic diagram of the third fully connected layer structure of multivariate signal fusion in the method for identifying fluid flow patterns in a water pipeline according to an embodiment of the present invention.

[0067] Optionally, the third fully connected layer receives the outputs (first distribution probability and second distribution probability) of all neurons in the first fully connected layer and the second fully connected layer as input, and inputs the probability distribution information of multiple fluid types into the third fully connected layer, so that the neural network can learn the distribution patterns of different fluid types in the water pipeline, thereby better distinguishing different fluid types. The third fully connected layer can comprehensively consider the first distribution probability and the second distribution probability of different fluid types to obtain a more accurate third distribution probability, thereby improving the accuracy and reliability of the neural network in classifying multiple fluid types, making the classification results more accurate. At the same time, it enhances the neural network's understanding and learning ability of the distribution patterns of fluid types in water pipelines, improves the generalization ability of the neural network, and makes it perform better on unknown data.

[0068] Step S110, determining a flow pattern recognition result of the fluid in the water pipeline based on the third distribution probabilities of the multiple fluid types in the water pipeline.

[0069] Optionally, the third distribution probability is the probability value of the three fluid types that may exist respectively, that is, three probability values. Based on the above three probability values, it is determined that there is one of the three fluid types in the water pipeline, and the final determined fluid type is used as the output result, that is, the flow type identification result.

[0070] In an optional embodiment, based on the third distribution probabilities of the multiple fluid types in the water pipeline, the flow type identification result of the fluid in the water pipeline is determined, including: determining the maximum distribution probability among the third distribution probabilities of the multiple fluid types in the water pipeline; and determining the fluid type corresponding to the maximum distribution probability as the flow type identification result.

[0071] Optionally, the probabilities corresponding to the three fluid types obtained above are traversed and compared to find the maximum distribution probability, and the fluid type corresponding to the maximum distribution probability is determined as the manifold recognition result outputted finally. In addition, a high-speed camera installed on the side of the water pipeline is used to take a picture of the fluid type of the measured pipe section (the downward inclined pipe section where the acceleration sensor is located), and the fluid type obtained by the picture is compared with the flow type recognition result obtained by the flow type recognition model to determine the accuracy of the flow type recognition result. Among them, if Figure 7 As shown, Figure 7 This is a diagram of fluid types captured by a high-speed camera in a water pipeline according to an embodiment of the present invention.

[0072] Through the above steps S102 to S110, the purpose of obtaining the flow pattern state in the pipeline based on the comprehensive analysis of the target pipeline acceleration and the high-frequency pressure of the target fluid is achieved, thereby achieving the technical effect of accurately analyzing the safety situation in the pipeline based on the flow pattern state, and further solving the technical problem of being unable to accurately analyze the safety in the pipeline due to the inability to obtain the flow pattern state in the pipeline by relying on high-frequency pressure in related technologies.

[0073] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation mode: Figure 8 is a flow chart of an optional method for identifying flow patterns of fluids in a water pipeline according to an embodiment of the present invention, such as Figure 8 As shown, the method includes:

[0074] Step S1, signal extraction and preprocessing:

[0075] An accelerometer sensor and a high-frequency pressure sensor are installed on the water pipeline to collect acceleration signals (initial pipeline acceleration) and high-frequency pressure signals (initial fluid high-frequency pressure) in the time domain respectively;

[0076] Preprocessing the collected acceleration signal and high-frequency pressure signal to obtain processed data, wherein the preprocessing at least includes signal amplification and filtering;

[0077] The fast Fourier transform method is used to convert the acceleration signal and the high-frequency pressure signal in the time domain into the target pipeline acceleration and the target fluid high-frequency pressure in the frequency domain.

[0078] Step S2, construct a convolutional neural network flow pattern recognition model:

[0079] A convolutional neural network is used to construct an end-to-end gas-water two-phase flow pattern recognition model, wherein the flow pattern recognition model includes two convolutional neural networks as basic classifiers (a first basic classifier and a second basic classifier);

[0080] The input of the flow pattern recognition model is the processed single variable target pipeline acceleration and the target fluid high frequency pressure as the input of two basic classifiers. When the input is the frequency domain signal, the flow pattern recognition result of the flow pattern recognition is better than that of the time domain signal. The flow pattern includes at least four types: bubbly flow, slug flow, reverse flow and stratified flow.

[0081] Since both adverse airflow and stratified flow represent severe clamping states and the amount of stratified flow scenario data is relatively small, the output is the predicted probability of three flow types (i.e., bubbly flow, slug flow, and adverse airflow), where the output is: the first distribution probability of bubbly flow, slug flow, and adverse airflow corresponding to the target pipeline acceleration, and the second distribution probability of bubbly flow, slug flow, and adverse airflow corresponding to the high-frequency pressure of the target fluid.

[0082] Step S3, stacking generalization information fusion:

[0083] Using stacked generalization technology, a flow pattern recognition model for gas-water two-phase flow based on multi-source information coupling is established, wherein the flow pattern recognition model includes a fully connected layer as a meta-classifier (two basic classifiers and the meta-classifier together constitute the flow pattern recognition model);

[0084] The obtained basic classifier prediction results (i.e., the first distribution probabilities corresponding to bubbly flow, slug flow, and reverse flow, respectively, and the second distribution probabilities corresponding to bubbly flow, slug flow, and reverse flow, respectively) are input into the fully connected layer;

[0085] The fully connected layer outputs the third distribution probabilities corresponding to the predictions of three flow types (i.e., bubbly flow, slug flow, and reverse flow);

[0086] The largest flow type probability in the third distribution probability is selected as the final flow type recognition result.

[0087] This embodiment uses stacked generalization technology to fuse the two signals to further improve the performance of flow pattern recognition. The fused multi-source signal exceeds any single variable signal in terms of flow pattern recognition accuracy. This embodiment uses frequency domain signals for analysis, which significantly improves the prediction performance of the time domain sequence at the input end of the flow pattern recognition model and improves the prediction results of the time domain signal to a certain extent.

[0088] In this embodiment, a method and device for identifying the flow pattern of fluid in a water pipeline is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the terms "module" and "device" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0089] According to an embodiment of the present invention, there is also provided an embodiment of a device for implementing the above-mentioned method for identifying the flow pattern of a fluid in a water pipeline. Fig. 9 FIG. 1 is a schematic diagram of a flow pattern identification method and device for a fluid in a water pipeline according to an embodiment of the present invention. Fig. 9 As shown, the flow pattern identification method and device of the fluid in the water pipeline includes: an acquisition module 300, a first distribution probability determination module 301, a second distribution probability determination module 302, a third distribution probability determination module 303, and a flow pattern identification result determination module 304, wherein:

[0090] The acquisition module 300 is used to acquire the target pipeline acceleration of the fluid in the water pipeline and the target fluid high-frequency pressure in the water pipeline, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate the pressure signal corresponding to the sampling frequency of the pressure change in the water pipeline being higher than the preset acquisition frequency;

[0091] The first distribution probability determination module 301 is connected to the acquisition module 300 and is used to obtain the first distribution probability of multiple fluid types in the water pipeline based on the target pipeline acceleration, wherein the fluid type is used to indicate the type of gas-water mixture formed after the gas flowing in the pipeline enters the liquid;

[0092] The second distribution probability determination module 302 is connected to the first distribution probability determination module 301 and is used to obtain the second distribution probability of multiple fluid types in the water pipeline based on the high-frequency pressure of the target fluid;

[0093] The third distribution probability determination module 303 is connected to the second distribution probability determination module 302, and is used to merge the first distribution probabilities of the multiple fluid types in the water pipeline with the corresponding second distribution probabilities to obtain the third distribution probabilities of the multiple fluid types in the water pipeline;

[0094] The flow pattern recognition result determination module 304 is connected to the third distribution probability determination module 303, and is used to determine the flow pattern recognition result of the fluid in the water pipeline based on the third distribution probabilities of the multiple fluid types in the water pipeline.

[0095] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0096] It should be noted that the acquisition module 300, the first distribution probability determination module 301, the second distribution probability determination module 302, the third distribution probability determination module 303, and the manifold recognition result determination module 304 correspond to steps S102 to S110 in the embodiment, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the modules as part of the device can be run in a computer terminal.

[0097] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.

[0098] The above-mentioned flow type identification method and device for fluid in a water pipeline may also include a processor and a memory. The above-mentioned acquisition module 300, the first distribution probability determination module 301, the second distribution probability determination module 302, the third distribution probability determination module 303, the manifold identification result determination module 304, etc. are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to realize the corresponding functions.

[0099] The processor includes a kernel, which retrieves the corresponding program module from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.

[0100] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute any of the flow pattern identification methods for fluid in a water pipeline.

[0101] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.

[0102] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: obtain the target pipeline acceleration of the fluid in the water pipeline, and the target fluid high-frequency pressure in the water pipeline, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate the pressure signal corresponding to the sampling frequency of the pressure change in the water pipeline is higher than the preset acquisition frequency; based on the target pipeline acceleration, obtain the first distribution probability of multiple fluid types in the water pipeline, wherein the fluid type is used to indicate the type of gas-water mixture formed after the gas flowing in the pipeline enters the liquid; based on the target fluid high-frequency pressure, obtain the second distribution probability of multiple fluid types in the water pipeline; merge the first distribution probability of multiple fluid types in the water pipeline with the corresponding second distribution probability to obtain the third distribution probability of multiple fluid types in the water pipeline; based on the third distribution probability of multiple fluid types in the water pipeline, determine the flow type recognition result of the fluid in the water pipeline.

[0103] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein when the program is run, any of the flow pattern identification methods for fluid in a water pipeline is executed.

[0104] According to an embodiment of the present application, an embodiment of a computer program product is also provided. Optionally, in this embodiment, the computer program product includes a computer program, which, when executed by a processor, implements any of the steps of the flow pattern identification method for fluid in a water pipeline.

[0105] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: obtaining a target pipeline acceleration of the fluid in the water pipeline, and a target fluid high-frequency pressure in the water pipeline, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate the pressure signal corresponding to the sampling frequency of the pressure change in the water pipeline is higher than the preset acquisition frequency; based on the target pipeline acceleration, obtaining a first distribution probability of multiple fluid types in the water pipeline, wherein the fluid type is used to indicate the type of gas-water mixture formed after the gas flowing in the pipeline enters the liquid; based on the target fluid high-frequency pressure, obtaining a second distribution probability of multiple fluid types in the water pipeline; fusing the first distribution probability of multiple fluid types in the water pipeline with the corresponding second distribution probability to obtain a third distribution probability of multiple fluid types in the water pipeline; based on the third distribution probability of multiple fluid types in the water pipeline, determining the flow type recognition result of the fluid in the water pipeline.

[0106] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining a target pipeline acceleration of a fluid in a water pipeline and a high-frequency pressure of a target fluid in the water pipeline, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate a pressure signal corresponding to a sampling frequency of a pressure change in the water pipeline that is higher than a preset acquisition frequency; based on the target pipeline acceleration, obtaining first distribution probabilities of multiple fluid types in the water pipeline, wherein the fluid type is used to indicate the type of gas-water mixture formed after the gas flowing in the pipeline enters the liquid; based on the high-frequency pressure of the target fluid, obtaining second distribution probabilities of multiple fluid types in the water pipeline; fusing the first distribution probabilities of multiple fluid types in the water pipeline with the corresponding second distribution probabilities to obtain third distribution probabilities of multiple fluid types in the water pipeline; and determining flow pattern recognition results of the fluid in the water pipeline based on the third distribution probabilities of multiple fluid types in the water pipeline.

[0107] The above sequence of the embodiments of the present invention is for description only and does not represent the superiority or inferiority of the embodiments.

[0108] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0109] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above modules can be a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.

[0110] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0111] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0112] If the above-mentioned integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0113] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for identifying flow patterns of fluid in a water pipeline, characterized in that: include: Obtaining a target pipeline acceleration of the fluid in the water pipeline and a target fluid high-frequency pressure in the water pipeline, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate a pressure signal corresponding to when the sampling frequency of the pressure change in the water pipeline is higher than a preset acquisition frequency; Based on the target pipeline acceleration, first distribution probabilities of multiple fluid types in the water pipeline are obtained, wherein the fluid type is used to indicate the type of gas-water mixture formed after the gas flowing in the pipeline enters the liquid; Based on the high-frequency pressure of the target fluid, obtaining second distribution probabilities of the multiple fluid types in the water pipeline respectively; Merging first distribution probabilities of the multiple fluid types in the water pipeline with corresponding second distribution probabilities to obtain third distribution probabilities of the multiple fluid types in the water pipeline; Based on the third distribution probabilities of the multiple fluid types in the water pipeline, a flow pattern recognition result of the fluid in the water pipeline is determined.

2. The method according to claim 1, characterized in that The step of obtaining a target pipeline acceleration of the fluid in the water pipeline and a target fluid high-frequency pressure in the water pipeline includes: Acquire the initial pipeline acceleration of the fluid in the time domain and the initial fluid high-frequency pressure of the water pipeline in the time domain; Preprocessing the initial pipeline acceleration and the initial fluid high-frequency pressure respectively to obtain first preprocessing data corresponding to the initial pipeline acceleration and second preprocessing data corresponding to the initial fluid high-frequency pressure, wherein the preprocessing includes signal amplification processing and / or signal filtering processing; Performing a fast Fourier transform on the first preprocessed data and the second preprocessed data, to obtain the target pipeline acceleration of the fluid in the frequency domain and the target fluid high-frequency pressure of the water pipeline in the frequency domain.

3. The method according to claim 1, characterized in that The method of obtaining first distribution probabilities of the multiple fluid types in the water pipeline based on the target pipeline acceleration comprises: obtaining first distribution probabilities of the multiple fluid types in the water pipeline based on the target pipeline acceleration using a first basic classifier in a flow pattern recognition model, wherein the flow pattern recognition model comprises a first basic classifier, a second basic classifier, and a meta-classifier, and the flow pattern recognition model is obtained through machine learning based on multiple groups of pipeline accelerations and corresponding multiple groups of fluid high-frequency pressures; The obtaining, based on the high-frequency pressure of the target fluid, second distribution probabilities of the multiple fluid types in the water pipeline respectively, comprises: obtaining, based on the high-frequency pressure of the target fluid, second distribution probabilities of the multiple fluid types in the water pipeline respectively using the second basic classifier; The first distribution probabilities of the multiple fluid types in the water pipeline are fused with the corresponding second distribution probabilities to obtain the third distribution probabilities of the multiple fluid types in the water pipeline, including: based on the first distribution probabilities of the multiple fluid types in the water pipeline and the corresponding second distribution probabilities, using the meta-classifier to obtain the third distribution probabilities of the multiple fluid types in the water pipeline.

4. The method according to claim 3, characterized in that In the case where the first basic classifier includes a first convolutional neural network, and the first convolutional neural network includes a first convolutional layer, a first activation layer, a first pooling layer, and a first fully connected layer, the first basic classifier in the flow pattern recognition model is used based on the acceleration of the target pipeline to obtain first distribution probabilities of the multiple fluid types in the water pipeline, including: Inputting the target pipeline acceleration into the first convolutional layer for feature extraction processing to obtain M first flow pattern features, where M is an integer greater than or equal to 1; Inputting the M first flow pattern features into the first activation layer for nonlinear spatial mapping to obtain M second flow pattern features; Inputting the M second flow type features into the first pooling layer for downsampling processing to obtain N third flow type features, where N is an integer less than or equal to M; Inputting the N third flow pattern features into the first fully connected layer, classifying the N third flow pattern features based on the flow pattern state features of the multiple fluid types, and obtaining first classification results corresponding to the multiple fluid types respectively; Based on the first classification results respectively corresponding to the multiple fluid types, first distribution probabilities of the multiple fluid types in the water pipeline are determined.

5. The method according to claim 3, characterized in that: In the case where the second basic classifier includes a second convolutional neural network, and the second convolutional neural network includes a second convolutional layer, a second activation layer, a second pooling layer, and a second fully connected layer, the second basic classifier is used based on the high-frequency pressure of the target fluid to obtain second distribution probabilities of the multiple fluid types in the water pipeline, including: Inputting the high-frequency pressure of the target fluid into the second convolution layer for feature extraction processing to obtain X fourth flow pattern features, where X is an integer greater than or equal to 1; Inputting the X fourth flow type features into the second activation layer for nonlinear spatial mapping to obtain X fifth flow type features; Inputting X fifth flow type features into the second pooling layer for downsampling processing to obtain Y sixth flow type features, where Y is an integer less than or equal to X; Inputting the Y sixth flow pattern features into the second fully connected layer, classifying the Y sixth flow pattern features based on the flow pattern state features of the multiple fluid types, and obtaining second classification results corresponding to the multiple fluid types respectively; Based on the second classification results respectively corresponding to the multiple fluid types, second distribution probabilities of the multiple fluid types in the water pipeline are determined.

6. The method according to claim 3, characterized in that In the case where the meta-classifier includes a third fully connected layer, the method of using the meta-classifier to obtain third distribution probabilities of the multiple fluid types in the water pipeline based on the first distribution probabilities of the multiple fluid types in the water pipeline and the corresponding second distribution probabilities includes: The first distribution probabilities of the multiple fluid types in the water pipeline and the corresponding second distribution probabilities are input into the third fully connected layer to obtain the third distribution probabilities of the multiple fluid types in the water pipeline.

7. The method according to any one of claims 1 to 6, characterized in that: The determining of the flow pattern recognition result of the fluid in the water pipeline based on the third distribution probabilities of the multiple fluid types in the water pipeline respectively includes: Determine the maximum distribution probability of the plurality of fluid types in the third distribution probability in the water pipeline; The fluid type corresponding to the maximum distribution probability is determined as the flow type identification result.

8. A method and device for identifying flow patterns of fluid in a water pipeline, characterized in that: include: An acquisition module, used to acquire a target pipeline acceleration of a fluid in a water pipeline, and a target fluid high-frequency pressure in the water pipeline, wherein the fluid is used to indicate the gas and liquid flowing in the pipeline, and the high-frequency pressure is used to indicate a pressure signal corresponding to when the sampling frequency of the pressure change in the water pipeline is higher than a preset acquisition frequency; A first distribution probability determination module is used to obtain first distribution probabilities of multiple fluid types in the water pipeline based on the target pipeline acceleration, wherein the fluid type is used to indicate the type of gas-water mixture formed after the gas flowing in the pipeline enters the liquid; A second distribution probability determination module, configured to obtain second distribution probabilities of the multiple fluid types in the water pipeline based on the high-frequency pressure of the target fluid; A third distribution probability determination module is used to merge the first distribution probabilities of the multiple fluid types in the water pipeline with the corresponding second distribution probabilities to obtain third distribution probabilities of the multiple fluid types in the water pipeline; The flow pattern recognition result determination module is used to determine the flow pattern recognition result of the fluid in the water pipeline based on the third distribution probabilities of the multiple fluid types in the water pipeline.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executed by the method for identifying the flow pattern of a fluid in a water pipeline as claimed in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for identifying the flow pattern of a fluid in a water pipeline according to any one of claims 1 to 7 are implemented.