CN117053124A - Method and device for detecting leakage of oil-gas branch pipeline - Google Patents
Method and device for detecting leakage of oil-gas branch pipeline Download PDFInfo
- Publication number
- CN117053124A CN117053124A CN202311251985.0A CN202311251985A CN117053124A CN 117053124 A CN117053124 A CN 117053124A CN 202311251985 A CN202311251985 A CN 202311251985A CN 117053124 A CN117053124 A CN 117053124A
- Authority
- CN
- China
- Prior art keywords
- pressure
- pipeline
- signal
- pipeline leakage
- acoustic emission
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- F—MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
- F17—STORING OR DISTRIBUTING GASES OR LIQUIDS
- F17D—PIPE-LINE SYSTEMS; PIPE-LINES
- F17D5/00—Protection or supervision of installations
- F17D5/02—Preventing, monitoring, or locating loss
-
- F—MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
- F17—STORING OR DISTRIBUTING GASES OR LIQUIDS
- F17D—PIPE-LINE SYSTEMS; PIPE-LINES
- F17D1/00—Pipe-line systems
- F17D1/005—Pipe-line systems for a two-phase gas-liquid flow
-
- F—MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
- F17—STORING OR DISTRIBUTING GASES OR LIQUIDS
- F17D—PIPE-LINE SYSTEMS; PIPE-LINES
- F17D3/00—Arrangements for supervising or controlling working operations
- F17D3/01—Arrangements for supervising or controlling working operations for controlling, signalling, or supervising the conveyance of a product
-
- F—MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
- F17—STORING OR DISTRIBUTING GASES OR LIQUIDS
- F17D—PIPE-LINE SYSTEMS; PIPE-LINES
- F17D5/00—Protection or supervision of installations
- F17D5/02—Preventing, monitoring, or locating loss
- F17D5/06—Preventing, monitoring, or locating loss using electric or acoustic means
Landscapes
- Engineering & Computer Science (AREA)
- Mechanical Engineering (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Examining Or Testing Airtightness (AREA)
Abstract
本发明公开了一种分支管道泄漏的检测方法及装置,涉及一种检测技术领域,主要目的在于解决现有分支管道泄漏的检测准确性差的问题。包括:采集位于油气管道两端的声发射信号以及压力信号,所述油气管道两端之间包括至少一个分支管道;按照预设时间间隔对所述声发射信号以及所述压力信号进行短时帧时序对齐,得到声压时序信号;基于已完成模型训练的管道泄漏分类模型对所述声压时序信号进行分类检测,得到管道检测结果,所述管道泄漏分类模型中包括基于交叉注意力机制进行特征信息融合的编码层。
The invention discloses a method and device for detecting branch pipeline leakage, which relates to the technical field of detection. The main purpose is to solve the existing problem of poor detection accuracy of branch pipeline leakage. The method includes: collecting acoustic emission signals and pressure signals located at both ends of the oil and gas pipeline, including at least one branch pipe between the two ends of the oil and gas pipeline; performing short-time frame timing on the acoustic emission signals and the pressure signal according to a preset time interval Align to obtain the sound pressure time series signal; classify and detect the sound pressure time series signal based on the pipeline leakage classification model that has completed model training, and obtain the pipeline detection results. The pipeline leakage classification model includes feature information based on the cross attention mechanism. Fusion coding layer.
Description
技术领域Technical field
本发明涉及一种检测技术领域,特别是涉及一种分支管道泄漏的检测方法及装置。The present invention relates to the field of detection technology, and in particular to a method and device for detecting branch pipeline leakage.
背景技术Background technique
管道运输以安全可靠,经济实用的特点在油气运输中被广泛应用。其中,由于管道现场环境复杂,带有分支的管道更常见,所以分支管道泄漏检测一直以来都是研究热点。Pipeline transportation is widely used in oil and gas transportation due to its safety, reliability, economy and practicality. Among them, due to the complex pipeline environment and pipelines with branches are more common, leakage detection of branch pipelines has always been a research hotspot.
目前,现有针对油气分支管道泄漏的检测通常是采集单一信号并结合神经网络以及深度学习等模型算法进行分类预测。但是,由于管道现场复杂多样,单独使用一种信号很难保证提取的泄漏信号的完整性,并且都存在一个共性,只考虑了直管段,没有考虑分支管道出现泄漏的情况,因此,亟需一种分支管道泄漏的检测方法来解决上述问题。At present, the existing detection of leakage in oil and gas branch pipelines usually collects a single signal and combines it with model algorithms such as neural networks and deep learning for classification prediction. However, due to the complexity and diversity of the pipeline site, it is difficult to ensure the integrity of the extracted leakage signal using one signal alone, and there is a commonality in all of them. Only the straight pipe section is considered, and leakage in branch pipelines is not considered. Therefore, there is an urgent need for a A method for detecting leakage in branch pipelines to solve the above problems.
发明内容Contents of the invention
有鉴于此,本发明提供一种分支管道泄漏的检测方法及装置,主要目的在于解决现有分支管道泄漏的检测准确性差的问题。In view of this, the present invention provides a branch pipeline leakage detection method and device, with the main purpose of solving the existing problem of poor detection accuracy of branch pipeline leakage.
依据本发明一个方面,提供了一种分支管道泄漏的检测方法,包括:According to one aspect of the present invention, a branch pipeline leakage detection method is provided, including:
采集位于油气管道两端的声发射信号以及压力信号,所述油气管道两端之间包括至少一个分支管道;Collect acoustic emission signals and pressure signals located at both ends of the oil and gas pipeline, which includes at least one branch pipe between the two ends;
对所述声发射信号以及所述压力信号进行模态分解,得到降噪的所述声发射信号以及压力信号;Perform modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and pressure signal;
基于已完成模型训练的管道泄漏分类模型对所述声发射信号以及所述压力信号进行分类检测,得到管道检测结果,所述管道泄漏分类模型中包括基于交叉注意力机制进行特征信息融合的编码层。Based on the pipeline leakage classification model that has completed model training, the acoustic emission signal and the pressure signal are classified and detected to obtain pipeline detection results. The pipeline leakage classification model includes a coding layer for feature information fusion based on a cross-attention mechanism. .
进一步地,所述采集位于油气管道两端的声发射信号以及压力信号之前,所述方法还包括:Further, before collecting the acoustic emission signals and pressure signals at both ends of the oil and gas pipeline, the method also includes:
获取管道泄漏样本数据集,并基于编码器构建初始管道泄漏分类模型,所述编码器中包括携带有压力类令牌以及声音类令牌的位置编码层、以及交叉融合编码层、融合决策层;Obtain the pipeline leakage sample data set, and build an initial pipeline leakage classification model based on the encoder, which includes a position coding layer carrying pressure tokens and sound tokens, a cross-fusion coding layer, and a fusion decision-making layer;
基于所述管道泄漏样本数据集对所述初始管道泄漏分类模型进行模型训练,得到管道泄漏分类模型。Model training is performed on the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.
进一步地,所述基于所述管道泄漏样本数据集对所述初始管道泄漏分类模型进行模型训练,得到管道泄漏分类模型包括:Further, performing model training on the initial pipeline leakage classification model based on the pipeline leakage sample data set, and obtaining the pipeline leakage classification model includes:
基于所述管道泄漏样本数据集中已降噪后的声音时序信号以及压力时序信号经过所述初始管道泄漏分类模型中的全连接层提取局部特征后添加压力类令牌以及声音类令牌,并对所述局部特征在位置编码层进行位置编码,得到压力包令牌序列以及声音包令牌序列;Based on the denoised sound time series signals and pressure time series signals in the pipeline leakage sample data set, local features are extracted through the fully connected layer in the initial pipeline leakage classification model, and pressure tokens and sound tokens are added, and The local features are position-coded in the position coding layer to obtain a pressure packet token sequence and a sound packet token sequence;
基于所述交叉融合编码层中的声音编码器获取声音时序特征,以及所述交叉融合编码层中的压力编码器获取压力时序特征;Acquire sound timing features based on the voice encoder in the cross-fusion coding layer, and obtain the pressure timing features based on the pressure encoder in the cross-fusion coding layer;
将所述压力包令牌序列与所述声音时序特征进行特征交换,并通过交叉注意力机制进行特征交互融合,得到融合后的声音特征;Perform feature exchange between the pressure pack token sequence and the sound timing features, and perform feature interactive fusion through a cross-attention mechanism to obtain the fused sound features;
将所述声音包令牌序列与所述压力时序特征进行特征交换,并通过交叉注意力机制进行特征交互融合,得到融合后的压力特征;Perform feature exchange between the sound packet token sequence and the pressure timing features, and perform feature interactive fusion through a cross-attention mechanism to obtain the fused pressure features;
在所述融合决策层对于所述压力特征、所述声音特征进行泄漏类别概率的融合转换,并在得到概率类别匹配模型训练需求时,确定完成对所述管道泄漏分类模型的模型训练。In the fusion decision-making layer, the pressure feature and the sound feature are fused and converted into leakage category probabilities, and when the probability category matching model training requirements are obtained, it is determined to complete the model training of the pipeline leakage classification model.
进一步地,所述对所述声发射信号以及所述压力信号进行模态分解,得到降噪的所述声发射信号以及压力信号包括:Further, performing modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and pressure signal includes:
对所述声发射信号以及所述压力信号进行互补集合经验模态分解,得到声分量以及压分量,并基于所述声分量以及所述压分量确定高相关分量;Perform complementary ensemble empirical mode decomposition on the acoustic emission signal and the pressure signal to obtain an acoustic component and a pressure component, and determine a high correlation component based on the acoustic component and the pressure component;
筛选匹配分类类型的声分量以及压分量,并对所述声分量以及所述压分量进行滤波降噪,得到降噪后的所述声分量以及所述压分量;Screen the sound components and pressure components that match the classification type, and perform filtering and noise reduction on the sound components and the pressure components to obtain the noise-reduced sound components and the pressure components;
对所述高相关分量以及降噪后的所述声分量以及所述压分量进行信号重构,得到降噪后的所述声发射信号以及所述压力信号。Signal reconstruction is performed on the high correlation component and the noise-reduced acoustic component and the pressure component to obtain the noise-reduced acoustic emission signal and the pressure signal.
进一步地,所述基于已完成模型训练的管道泄漏分类模型对所述声发射信号以及所述压力信号进行分类检测,得到管道检测结果之后,所述方法还包括:Further, the acoustic emission signal and the pressure signal are classified and detected based on the pipeline leakage classification model that has completed model training. After obtaining the pipeline detection result, the method further includes:
若所述管道检测结果为管道泄漏,则确定所述声发射信号以及所述压力信号的衰减趋势,并按照分支管道分布映射关系确定与所述衰减趋势对应的泄漏定位区间。If the pipeline detection result is a pipeline leak, the attenuation trend of the acoustic emission signal and the pressure signal is determined, and the leakage positioning interval corresponding to the attenuation trend is determined according to the branch pipeline distribution mapping relationship.
依据本发明另一个方面,提供了一种分支管道泄漏的检测装置,包括:According to another aspect of the present invention, a branch pipeline leakage detection device is provided, including:
采集模块,用于采集位于油气管道两端的声发射信号以及压力信号,所述油气管道两端之间包括至少一个分支管道;An acquisition module, used to collect acoustic emission signals and pressure signals located at both ends of the oil and gas pipeline, which includes at least one branch pipe between the two ends;
降噪模块,用于对所述声发射信号以及所述压力信号进行模态分解,得到降噪的所述声发射信号以及压力信号;A noise reduction module, used to perform modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and pressure signal;
检测模块,用于基于已完成模型训练的管道泄漏分类模型对所述声发射信号以及所述压力信号进行分类检测,得到管道检测结果,所述管道泄漏分类模型中包括基于交叉注意力机制进行特征信息融合的编码层。A detection module, configured to classify and detect the acoustic emission signal and the pressure signal based on a pipeline leakage classification model that has completed model training, and obtain pipeline detection results. The pipeline leakage classification model includes features based on a cross-attention mechanism. Coding layer of information fusion.
进一步地,所述装置还包括:Further, the device also includes:
获取模块,用于获取管道泄漏样本数据集,并基于编码器构建初始管道泄漏分类模型,所述编码器中包括携带有压力类令牌以及声音类令牌的位置编码层、以及交叉融合编码层、融合决策层;The acquisition module is used to obtain the pipeline leakage sample data set and build an initial pipeline leakage classification model based on the encoder. The encoder includes a position encoding layer carrying pressure tokens and sound tokens, and a cross-fusion encoding layer. , integrated decision-making layer;
训练模块,用于基于所述管道泄漏样本数据集对所述初始管道泄漏分类模型进行模型训练,得到管道泄漏分类模型。A training module, configured to perform model training on the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.
进一步地,所述训练模块,具体用于基于所述管道泄漏样本数据集中已降噪后的声音时序信号以及压力时序信号经过所述初始管道泄漏分类模型中的全连接层提取局部特征后添加压力类令牌以及声音类令牌,并对所述局部特征在位置编码层进行位置编码,得到压力包令牌序列以及声音包令牌序列;基于所述交叉融合编码层中的声音编码器获取声音时序特征,以及所述交叉融合编码层中的压力编码器获取压力时序特征;将所述压力包令牌序列与所述声音时序特征进行特征交换,并通过交叉注意力机制进行特征交互融合,得到融合后的声音特征;将所述声音包令牌序列与所述压力时序特征进行特征交换,并通过交叉注意力机制进行特征交互融合,得到融合后的压力特征;在所述融合决策层对于所述压力特征、所述声音特征进行泄漏类别概率的融合转换,并在得到概率类别匹配模型训练需求时,确定完成对所述管道泄漏分类模型的模型训练。Further, the training module is specifically used to extract local features based on the denoised sound time series signals and pressure time series signals in the pipeline leakage sample data set through the fully connected layer in the initial pipeline leakage classification model and then add pressure. class tokens and sound class tokens, and perform position coding on the local features in the position coding layer to obtain the pressure packet token sequence and the sound packet token sequence; obtain the sound based on the voice encoder in the cross-fusion coding layer Temporal features, and the pressure encoder in the cross-fusion coding layer obtains pressure timing features; perform feature exchange between the pressure packet token sequence and the sound timing features, and perform feature interactive fusion through the cross-attention mechanism to obtain The fused sound features; feature exchange of the sound packet token sequence and the pressure timing features, and interactive fusion of features through a cross-attention mechanism to obtain the fused pressure features; in the fusion decision-making layer for all The pressure characteristics and the sound characteristics are fused and converted into leakage category probabilities, and when the probability category matching model training requirements are obtained, it is determined to complete the model training of the pipeline leakage classification model.
进一步地,所述降噪模块,具体用于对所述声发射信号以及所述压力信号进行互补集合经验模态分解,得到声分量以及压分量,并基于所述声分量以及所述压分量确定高相关分量;筛选匹配分类类型的声分量以及压分量,并对所述声分量以及所述压分量进行滤波降噪,得到降噪后的所述声分量以及所述压分量;对所述高相关分量以及降噪后的所述声分量以及所述压分量进行信号重构,得到降噪后的所述声发射信号以及所述压力信号。Further, the noise reduction module is specifically configured to perform complementary set empirical mode decomposition on the acoustic emission signal and the pressure signal to obtain the acoustic component and the pressure component, and determine based on the acoustic component and the pressure component. Highly correlated components; filter the sound components and pressure components that match the classification type, and perform filtering and noise reduction on the sound components and the pressure components to obtain the noise-reduced sound components and the pressure components; filter the high-correlation components The correlation component and the noise-reduced acoustic component and the pressure component are subjected to signal reconstruction to obtain the noise-reduced acoustic emission signal and the pressure signal.
进一步地,所述装置还包括:Further, the device also includes:
确定模块,用于若所述管道检测结果为管道泄漏,则确定所述声发射信号以及所述压力信号的衰减趋势,并按照分支管道分布映射关系确定与所述衰减趋势对应的泄漏定位区间。A determination module, configured to determine the attenuation trend of the acoustic emission signal and the pressure signal if the pipeline detection result is a pipeline leakage, and determine the leakage positioning interval corresponding to the attenuation trend according to the branch pipeline distribution mapping relationship.
根据本发明的又一方面,提供了一种存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如上述分支管道泄漏的检测方法对应的操作。According to another aspect of the present invention, a storage medium is provided, and at least one executable instruction is stored in the storage medium. The executable instruction causes the processor to perform operations corresponding to the above-mentioned method for detecting branch pipe leakage.
根据本发明的再一方面,提供了一种终端,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;According to yet another aspect of the present invention, a terminal is provided, including: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete communication with each other through the communication bus. ;
所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行上述分支管道泄漏的检测方法对应的操作。The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the above-mentioned method for detecting branch pipeline leakage.
借由上述技术方案,本发明实施例提供的技术方案至少具有下列优点:Through the above technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages:
本发明提供了一种分支管道泄漏的检测方法及装置,与现有技术相比,本发明实施例通过采集位于油气管道两端的声发射信号以及压力信号,所述油气管道两端之间包括至少一个分支管道;按照预设时间间隔对所述声发射信号以及所述压力信号进行短时帧时序对齐,得到声压时序信号;基于已完成模型训练的管道泄漏分类模型对所述声压时序信号进行分类检测,得到管道检测结果,所述管道泄漏分类模型中包括基于交叉注意力机制进行特征信息融合的编码层,大大提高了分支管道泄漏的检查准确性,实现对分支管道泄漏的有效检测。The present invention provides a method and device for detecting branch pipeline leakage. Compared with the existing technology, the embodiment of the present invention collects acoustic emission signals and pressure signals located at both ends of an oil and gas pipeline. The two ends of the oil and gas pipeline include at least A branch pipeline; perform short-time frame timing alignment of the acoustic emission signal and the pressure signal according to a preset time interval to obtain a sound pressure timing signal; based on the pipeline leakage classification model that has completed model training, the sound pressure timing signal is Classification detection is performed to obtain pipeline detection results. The pipeline leakage classification model includes a coding layer for feature information fusion based on a cross-attention mechanism, which greatly improves the accuracy of branch pipeline leakage inspection and achieves effective detection of branch pipeline leakage.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to have a clearer understanding of the technical means of the present invention, it can be implemented according to the content of the description, and in order to make the above and other objects, features and advantages of the present invention more obvious and understandable. , the specific embodiments of the present invention are listed below.
附图说明Description of the drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be construed as limiting the invention. Also throughout the drawings, the same reference characters are used to designate the same components. In the attached picture:
图1示出了本发明实施例提供的一种分支管道泄漏的检测方法流程图;Figure 1 shows a flow chart of a branch pipeline leakage detection method provided by an embodiment of the present invention;
图2示出了本发明实施例提供的一种分支管道结构示意图;Figure 2 shows a schematic structural diagram of a branch pipeline provided by an embodiment of the present invention;
图3示出了本发明实施例提供的一种声-压信号融合Transformer整体模型示意图;Figure 3 shows a schematic diagram of the overall model of a sound-pressure signal fusion Transformer provided by an embodiment of the present invention;
图4示出了本发明实施例提供的一种Transformer编码器结构示意图;Figure 4 shows a schematic structural diagram of a Transformer encoder provided by an embodiment of the present invention;
图5示出了本发明实施例提供的一种自注意力机制示意图;Figure 5 shows a schematic diagram of a self-attention mechanism provided by an embodiment of the present invention;
图6示出了本发明实施例提供的一种CEEMD–LMS降噪流程图;Figure 6 shows a CEEMD-LMS noise reduction flow chart provided by an embodiment of the present invention;
图7示出了本发明实施例提供的一种分支管道平铺图;Figure 7 shows a branch pipeline tiling diagram provided by an embodiment of the present invention;
图8示出了本发明实施例提供的一种分支管道泄漏的检测装置组成框图;Figure 8 shows a block diagram of a device for detecting branch pipeline leakage provided by an embodiment of the present invention;
图9示出了本发明实施例提供的一种终端的结构示意图。Figure 9 shows a schematic structural diagram of a terminal provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a thorough understanding of the disclosure, and to fully convey the scope of the disclosure to those skilled in the art.
本发明实施例提供了一种分支管道泄漏的检测方法,如图1所示,该方法包括:An embodiment of the present invention provides a method for detecting branch pipeline leakage, as shown in Figure 1. The method includes:
101、采集位于油气管道两端的声发射信号以及压力信号。101. Collect acoustic emission signals and pressure signals at both ends of the oil and gas pipeline.
本发明实施例中,当前执行端为执行管道泄漏检测的云端服务端或终端服务器,具体的,油气管道两端之间包括至少一个分支管道,如图2所示,当分支管道发生泄漏时,由于管道发生形变,会产生声发射信号,同时,泄漏点处在压力的作用下气体通过孔径向外排放,会产生负压波。因此,当前执行端在管道首端和末端分别安装两个声发射传感器和两个压力传感器,用于检测管道泄漏产生的声发射信号和负压波信号。In the embodiment of the present invention, the current execution end is a cloud server or a terminal server that performs pipeline leakage detection. Specifically, the oil and gas pipeline includes at least one branch pipeline between two ends. As shown in Figure 2, when a leak occurs in the branch pipeline, Due to the deformation of the pipeline, an acoustic emission signal will be generated. At the same time, the gas at the leakage point will be discharged outward through the aperture under the action of pressure, resulting in a negative pressure wave. Therefore, the current execution end is equipped with two acoustic emission sensors and two pressure sensors at the beginning and end of the pipeline to detect the acoustic emission signal and negative pressure wave signal generated by pipeline leakage.
102、对所述声发射信号以及所述压力信号进行模态分解,得到降噪的所述声发射信号以及所述压力信号。102. Perform modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and the pressure signal.
本发明实施例中,为了避免声发射信号以及压力信号中存在较多的失真信号以及无用信号,当前执行端通过模态分解的方法对信号进行降噪。其中,可以采用CEEMD模态分解方法,即CEEMD是从EEMD分解进一步优化而来的分解方法,主要优化EEMD分解的残余噪声,主要原理是将一对互为相反数的正负白噪声作为辅助噪声加入源信号当中,以消除原来EEMD方法分解后重构信号当中残留的多余辅助白噪声,同时减少分解时所需的迭代次数,降低计算成本。In the embodiment of the present invention, in order to avoid the presence of more distorted signals and useless signals in the acoustic emission signal and pressure signal, the current execution end uses a modal decomposition method to reduce noise on the signal. Among them, the CEEMD mode decomposition method can be used, that is, CEEMD is a decomposition method further optimized from the EEMD decomposition. It mainly optimizes the residual noise of the EEMD decomposition. The main principle is to use a pair of positive and negative white noises that are opposite to each other as auxiliary noise. It is added to the source signal to eliminate the excess auxiliary white noise remaining in the reconstructed signal after decomposition by the original EEMD method, while reducing the number of iterations required during decomposition and reducing the computational cost.
103、基于已完成模型训练的管道泄漏分类模型对所述声发射信号以及所述压力信号进行分类检测,得到管道检测结果。103. Classify and detect the acoustic emission signal and the pressure signal based on the pipeline leakage classification model that has completed model training, and obtain pipeline detection results.
本发明实施例中,得到声发射信号以及压力信号后,基于已完成模型训练的管道泄漏分类模型对声音时序信号以及压力时序信号进行分类,得到管道检测而结果。其中,管道泄漏分类模型中包括基于交叉注意力机制进行特征信息融合的编码层,此时,作为编码器的编码层中携带有压力类令牌以及声音类令牌的位置编码层、以及交叉融合编码层、融合决策层,从而对压力信号以及声发射信号进行分类检测,得到管道检测结果,如泄漏、不泄漏。In the embodiment of the present invention, after obtaining the acoustic emission signal and the pressure signal, the sound timing signal and the pressure timing signal are classified based on the pipeline leakage classification model that has completed model training, and the pipeline detection results are obtained. Among them, the pipeline leakage classification model includes a coding layer for feature information fusion based on the cross-attention mechanism. At this time, the coding layer as the encoder carries a position coding layer for pressure tokens and sound tokens, and cross fusion The coding layer and fusion decision-making layer can classify and detect pressure signals and acoustic emission signals to obtain pipeline detection results, such as leakage or no leakage.
在另一个本发明实施例中,为了进一步限定及说明,步骤采集位于油气管道两端的声发射信号以及压力信号之前,所述方法还包括:In another embodiment of the present invention, for further definition and explanation, before the step of collecting acoustic emission signals and pressure signals at both ends of the oil and gas pipeline, the method further includes:
获取管道泄漏样本数据集,并基于编码器构建初始管道泄漏分类模型;Obtain a pipeline leakage sample data set and build an initial pipeline leakage classification model based on the encoder;
基于所述管道泄漏样本数据集对所述初始管道泄漏分类模型进行模型训练,得到管道泄漏分类模型。Model training is performed on the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.
为了实现基于管道泄漏分类模型进行分类检测,当前执行端首先获取管道泄漏样本数据集,并基于编码器构建初始管道泄漏分类模型。其中,所述编码器中包括携带有压力类令牌以及声音类令牌的位置编码层、以及交叉融合编码层、融合决策层,如图3所示,即通过输入为同一时期采集的经过CEEMD-LMS降噪好声发射信号与压力信号,输出为不同泄漏类型,能够实现管道声-压信号融合的泄漏检测。其中,管道泄漏样本数据集带有标记不同泄漏结果且降噪后的声发射信号样本与压力信号样本,本发明实施例不做具体限定。In order to implement classification detection based on the pipeline leakage classification model, the current execution end first obtains the pipeline leakage sample data set and builds an initial pipeline leakage classification model based on the encoder. Among them, the encoder includes a position coding layer carrying pressure tokens and sound tokens, as well as a cross-fusion coding layer and a fusion decision-making layer, as shown in Figure 3, that is, the input is the CEEMD collected in the same period. -LMS reduces noise and improves acoustic emission signals and pressure signals, and outputs different leak types, enabling leakage detection of pipeline acoustic-pressure signal fusion. Among them, the pipeline leakage sample data set contains noise-reduced acoustic emission signal samples and pressure signal samples marked with different leakage results, which are not specifically limited in the embodiment of the present invention.
需要说明的是,构建的初始管道泄漏分类模型为Transformer编码器,如图4所示,主要分为3个部分:(1)位置编码。由于自注意力机制并未考虑时间序列中元素的位置关系,需对输入序列X进行位置编码以加入位置信息,即PE(X)=X+Z;式中:Z代表模型训练过程更新的位置矩阵。(2)残差连接。在Transformer中使用残差连接模块加强信息流动,提高模型性能,并结合层归一化操作优化训练过程,RC=LN[X+SA(X)];其中,RC为残差连接操作,LN为层归一化操作。(3)前馈网络。Transformer中的前馈网络由2个线性变换层与1个非线性激活层组成,NFFN(X)=W2·f(W1+X);式中:NFFN(X)为前馈网络,W1、W2为两个线性层参数,f(W1+X)为非线性激活函数。另外,It should be noted that the initial pipeline leakage classification model constructed is a Transformer encoder, as shown in Figure 4, which is mainly divided into 3 parts: (1) Position encoding. Since the self-attention mechanism does not consider the positional relationship of elements in the time series, the input sequence X needs to be positionally encoded to add positional information, that is, P E (X) = position matrix. (2) Residual connection. The residual connection module is used in Transformer to enhance information flow, improve model performance, and combine with layer normalization operations to optimize the training process, R C = L N [X + S A (X)]; where R C is the residual connection operation, L N is the layer normalization operation. (3) Feedforward network. The feedforward network in Transformer consists of 2 linear transformation layers and 1 nonlinear activation layer, N FFN (X) = W 2 ·f (W 1 +X); where: N FFN (X) is the feedforward network , W 1 and W 2 are two linear layer parameters, and f (W 1 +X) is a nonlinear activation function. in addition,
在另一个本发明实施例中,为了进一步限定及说明,步骤基于所述管道泄漏样本数据集对所述初始管道泄漏分类模型进行模型训练,得到管道泄漏分类模型包括:In another embodiment of the present invention, in order to further define and illustrate, the step of performing model training on the initial pipeline leakage classification model based on the pipeline leakage sample data set, and obtaining the pipeline leakage classification model includes:
基于所述管道泄漏样本数据集中已降噪后的声音时序信号以及压力时序信号经过所述初始管道泄漏分类模型中的全连接层提取局部特征后添加压力类令牌以及声音类令牌,并对所述局部特征在位置编码层进行位置编码,得到压力包令牌序列以及声音包令牌序列;Based on the denoised sound time series signals and pressure time series signals in the pipeline leakage sample data set, local features are extracted through the fully connected layer in the initial pipeline leakage classification model, and pressure tokens and sound tokens are added, and The local features are position-coded in the position coding layer to obtain a pressure packet token sequence and a sound packet token sequence;
基于所述交叉融合编码层中的声音编码器获取声音时序特征,以及所述交叉融合编码层中的压力编码器获取压力时序特征;Acquire sound timing features based on the voice encoder in the cross-fusion coding layer, and obtain the pressure timing features based on the pressure encoder in the cross-fusion coding layer;
将所述压力包令牌序列与所述声音时序特征进行特征交换,并通过交叉注意力机制进行特征交互融合,得到融合后的声音特征;Perform feature exchange between the pressure pack token sequence and the sound timing features, and perform feature interactive fusion through a cross-attention mechanism to obtain the fused sound features;
将所述声音包令牌序列与所述压力时序特征进行特征交换,并通过交叉注意力机制进行特征交互融合,得到融合后的压力特征;Perform feature exchange between the sound packet token sequence and the pressure timing features, and perform feature interactive fusion through a cross-attention mechanism to obtain the fused pressure features;
在所述融合决策层对于所述压力特征、所述声音特征进行泄漏类别概率的融合转换,并在得到概率类别匹配模型训练需求时,确定完成对所述管道泄漏分类模型的模型训练。In the fusion decision-making layer, the pressure feature and the sound feature are fused and converted into leakage category probabilities, and when the probability category matching model training requirements are obtained, it is determined to complete the model training of the pipeline leakage classification model.
为了提高泄漏检测模型的分类检测准确性,当前执行端在训练过程中采样短时令牌的生成方式在位置编码层对信号进行编码。具体的,当前执行端采用短时傅里叶变换对原始时域信号(管道泄漏样本数据集中已降噪后的声音时序信号以及压力时序信号)进行分析,即将时域信号分帧后再进行快速傅里叶变换,同时从时间与短时局部频率这2个维度进行分析。在一个具体的实施场景中,一次采样采集长度为Ls的声音信号长度为Lv的压力信号V∈RLv×1,(S为声信号和V是压力信号,V1是第一帧压力信号的局部特征,S1是第一帧声信号的局部特征,ds是为该全连接层输出维度,n表示分段数)。以压力信号为例进行说明,首先,将V等分成长度为lv的n小段,得到分帧信号/>分帧信号经过一层全连接层以提取每一帧的局部特征/>进而的,在V1首个元素前插入压力类别令牌此时/>压力类别令牌的作用是储存当前序列中的泄漏类别信息并在训练前随机初始化。最终,按PE(X)=X+Z式对V1进行位置编码。将经位置编码后的V1称为压力包令牌序列,其包括1个压力类别令牌/>和n个压力短时令牌/>同理可得,有声音包令牌序列S1,包括1个声音类别令牌/>和n个声音短时令牌/>经过上述方法后,S1和V1的分帧个数相同且一一对应,由此实现了不同采样率的声发射信号和压力信号的时间对齐。In order to improve the classification detection accuracy of the leak detection model, the current execution end samples the short-term token generation method during the training process to encode the signal in the position encoding layer. Specifically, the current execution end uses short-time Fourier transform to analyze the original time domain signal (the noise-reduced sound time series signal and pressure time series signal in the pipeline leakage sample data set), that is, the time domain signal is divided into frames and then quickly Fourier transform is analyzed from two dimensions: time and short-term local frequency. In a specific implementation scenario, a sound signal with a length of L s is collected in one sampling The pressure signal V∈R Lv×1 with length L v , (S is the acoustic signal and V is the pressure signal, V1 is the local feature of the first frame pressure signal, S1 is the local feature of the first frame acoustic signal, ds is The fully connected layer output dimension, n represents the number of segments). Take the pressure signal as an example to illustrate. First, divide V into n small segments of length l v to obtain the framed signal/> The framed signal passes through a fully connected layer to extract the local features of each frame/> Furthermore, insert the pressure category token before the first element of V 1 At this time/> The purpose of the stress class token is to store the leaked class information in the current sequence and randomly initialize it before training. Finally, V 1 is position-coded according to the formula P E (X) = X + Z. The position-encoded V 1 is called a pressure package token sequence, which includes 1 pressure category token/> and n pressure short-term tokens/> In the same way, there is a sound packet token sequence S 1 , including 1 sound category token/> and n sound short-term tokens/> After the above method, the number of frames of S 1 and V 1 is the same and corresponds one to one, thus achieving the time alignment of acoustic emission signals and pressure signals with different sampling rates.
另外,针对交叉融合编码层中的特征融合,当前执行端为实现声发射信号与压力信号在特征层次的融合,通过所设计的声-压交叉融合Transformer模块进行两者特征提取过程的融合。在一个具体的实施场景中,通过串联的M层的声音Transformer编码器S1的声音时序特征S2,通过串联的N层的压力Transformer编码器V1的压力时序特征V2。S2和V2中分别包含新的类别令牌和/>金热的,将声音时序特征与压力时序特征中的类别令牌进行交换,通过各自串联L层的交叉注意力机制进行二者特征层次的交互融合。最终,由2路基本的M层、N层Transformer编码器以及L层串联的交叉注意力模块组成的交叉融合Transformer编码器可串联K次,以获得更深的网络结构。In addition, for the feature fusion in the cross-fusion coding layer, the current execution end is to realize the fusion of the acoustic emission signal and the pressure signal at the feature level, and the fusion of the two feature extraction processes is carried out through the designed acoustic-pressure cross-fusion Transformer module. In a specific implementation scenario, the sound timing feature S 2 of the serially connected M-layer sound Transformer encoder S 1 is passed, and the pressure timing feature V 2 is passed through the serially connected N-layer pressure Transformer encoder V 1 . Each contains new category tokens in S 2 and V 2 and/> Jinre's, exchanges the category tokens in the sound temporal characteristics and the pressure temporal characteristics, and carries out the interactive fusion of the two feature levels through the cross-attention mechanism of the respective series L layers. Finally, the cross-fusion Transformer encoder composed of 2 basic M-layer, N-layer Transformer encoders and L-layer serial cross-attention modules can be connected in series K times to obtain a deeper network structure.
需要说明的是,初始管道泄漏分类模型中添加的类别令牌最初由随机初始化的参数构成,并不包含任何有关泄漏检测的信息。随着声-压数据在网络中流动,由于自注意力机制的特点,在特征提取过程中,通过计算与当前输入的各个短时令牌之间的相关性分数,有关泄漏类型的信息被添加到类别令牌中。因此,在检测阶段,仅使用声-压类别令牌的信息进行融合决策,以减少使用全部包令牌序列进行检测所带来的信息冗余。其中,交叉融合Transformer编码器输出的声音类别令牌与检测类别令牌被输入各自的多层感知机头(MLPHeader)。例如,当交叉融合Transformer编码器仅有1层时,输出为与/>则式中,/>和/>为两个线性变换,ξv和ξs为对应作为是否泄漏结果的输出逻辑值,nc为泄漏类型数。对ξv和ξs进行融合并转换成对应nc个泄漏类别的概率,即/>其中,/>为逐个元素相加。It should be noted that the category tokens added in the initial pipeline leak classification model initially consist of randomly initialized parameters and do not contain any information about leak detection. As the sound-pressure data flows in the network, due to the characteristics of the self-attention mechanism, information about the leakage type is added during the feature extraction process by calculating the correlation score with each short-term token of the current input into the category token. Therefore, in the detection stage, only the information of sound-pressure category tokens is used for fusion decision-making to reduce the information redundancy caused by using all packet token sequences for detection. Among them, the sound category tokens and detection category tokens output by the cross-fusion Transformer encoder are input into their respective multi-layer perception heads (MLPHeader). For example, when the cross-fusion Transformer encoder has only 1 layer, the output is with/> but In the formula,/> and/> are two linear transformations, ξ v and ξ s are the output logical values corresponding to the result of leakage, and n c is the number of leakage types. Fusion ξ v and ξ s and convert them into probabilities corresponding to n c leakage categories, that is/> Among them,/> Add element by element.
需要说明的是,本发明实施例中所采用的注意力机制可以看作一种非局部滤波操作,通过估计所有位置的注意力分数并根据分数收集相应的输入来计算序列中每个位置的响应,如图5所示,对于输入X=[x1,x2,…,xn]∈Rn×d,最终的输出序列为Y=[y1,y2,…,yn]∈Rn×d,其计算过程如下:式中:R为由n×d组成的矩阵,n为序列长度,d为维度数,Q,K,V为三个中间矩阵,并且三个矩阵属于同一个序列Wq,Wk,Wv是三个不同的线性变换矩阵,SA(Q,K,V)为自注意力计算函数;A为自注意力矩阵,其中的各个元素代表X中历两两元素之间的注意力分数。It should be noted that the attention mechanism used in the embodiment of the present invention can be regarded as a non-local filtering operation. The response of each position in the sequence is calculated by estimating the attention scores of all positions and collecting corresponding inputs based on the scores. , as shown in Figure 5, for the input X=[x 1, x 2 ,...,x n ]∈R n×d , the final output sequence is Y=[y 1 , y 2 ,..., y n ]∈R n×d , the calculation process is as follows: In the formula: R is a matrix composed of n×d, n is the sequence length, d is the number of dimensions, Q, K, V are three intermediate matrices, and the three matrices belong to the same sequence W q , W k , W v are three different linear transformation matrices, S A (Q, K, V) is the self-attention calculation function; A is the self-attention matrix, each element of which represents the attention score between two elements in X.
在另一个本发明实施例中,为了进一步限定及说明,步骤对所述声发射信号以及所述压力信号进行模态分解,得到降噪的所述声发射信号以及压力信号包括:In another embodiment of the present invention, for further definition and explanation, the step of performing modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and pressure signal includes:
对所述声发射信号以及所述压力信号进行互补集合经验模态分解,得到声分量以及压分量,并基于所述声分量以及所述压分量确定高相关分量;Perform complementary ensemble empirical mode decomposition on the acoustic emission signal and the pressure signal to obtain an acoustic component and a pressure component, and determine a high correlation component based on the acoustic component and the pressure component;
筛选匹配分类类型的声分量以及压分量,并对所述声分量以及所述压分量进行滤波降噪,得到降噪后的所述声分量以及所述压分量;Screen the sound components and pressure components that match the classification type, and perform filtering and noise reduction on the sound components and the pressure components to obtain the noise-reduced sound components and the pressure components;
对所述高相关分量以及降噪后的所述声分量以及所述压分量进行信号重构,得到降噪后的所述声发射信号以及所述压力信号。Signal reconstruction is performed on the high correlation component and the noise-reduced acoustic component and the pressure component to obtain the noise-reduced acoustic emission signal and the pressure signal.
为了对信号进行降噪,从而提高对管道泄漏检测的准确性,当前执行端首先采用CEEMD分解并结合LMS降噪。具体的,CEEMD分解的具体步骤为:(1)设定原始信号的处理次数;(2)在原始信号中加入一组符号相反的噪声信号,每次迭代加入幅值相同;式中:x(t)表示原始信号,/>和/>表示正负噪声。(3)对/>和/>进行EMD分解,得到2组分解后的IMF分量(IMF+和IMF-),然后分别对2组IMF分量求均值得到对应的均值IMF分量,计算公式如下:/> 式中:δIMF1和δIMF2分别是δIMF+和δIMF-的均值,N代表分解层数。最终的分解结果为4组均值IMF分量的集成平均值,并不断重复步骤(2)(3)最终残余分量为单调函数或常量时停止迭代。具体的,如图6所示,结合CEEMD-LMS降噪步骤为:步骤1:将含噪信号进行CEEMD分解,得到一组IMF分量;步骤2:计算IMF分量的相关系数,确定高相关分量和低相关分量;步骤3:采用SE-Hurst指标对低相关分量进行评价,筛选出2类IMF分量;步骤4:对含噪分量进行LMS滤波降噪,得到降噪后分量;步骤5:对高相关分量和降噪后分量进行重构,得到纯净的信号。In order to de-noise the signal and thereby improve the accuracy of pipeline leak detection, the current execution end first uses CEEMD decomposition combined with LMS de-noising. Specifically, the specific steps of CEEMD decomposition are: (1) Set the number of processing times of the original signal; (2) Add a set of noise signals with opposite signs to the original signal, with the same amplitude for each iteration; In the formula: x(t) represents the original signal,/> and/> Represents positive and negative noise. (3)Yes/> and/> Perform EMD decomposition to obtain two groups of decomposed IMF components (IMF+ and IMF-), and then average the two groups of IMF components to obtain the corresponding mean IMF component. The calculation formula is as follows:/> In the formula: δ IMF1 and δ IMF2 are the average values of δ IMF+ and δ IMF- respectively, and N represents the number of decomposition layers. The final decomposition result is the integrated average of the four groups of mean IMF components, and steps (2) (3) are repeated continuously. The iteration stops when the final residual component is a monotonic function or a constant. Specifically, as shown in Figure 6, the steps for combining CEEMD-LMS noise reduction are: Step 1: Perform CEEMD decomposition of the noisy signal to obtain a set of IMF components; Step 2: Calculate the correlation coefficient of the IMF component and determine the sum of high correlation components. Low correlation components; Step 3: Use the SE-Hurst index to evaluate the low correlation components and screen out 2 types of IMF components; Step 4: Perform LMS filtering and denoising on the noisy components to obtain the denoised components; Step 5: Filter the high-correlation components The relevant components and the denoised components are reconstructed to obtain a pure signal.
在另一个本发明实施例中,为了进一步限定及说明,步骤基于已完成模型训练的管道泄漏分类模型对所述声压时序信号进行分类检测,得到管道检测结果之后,所述方法还包括:In another embodiment of the present invention, in order to further define and illustrate, the step is to classify and detect the sound pressure time series signal based on the pipeline leakage classification model that has completed model training. After obtaining the pipeline detection result, the method further includes:
若所述管道检测结果为管道泄漏,则确定所述声发射信号以及所述压力信号的衰减趋势,并按照分支管道分布映射关系确定与所述衰减趋势对应的泄漏定位区间。If the pipeline detection result is a pipeline leak, the attenuation trend of the acoustic emission signal and the pressure signal is determined, and the leakage positioning interval corresponding to the attenuation trend is determined according to the branch pipeline distribution mapping relationship.
为了提高对分支管道进行检测的准确性,当前执行端确定管道检测结果为管道泄漏,确保检测准确性,确定声发射信号以及压力信号的衰减趋势,此时,衰减趋势即为管道内液体泄漏后,声音与压力所产生的衰减情况,因此,可以按照信号的变化确定声发射信号以及压力信号的衰减趋势。当确定衰减趋势后,按照分支管道分布映射关系来确定与此衰减趋势对应的泄漏定位区间。其中,分支管道分布映射关系为基于针对不同分支管道的泄漏实验所配置的分支管道定位区间与衰减趋势之间的映射关系,因此,可以按照分支管道分布映射关系确定与衰减趋势对应的泄漏定位区间,本发明实施例不做具体限定。In order to improve the accuracy of detecting branch pipelines, the current execution end determines that the pipeline detection result is pipeline leakage to ensure detection accuracy and determine the attenuation trend of the acoustic emission signal and pressure signal. At this time, the attenuation trend is after the liquid leakage in the pipeline. , the attenuation caused by sound and pressure, therefore, the attenuation trend of the acoustic emission signal and the pressure signal can be determined according to the changes in the signal. After the attenuation trend is determined, the leakage location interval corresponding to the attenuation trend is determined according to the branch pipeline distribution mapping relationship. Among them, the branch pipe distribution mapping relationship is the mapping relationship between the branch pipe positioning interval and the attenuation trend configured based on the leakage experiments of different branch pipes. Therefore, the leakage positioning interval corresponding to the attenuation trend can be determined according to the branch pipe distribution mapping relationship. , the embodiments of the present invention are not specifically limited.
在一个具体的实施例中,当前执行端采用声-压数据采集于分支管道检测平台,在管道的首站与末站分别安装声发射传感器和压力传暗器,使用阀门模拟泄漏量大小,通过数据采集器采集发生泄漏时的声发射信号和压力信号并发送到PC端进行数据分析。其中,管道材质为钢管,直管段管径为50mm,分支管径为25mm,管内为气体,通过空气压缩机注入气体,空压机工作压力是0.8MPA。声发射传感器型号为RS-5A,宽度为18.8mm,高度为15mm,底座材质为陶瓷,采样频率在50-800HZ;压力传感器型号为ICP 106B型压力传感器,工作压力量程为8.3psi,不锈钢材质,测量介质为液体和气体。如图7所示,为分支管道平铺图,标注了管道的首站、末站以及管道模拟泄漏的位置,其中分支管道全长2500m。进而基于分支管道分布映射关系确定出泄漏点距离首站的距离是1000m,泄漏点距离首站的距离是1500m。In a specific embodiment, the current execution end uses acoustic-pressure data to collect on the branch pipeline detection platform, installs acoustic emission sensors and pressure transmitters at the first and last stations of the pipeline, uses valves to simulate the size of the leakage, and uses the data The collector collects the acoustic emission signals and pressure signals when leakage occurs and sends them to the PC for data analysis. Among them, the pipe material is steel pipe, the diameter of the straight pipe section is 50mm, and the diameter of the branch pipe is 25mm. There is gas in the pipe. The gas is injected through the air compressor. The working pressure of the air compressor is 0.8MPA. The acoustic emission sensor model is RS-5A, the width is 18.8mm, the height is 15mm, the base material is ceramic, and the sampling frequency is 50-800HZ; the pressure sensor model is ICP 106B pressure sensor, the working pressure range is 8.3psi, and it is made of stainless steel. Measuring media are liquids and gases. As shown in Figure 7, it is a tile diagram of the branch pipeline, marking the first station, the last station of the pipeline and the location of the simulated leakage of the pipeline. The total length of the branch pipeline is 2500m. Then based on the branch pipeline distribution mapping relationship, it is determined that the distance between the leakage point and the first station is 1000m, and the distance between the leakage point and the first station is 1500m.
本发明实施例提供了一种分支管道泄漏的检测方法,与现有技术相比,本发明实施例通过采集位于油气管道两端的声发射信号以及压力信号,所述油气管道两端之间包括至少一个分支管道;按照预设时间间隔对所述声发射信号以及所述压力信号进行短时帧时序对齐,得到声压时序信号;基于已完成模型训练的管道泄漏分类模型对所述声压时序信号进行分类检测,得到管道检测结果,所述管道泄漏分类模型中包括基于交叉注意力机制进行特征信息融合的编码层,大大提高了分支管道泄漏的检查准确性,实现对分支管道泄漏的有效检测。Embodiments of the present invention provide a method for detecting leakage in branch pipelines. Compared with the existing technology, embodiments of the present invention collect acoustic emission signals and pressure signals located at both ends of an oil and gas pipeline. The two ends of the oil and gas pipeline include at least A branch pipeline; perform short-time frame timing alignment of the acoustic emission signal and the pressure signal according to a preset time interval to obtain a sound pressure timing signal; based on the pipeline leakage classification model that has completed model training, the sound pressure timing signal is Classification detection is performed to obtain pipeline detection results. The pipeline leakage classification model includes a coding layer for feature information fusion based on a cross-attention mechanism, which greatly improves the accuracy of branch pipeline leakage inspection and achieves effective detection of branch pipeline leakage.
进一步的,作为对上述图1所示方法的实现,本发明实施例提供了一种分支管道泄漏的检测装置,如图8所示,该装置包括:Further, as an implementation of the method shown in Figure 1 above, an embodiment of the present invention provides a device for detecting branch pipeline leakage. As shown in Figure 8, the device includes:
采集模块21,用于采集位于油气管道两端的声发射信号以及压力信号,所述油气管道两端之间包括至少一个分支管道;The acquisition module 21 is used to collect acoustic emission signals and pressure signals located at both ends of the oil and gas pipeline, which includes at least one branch pipe between the two ends;
降噪模块22,用于对所述声发射信号以及所述压力信号进行模态分解,得到降噪的所述声发射信号以及压力信号;The noise reduction module 22 is used to perform modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and pressure signal;
检测模块23,用于基于已完成模型训练的管道泄漏分类模型对所述声发射信号以及所述压力信号进行分类检测,得到管道检测结果,所述管道泄漏分类模型中包括基于交叉注意力机制进行特征信息融合的编码层。The detection module 23 is used to classify and detect the acoustic emission signal and the pressure signal based on the pipeline leakage classification model that has completed model training to obtain pipeline detection results. The pipeline leakage classification model includes detection based on a cross-attention mechanism. Coding layer for feature information fusion.
进一步地,所述装置还包括:Further, the device also includes:
获取模块,用于获取管道泄漏样本数据集,并基于编码器构建初始管道泄漏分类模型,所述编码器中包括携带有压力类令牌以及声音类令牌的位置编码层、以及交叉融合编码层、融合决策层;The acquisition module is used to obtain the pipeline leakage sample data set and build an initial pipeline leakage classification model based on the encoder. The encoder includes a position encoding layer carrying pressure tokens and sound tokens, and a cross-fusion encoding layer. , integrated decision-making layer;
训练模块,用于基于所述管道泄漏样本数据集对所述初始管道泄漏分类模型进行模型训练,得到管道泄漏分类模型。A training module, configured to perform model training on the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.
进一步地,所述训练模块,具体用于基于所述管道泄漏样本数据集中已降噪后的声音时序信号以及压力时序信号经过所述初始管道泄漏分类模型中的全连接层提取局部特征后添加压力类令牌以及声音类令牌,并对所述局部特征在位置编码层进行位置编码,得到压力包令牌序列以及声音包令牌序列;基于所述交叉融合编码层中的声音编码器获取声音时序特征,以及所述交叉融合编码层中的压力编码器获取压力时序特征;将所述压力包令牌序列与所述声音时序特征进行特征交换,并通过交叉注意力机制进行特征交互融合,得到融合后的声音特征;将所述声音包令牌序列与所述压力时序特征进行特征交换,并通过交叉注意力机制进行特征交互融合,得到融合后的压力特征;在所述融合决策层对于所述压力特征、所述声音特征进行泄漏类别概率的融合转换,并在得到概率类别匹配模型训练需求时,确定完成对所述管道泄漏分类模型的模型训练。Further, the training module is specifically used to extract local features based on the denoised sound time series signals and pressure time series signals in the pipeline leakage sample data set through the fully connected layer in the initial pipeline leakage classification model and then add pressure. class tokens and sound class tokens, and perform position coding on the local features in the position coding layer to obtain the pressure packet token sequence and the sound packet token sequence; obtain the sound based on the voice encoder in the cross-fusion coding layer Temporal features, and the pressure encoder in the cross-fusion coding layer obtains pressure timing features; perform feature exchange between the pressure packet token sequence and the sound timing features, and perform feature interactive fusion through the cross-attention mechanism to obtain The fused sound features; feature exchange of the sound packet token sequence and the pressure timing features, and interactive fusion of features through a cross-attention mechanism to obtain the fused pressure features; in the fusion decision-making layer for all The pressure characteristics and the sound characteristics are fused and converted into leakage category probabilities, and when the probability category matching model training requirements are obtained, it is determined to complete the model training of the pipeline leakage classification model.
进一步地,所述降噪模块,具体用于对所述声发射信号以及所述压力信号进行互补集合经验模态分解,得到声分量以及压分量,并基于所述声分量以及所述压分量确定高相关分量;筛选匹配分类类型的声分量以及压分量,并对所述声分量以及所述压分量进行滤波降噪,得到降噪后的所述声分量以及所述压分量;对所述高相关分量以及降噪后的所述声分量以及所述压分量进行信号重构,得到降噪后的所述声发射信号以及所述压力信号。Further, the noise reduction module is specifically configured to perform complementary set empirical mode decomposition on the acoustic emission signal and the pressure signal to obtain the acoustic component and the pressure component, and determine based on the acoustic component and the pressure component. Highly correlated components; filter the sound components and pressure components that match the classification type, and perform filtering and noise reduction on the sound components and the pressure components to obtain the noise-reduced sound components and the pressure components; filter the high-correlation components The correlation component and the noise-reduced acoustic component and the pressure component are subjected to signal reconstruction to obtain the noise-reduced acoustic emission signal and the pressure signal.
进一步地,所述装置还包括:Further, the device also includes:
确定模块,用于若所述管道检测结果为管道泄漏,则确定所述声发射信号以及所述压力信号的衰减趋势,并按照分支管道分布映射关系确定与所述衰减趋势对应的泄漏定位区间。A determination module, configured to determine the attenuation trend of the acoustic emission signal and the pressure signal if the pipeline detection result is a pipeline leakage, and determine the leakage positioning interval corresponding to the attenuation trend according to the branch pipeline distribution mapping relationship.
本发明实施例提供了一种分支管道泄漏的检测装置,与现有技术相比,本发明实施例通过采集位于油气管道两端的声发射信号以及压力信号,所述油气管道两端之间包括至少一个分支管道;按照预设时间间隔对所述声发射信号以及所述压力信号进行短时帧时序对齐,得到声压时序信号;基于已完成模型训练的管道泄漏分类模型对所述声压时序信号进行分类检测,得到管道检测结果,所述管道泄漏分类模型中包括基于交叉注意力机制进行特征信息融合的编码层,大大提高了分支管道泄漏的检查准确性,实现对分支管道泄漏的有效检测。Embodiments of the present invention provide a device for detecting branch pipeline leakage. Compared with the prior art, embodiments of the present invention collect acoustic emission signals and pressure signals located at both ends of an oil and gas pipeline. The two ends of the oil and gas pipeline include at least A branch pipeline; perform short-time frame timing alignment of the acoustic emission signal and the pressure signal according to a preset time interval to obtain a sound pressure timing signal; based on the pipeline leakage classification model that has completed model training, the sound pressure timing signal is Classification detection is performed to obtain pipeline detection results. The pipeline leakage classification model includes a coding layer for feature information fusion based on a cross-attention mechanism, which greatly improves the accuracy of branch pipeline leakage inspection and achieves effective detection of branch pipeline leakage.
根据本发明一个实施例提供了一种存储介质,所述存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的分支管道泄漏的检测方法。According to an embodiment of the present invention, a storage medium is provided. The storage medium stores at least one executable instruction. The computer executable instruction can execute the branch pipeline leak detection method in any of the above method embodiments.
图9示出了根据本发明一个实施例提供的一种终端的结构示意图,本发明具体实施例并不对终端的具体实现做限定。Figure 9 shows a schematic structural diagram of a terminal provided according to an embodiment of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the terminal.
如图9所示,该终端可以包括:处理器(processor)302、通信接口(CommunicationsInterface)304、存储器(memory)306、以及通信总线308。As shown in Figure 9, the terminal may include: a processor (processor) 302, a communications interface (Communications Interface) 304, a memory (memory) 306, and a communication bus 308.
其中:处理器302、通信接口304、以及存储器306通过通信总线308完成相互间的通信。Among them: the processor 302, the communication interface 304, and the memory 306 complete communication with each other through the communication bus 308.
通信接口304,用于与其它设备比如客户端或其它服务器等的网元通信。The communication interface 304 is used to communicate with network elements of other devices such as clients or other servers.
处理器302,用于执行程序310,具体可以执行上述分支管道泄漏的检测方法实施例中的相关步骤。The processor 302 is configured to execute the program 310. Specifically, it can execute the relevant steps in the embodiment of the method for detecting branch pipeline leakage.
具体地,程序310可以包括程序代码,该程序代码包括计算机操作指令。Specifically, program 310 may include program code including computer operating instructions.
处理器302可能是中央处理器CPU,或者是特定集成电路ASIC(ApplicationSpecific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。终端包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 302 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the terminal may be the same type of processor, such as one or more CPUs; or they may be different types of processors, such as one or more CPUs and one or more ASICs.
存储器306,用于存放程序310。存储器306可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。Memory 306 is used to store program 310. The memory 306 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
程序310具体可以用于使得处理器302执行以下操作:The program 310 may be specifically used to cause the processor 302 to perform the following operations:
采集位于油气管道两端的声发射信号以及压力信号,所述油气管道两端之间包括至少一个分支管道;Collect acoustic emission signals and pressure signals located at both ends of the oil and gas pipeline, which includes at least one branch pipe between the two ends;
按照预设时间间隔对所述声发射信号以及所述压力信号进行短时帧时序对齐,得到声压时序信号;Perform short-time frame timing alignment on the acoustic emission signal and the pressure signal according to a preset time interval to obtain a sound pressure timing signal;
基于已完成模型训练的管道泄漏分类模型对所述声压时序信号进行分类检测,得到管道检测结果,所述管道泄漏分类模型中包括基于交叉注意力机制进行特征信息融合的编码层。Based on the pipeline leakage classification model that has completed model training, the sound pressure time series signals are classified and detected to obtain pipeline detection results. The pipeline leakage classification model includes a coding layer for feature information fusion based on a cross-attention mechanism.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented using general-purpose computing devices. They can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices. , optionally, they may be implemented in program code executable by a computing device, such that they may be stored in a storage device for execution by the computing device, and in some cases, may be in a sequence different from that herein. The steps shown or described are performed either individually as individual integrated circuit modules, or as multiple modules or steps among them as a single integrated circuit module. As such, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311251985.0A CN117053124B (en) | 2023-09-26 | 2023-09-26 | Oil and gas branch pipeline leakage detection method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311251985.0A CN117053124B (en) | 2023-09-26 | 2023-09-26 | Oil and gas branch pipeline leakage detection method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN117053124A true CN117053124A (en) | 2023-11-14 |
| CN117053124B CN117053124B (en) | 2025-08-05 |
Family
ID=88666546
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311251985.0A Active CN117053124B (en) | 2023-09-26 | 2023-09-26 | Oil and gas branch pipeline leakage detection method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117053124B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117647587A (en) * | 2024-01-30 | 2024-03-05 | 浙江大学海南研究院 | Acoustic emission signal classification method, computer equipment and medium |
| CN118998639A (en) * | 2024-07-29 | 2024-11-22 | 中国科学院上海微系统与信息技术研究所 | Gas leakage detection method based on underground pipe network multi-element sensor data |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5974862A (en) * | 1997-05-06 | 1999-11-02 | Flow Metrix, Inc. | Method for detecting leaks in pipelines |
| CN105546352A (en) * | 2015-12-21 | 2016-05-04 | 重庆科技学院 | Natural gas pipeline tiny leakage detection method based on sound signals |
| CN108488638A (en) * | 2018-03-28 | 2018-09-04 | 东北大学 | Line leakage system and method based on sound wave suction wave hybrid monitoring |
| CN112013286A (en) * | 2020-08-26 | 2020-12-01 | 辽宁石油化工大学 | Method and device for locating leak point of pipeline, storage medium and terminal |
| CN112013285A (en) * | 2020-08-26 | 2020-12-01 | 辽宁石油化工大学 | Method and device for detecting pipeline leakage point, storage medium and terminal |
| CN113034469A (en) * | 2021-03-24 | 2021-06-25 | 东北大学 | Method for detecting internal defects of pipeline through thermal imaging based on transformer |
| CN113887610A (en) * | 2021-09-29 | 2022-01-04 | 内蒙古工业大学 | Pollen Image Classification Method Based on Cross-Attention Distillation Transformer |
-
2023
- 2023-09-26 CN CN202311251985.0A patent/CN117053124B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5974862A (en) * | 1997-05-06 | 1999-11-02 | Flow Metrix, Inc. | Method for detecting leaks in pipelines |
| CN105546352A (en) * | 2015-12-21 | 2016-05-04 | 重庆科技学院 | Natural gas pipeline tiny leakage detection method based on sound signals |
| CN108488638A (en) * | 2018-03-28 | 2018-09-04 | 东北大学 | Line leakage system and method based on sound wave suction wave hybrid monitoring |
| CN112013286A (en) * | 2020-08-26 | 2020-12-01 | 辽宁石油化工大学 | Method and device for locating leak point of pipeline, storage medium and terminal |
| CN112013285A (en) * | 2020-08-26 | 2020-12-01 | 辽宁石油化工大学 | Method and device for detecting pipeline leakage point, storage medium and terminal |
| CN113034469A (en) * | 2021-03-24 | 2021-06-25 | 东北大学 | Method for detecting internal defects of pipeline through thermal imaging based on transformer |
| CN113887610A (en) * | 2021-09-29 | 2022-01-04 | 内蒙古工业大学 | Pollen Image Classification Method Based on Cross-Attention Distillation Transformer |
Non-Patent Citations (1)
| Title |
|---|
| 孟强: "基于EEMD和互谱分析的天然气管道泄漏检测与定位", 《石油化工》, vol. 51, no. 10, 31 October 2022 (2022-10-31), pages 2392 - 2398 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117647587A (en) * | 2024-01-30 | 2024-03-05 | 浙江大学海南研究院 | Acoustic emission signal classification method, computer equipment and medium |
| CN117647587B (en) * | 2024-01-30 | 2024-04-09 | 浙江大学海南研究院 | Acoustic emission signal classification method, computer equipment and medium |
| CN118998639A (en) * | 2024-07-29 | 2024-11-22 | 中国科学院上海微系统与信息技术研究所 | Gas leakage detection method based on underground pipe network multi-element sensor data |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117053124B (en) | 2025-08-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN117053124A (en) | Method and device for detecting leakage of oil-gas branch pipeline | |
| Feng et al. | Injurious or noninjurious defect identification from MFL images in pipeline inspection using convolutional neural network | |
| CN108954020B (en) | A kind of pipeline positioning method | |
| Tang et al. | Sparse classification of rotating machinery faults based on compressive sensing strategy | |
| CN112013285B (en) | Method and device for detecting pipeline leakage point, storage medium and terminal | |
| CN114595728B (en) | A signal denoising method based on self-supervised learning | |
| CN111365624A (en) | A kind of intelligent terminal and method for leakage detection of brine pipeline | |
| CN115901954A (en) | Nondestructive detection method for ultrasonic guided wave pipeline defects | |
| CN112116064A (en) | Deep network data processing method for spectrum super-resolution self-adaptive weighted attention machine | |
| CN114399665A (en) | Method, device, equipment and storage medium for identifying defect types of external thermal insulation layer of external wall | |
| CN111624570A (en) | Radar target identification method based on two-dimensional convolutional neural network | |
| CN105760896A (en) | Corrosion source joint de-noising method for multi-source heterogeneous big data | |
| CN117219109A (en) | Double-branch voice enhancement algorithm based on structured state space sequence model | |
| CN117851750A (en) | An intelligent cleaning method for low-quality monitoring big data of intelligent manufacturing production lines | |
| CN118859113A (en) | Convolutional neural network sound source localization method and system based on arrival time difference | |
| CN118506190A (en) | Remote sensing image change detection method based on coding and decoding index edge refinement | |
| CN117334220A (en) | Valve anomaly detection method based on noise estimation and key feature learning | |
| CN117219120A (en) | Mechanical equipment abnormality detection method and system based on time-frequency domain audio enhancement | |
| CN114841924B (en) | An unsupervised change detection method for heterogeneous remote sensing images | |
| CN116825120A (en) | A method and system for denoising gas leakage acoustic signals based on the hourglass model | |
| CN116385392A (en) | Oil and gas pipeline defect detection method based on deep denoising and multi-scale learning | |
| CN115935193A (en) | Device status detection method, computer device and storage medium | |
| Gao et al. | AMTrans: Auto-Correlation Multi-Head Attention Transformer for Infrared Spectral Deconvolution | |
| CN115661768A (en) | Space-time prediction model robustness testing method, device, equipment and medium | |
| CN114863135A (en) | Image text matching method based on double-flow hierarchical similarity inference |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |