Hydraulic pipeline leakage rate calculation method, device, electronic equipment and storage medium

By extracting the contours of oil droplets at multiple leakage points in the hydraulic pipeline image and considering component information and topological adjacency, the weight of the structural similarity algorithm is adjusted to solve the accuracy problem of hydraulic pipeline leakage rate measurement and achieve more accurate leakage rate measurement.

CN119359616BActive Publication Date: 2025-09-09NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411237194.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2025-09-09
Estimated Expiration
2044-09-04

AI Technical Summary

Technical Problem

Existing image processing algorithms cannot accurately distinguish the impact of different components of hydraulic pipelines on the leakage rate measurement results, and cannot identify the topological adjacency relationship between multiple leakage points, resulting in inaccurate hydraulic pipeline leakage rate measurement results.

Method used

By extracting the contours of oil droplets at multiple leakage points in the hydraulic pipeline image, the leakage point locations are calculated, and the structural component weights in the structural similarity algorithm are adjusted according to the component information and topological adjacency relationship to dynamically adjust the leakage rate measurement results.

Benefits of technology

It achieves more accurate calculation of hydraulic pipeline leakage rate, reduces human error, and improves the accuracy and reliability of measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119359616B_ABST
    Figure CN119359616B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, electronic device, and storage medium for calculating the leakage rate of a hydraulic pipeline. The method comprises: obtaining an original hydraulic pipeline image before measurement and a target hydraulic pipeline image during measurement; adjusting the weight of the structural component in a structural similarity algorithm; and calculating the leakage rate result of the hydraulic pipeline. The method, apparatus, electronic device, and storage medium for calculating the leakage rate of a hydraulic pipeline provided by embodiments of the present invention calculate the leakage rate of a hydraulic pipeline based on an improved structural similarity algorithm. This algorithm takes into account the structural information reflected by each of the multiple leakage point locations and the topological adjacency relationship between the leakage point locations. This algorithm dynamically adjusts the weight of the structural component in the structural similarity algorithm based on the degree of structural information in the target hydraulic pipeline image, thereby achieving a more accurate leakage rate measurement result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of aviation engineering technology, and in particular to a method, device, electronic equipment and storage medium for calculating the leakage rate of a hydraulic pipeline. Background Art

[0002] During aircraft maintenance and overhaul, leak detection of hydraulic piping systems is crucial to ensuring they are free of oil leaks and other issues, ensuring aircraft performance and stability. The operational performance of large aircraft actuation systems, such as door opening and closing and landing gear retraction, relies on highly reliable hydraulic piping systems. Therefore, testing and verifying the tightness of hydraulic piping is essential for large aircraft assembly. However, in actual assembly, locating hydraulic piping leaks and calculating oil droplet leakage rates are primarily performed manually. This method requires a high level of worker experience, is time-consuming and labor-intensive, and is susceptible to environmental and vibration factors, leading to human misjudgment and operational errors. This, in turn, can lead to errors in hydraulic piping inspection results, seriously impacting aircraft safety and actuation system stability during service.

[0003] With the innovation of high-resolution motion cameras and the continuous evolution of image processing algorithms, methods for target feature recognition and extraction based on visual images have been continuously applied in structural flaw detection and identification, damage characteristic value calculation and evaluation, and intelligent diagnosis. This method can efficiently extract target features by specifying a filter matrix or setting a feature threshold based on the grayscale or RGB three-channel features corresponding to each pixel in the visual image. It is not affected by the noise and vibration of the complex assembly environment of the production site, and has broad application prospects in leakage rate measurement. However, existing image processing algorithms are not specifically designed for hydraulic pipeline images. As a result, when using general image processing algorithms such as peak signal-to-noise ratio and structural similarity to calculate hydraulic pipeline leakage rate, they cannot distinguish the impact of leak points located in different hydraulic pipeline components on the measurement results, nor can they identify the impact of topological adjacency relationships between multiple leak points on the measurement results, resulting in inaccurate measurement results. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for calculating the leakage rate of a hydraulic pipeline.

[0005] In a first aspect, an embodiment of the present invention provides a method for calculating a leakage rate of a hydraulic pipeline, the method comprising:

[0006] respectively acquiring an original hydraulic pipeline image before measurement and a target hydraulic pipeline image during measurement;

[0007] Extracting multiple leak point oil droplet contours of the target hydraulic pipeline image, and calculating the multiple leak point positions of the target hydraulic pipeline image based on the multiple leak point oil droplet contours;

[0008] Determining a structural confidence weight corresponding to the target hydraulic pipeline image based on component information corresponding to each of the multiple leak point locations and topological adjacency information between the multiple leak point locations, and adjusting a weight of a structural component in a structural similarity algorithm based on the structural confidence weight;

[0009] According to the similarity result obtained by inputting the original hydraulic pipeline image and the target hydraulic pipeline image into the structural similarity algorithm, the total leakage of the hydraulic pipeline is calculated, and then the leakage rate result of the hydraulic pipeline is calculated.

[0010] Optionally, determining the structural confidence weight corresponding to the target hydraulic pipeline image according to the component information corresponding to each of the multiple leakage point locations and the topological adjacency information between the multiple leakage point locations specifically includes:

[0011] Determine the component information corresponding to each leak point location, and obtain the leak point weight corresponding to each leak point location by searching the component information weight table;

[0012] Accumulate the leakage point weights corresponding to the leakage point positions to obtain the total leakage point weight;

[0013] Determining the topological adjacency coefficients corresponding to the multiple leakage point positions according to the proportion of the number of leakage point positions in the maximum leakage point position set in the topological adjacency relationship among the multiple leakage point positions;

[0014] A structural confidence weight corresponding to the target hydraulic pipeline image is obtained according to the total weight of the leakage points and the topological adjacency coefficient.

[0015] Optionally, the component information includes: whether the leakage point is located at the elbow or joint of the hydraulic pipeline, whether the leakage point is located at the valve of the hydraulic pipeline, whether the leakage point is located at the pipe of the hydraulic pipeline, and the diameter of the pipe when the leakage point is located at the pipe of the hydraulic pipeline.

[0016] Optionally, determining the topological adjacency coefficients corresponding to the multiple leakage point positions according to the proportion of the leakage point positions in the multiple leakage point positions that are in a topological adjacency relationship specifically includes:

[0017] A combination of the largest number of leakage point locations is selected from the plurality of leakage point locations, so that a component where any leakage point location in the combination is located is topologically adjacent to a component where at least one other leakage point location in the combination is located.

[0018] Optionally, the calculating and obtaining the positions of multiple leak points in the target hydraulic pipeline image according to the oil droplet contours at the multiple leak points specifically includes:

[0019] For each oil droplet contour, find the corresponding maximum inscribed circle in the target hydraulic pipeline image; wherein all pixels in the maximum inscribed circle do not overlap with pixels of the oil droplet contour, and the maximum number of adjacent pixels to the oil droplet contour pixels is within the maximum inscribed circle;

[0020] The pixel where the center of the maximum inscribed circle is located is determined to be the leakage point position corresponding to the oil droplet contour.

[0021] Optionally, extracting the oil droplet contours of multiple leakage points from the target hydraulic pipeline image specifically includes:

[0022] grayscale and binarize the target hydraulic pipeline image to obtain a processed target hydraulic pipeline image;

[0023] The processed target hydraulic pipeline image is subjected to edge detection using a Sobel operator to obtain the contours of multiple leakage points and oil droplets in the target hydraulic pipeline image.

[0024] Optionally, the calculating to obtain the leakage rate result of the hydraulic pipeline specifically includes:

[0025] According to the time when the original hydraulic pipeline image and the target hydraulic pipeline image are respectively acquired, a time difference is calculated;

[0026] A leakage rate result of the hydraulic pipeline is obtained according to the total leakage of the hydraulic pipeline and the measured time difference.

[0027] In a second aspect, an embodiment of the present invention provides a device for measuring leakage rate of a hydraulic pipeline, the device comprising:

[0028] An image acquisition module is used to respectively acquire an original hydraulic pipeline image before measurement and a target hydraulic pipeline image during measurement;

[0029] a leakage point detection module, configured to extract the oil droplet contours of multiple leakage points of the target hydraulic pipeline image, and calculate the positions of multiple leakage points of the target hydraulic pipeline image based on the oil droplet contours of multiple leakage points;

[0030] a structural component adjustment module, configured to determine a structural confidence weight corresponding to the target hydraulic pipeline image based on component information corresponding to each of the multiple leak point locations and topological adjacency information between the multiple leak point locations, and adjust a weight of a structural component in a structural similarity algorithm based on the structural confidence weight;

[0031] The leakage rate calculation module is used to calculate the total leakage of the hydraulic pipeline according to the similarity result obtained by inputting the original hydraulic pipeline image and the target hydraulic pipeline image into the structural similarity algorithm, and then calculate the leakage rate result of the hydraulic pipeline.

[0032] In a third aspect, an embodiment of the present invention provides an electronic device, characterized by including:

[0033] one or more processors;

[0034] a memory for storing one or more programs;

[0035] When the one or more programs are executed by the one or more processors, the one or more processors execute the method as described in the first aspect.

[0036] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having executable instructions stored thereon, wherein when the executable instructions are executed by a processor, the processor is caused to execute the method described in the first aspect.

[0037] The hydraulic pipeline leakage rate calculation method, device, electronic device and storage medium provided in the embodiments of the present invention calculate the leakage rate of the hydraulic pipeline based on an improved structural similarity algorithm, taking into account the structural information reflected by each of the multiple leakage point locations and the topological adjacency relationship between the leakage point locations, thereby dynamically adjusting the weight of the structural component in the structural similarity algorithm according to the degree of structural information of the target hydraulic pipeline image, thereby achieving more accurate leakage rate measurement results. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments of the present application.

[0039] Figure 1 A flow chart of a method for calculating a hydraulic pipeline leakage rate according to an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of a flow chart of a structure confidence weight adjustment algorithm provided in an embodiment of the present invention;

[0041] Figure 3 A schematic diagram of the structure of a hydraulic pipeline leakage rate measuring device provided by an embodiment of the present invention;

[0042] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0044] Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.

[0045] During aircraft maintenance and overhaul, leak detection of hydraulic piping systems is crucial to ensuring they are free of oil leaks and other issues, ensuring aircraft performance and stability. The operational performance of large aircraft actuation systems, such as door opening and closing and landing gear retraction, relies on highly reliable hydraulic piping systems. Therefore, testing and verifying the tightness of hydraulic piping is essential for large aircraft assembly. However, in actual assembly, locating hydraulic piping leaks and calculating oil droplet leakage rates are primarily performed manually. This method requires a high level of worker experience, is time-consuming and labor-intensive, and is susceptible to environmental and vibration factors, leading to human misjudgment and operational errors. This, in turn, can lead to errors in hydraulic piping inspection results, seriously impacting aircraft safety and actuation system stability during service.

[0046] With the innovation of high-resolution motion cameras and the continuous evolution of image processing algorithms, methods for target feature recognition and extraction based on visual images have been continuously applied in structural flaw detection and identification, damage characteristic value calculation and evaluation, and intelligent diagnosis. This method can efficiently extract target features by specifying a filter matrix or setting a feature threshold based on the grayscale or RGB three-channel features corresponding to each pixel in the visual image. It is not affected by the noise and vibration of the complex assembly environment of the production site, and has broad application prospects in leakage rate measurement. However, existing image processing algorithms are not specifically designed for hydraulic pipeline images. As a result, when using general image processing algorithms such as peak signal-to-noise ratio and structural similarity to calculate hydraulic pipeline leakage rate, they cannot distinguish the impact of leak points located in different hydraulic pipeline components on the measurement results, nor can they identify the impact of topological adjacency relationships between multiple leak points on the measurement results, resulting in inaccurate measurement results.

[0047] Based on this, an embodiment of the present invention provides a method for measuring the leakage rate of a hydraulic pipeline. Figure 1 A flow chart of a method for calculating a hydraulic pipeline leakage rate according to an embodiment of the present invention is shown.

[0048] Step S110 , respectively acquiring an original hydraulic pipeline image before measurement and a target hydraulic pipeline image during measurement.

[0049] Embodiments of the present invention are applied to the detection of oil leaks in hydraulic pipelines in the aviation field. The hydraulic system is a vital component of an aircraft, controlling key components such as the landing gear, flaps, and rudder. Any minor leak in the hydraulic pipeline can cause a drop in system pressure, affecting the proper functioning of these components and even endangering flight safety.

[0050] Leak rate data is a key indicator for assessing hydraulic system health. By comparing leak rate data at different time points, we can understand the stability of the system's sealing performance and whether there is a trend of deterioration. Leak rate data can also be used to develop a reasonable maintenance plan. Pipelines or components with high leak rates can be prioritized for repair or replacement to ensure proper system operation. Leak rate data analysis can identify the root cause of leaks, such as improper piping design or inappropriate material selection. This information provides valuable insights for optimizing system design and reducing the likelihood of similar issues in the future.

[0051] The embodiment of the present invention measures the leakage rate of the hydraulic pipeline based on the image processing method, and needs to obtain two images of the target area to be measured at different times. The time of acquisition of the first image is the first moment before the measurement, which serves as the original hydraulic pipeline image; the time of acquisition of the second image is the second moment during the measurement, which serves as the target hydraulic pipeline image. When acquiring the two images, the target area and related equipment parameters acquired by the acquisition device are exactly the same. The target area includes the global or partial key areas of the hydraulic pipeline system. The acquisition device can be an image acquisition device such as a camera in the safety monitoring system of aviation machinery. The specific model can be formulated according to actual needs, and the embodiment of the present invention does not make specific limitations.

[0052] There is a time difference between the first moment and the second moment of respectively acquiring the original hydraulic pipeline image and the target hydraulic pipeline image. The time difference can be set according to an empirical value, such as 15 or 30 seconds.

[0053] Step S120 , extracting the oil droplet contours of multiple leak points of the target hydraulic pipeline image, and calculating the positions of multiple leak points of the target hydraulic pipeline image based on the oil droplet contours of multiple leak points.

[0054] The embodiments of the present invention do not directly estimate the leak rate of a hydraulic pipeline by analyzing the image using an image processing algorithm. Instead, based on the fact that oil droplet leaks in hydraulic pipelines are typically manifested as point leaks, the leak point is first located in the image. After analyzing the leak point location, the leak rate of the hydraulic pipeline is calculated. If there are multiple leaks in different locations, it is necessary to locate multiple leak points in the image. In the embodiments of the present invention, multiple leak points can refer to the presence of multiple leak points or just one leak point.

[0055] When locating multiple leak points, this step mainly involves analyzing the target hydraulic pipeline image. Through digital image processing technology, the contours of the oil droplets at the multiple leak points are first extracted, and then the locations of the multiple leak points in the target hydraulic pipeline image are calculated based on the contours of the oil droplets at the multiple leak points.

[0056] When extracting the contours of oil droplets at multiple leakage points, it is necessary to perform grayscale processing on the acquired target hydraulic pipeline image. A more reasonable grayscale image Gray(x, y) can be obtained by performing weighted averaging of the RGB three-channel components R(x, y), G(x, y), and B(x, y) according to the following formula.

[0057] Gray(x,y)=0.299×R(x,y)+0.578×G(x,y)+0.114×B(x,y)

[0058] Then the grayscale image is binarized using an adaptive threshold strategy, that is, a local threshold T(x, y) is calculated for each pixel or neighborhood in the image to perform binarization. The grayscale image is converted into a black and white binary image dst(x, y) containing only two pixel values ​​according to the following formula.

[0059]

[0060] The Sobel operator is then used to detect edges in the black-and-white binary image. The Sobel operator consists of two 3×3 matrices, which are horizontal and vertical templates. By performing a planar convolution with the image, the horizontal and vertical brightness difference approximations can be obtained, respectively. This allows the position and intensity of the edges in the image to be determined, obtaining accurate edge information and subsequently extracting the contours of oil droplets at multiple leakage points.

[0061] Detection of horizontal (lateral) template

[0062]

[0063] Detect templates in the vertical direction (longitudinal direction)

[0064]

[0065] The approximate horizontal and vertical gradients of each pixel in the image can be combined to calculate the magnitude of the gradient.

[0066]

[0067] Then the gradient direction can be calculated using the following formula.

[0068]

[0069] After extracting the multiple leak point oil droplet outlines from the target hydraulic pipeline image, for each oil droplet outline, the corresponding maximum inscribed circle is found in the target hydraulic pipeline image. This maximum inscribed circle means that all pixels within its range do not overlap with any oil droplet outline pixels, and the maximum inscribed circle has the most adjacent pixels to the oil droplet outline pixels. The maximum inscribed circle is determined by traversing each extracted oil droplet outline and calculating the distance from each pixel within the outline to the outline. The pixel with the largest distance value is the pixel at the center of the maximum inscribed circle and is identified as the leak point location corresponding to the corresponding oil droplet outline. When the target hydraulic pipeline image has multiple leak point oil droplet outlines, multiple leak point locations can be identified accordingly.

[0070] Step S130: determining a structural confidence weight corresponding to the target hydraulic pipeline image based on the component information corresponding to each of the multiple leak point locations and the topological adjacency information between the multiple leak point locations, and adjusting the weight of the structural component in the structural similarity algorithm based on the structural confidence weight.

[0071] The present invention ultimately employs a structural similarity algorithm to calculate the leak rate of hydraulic pipelines. However, while traditional structural similarity algorithms not only analyze image brightness and contrast characteristics but also structural information to assess image similarity, subtle differences in complex image structures can be overlooked, leading to inaccurate similarity assessments. Oil droplet leaks in hydraulic pipelines exhibit complex structures and subtle features.

[0072] In addition, traditional structural similarity algorithms mainly focus on the low-level visual features of images, but lack an understanding of the semantic content of images. In the scenario of the embodiment of the present invention, traditional structural similarity algorithms cannot understand in which component of the hydraulic pipeline system the leak point is located, and then analyze the impact of the leak point on the structural information, nor can they understand the impact of the relationship between multiple leak points on the structural information. An ideal structural similarity algorithm should dynamically adjust the weight of the structural component among the brightness component, contrast component, and structural component in the structural similarity algorithm according to the importance of the structural information. If the static weight value is too large or too small, it will affect the accuracy of the structural similarity algorithm.

[0073] In this step, each leak point located belongs to a specific component of the hydraulic pipeline system: for example, pipelines, joints, elbows, valves, etc., among which valves have the least structural information, followed by joints and elbows, while pipeline components have the most structural information; similarly, for pipelines, pipelines with smaller diameters have higher structural information. Since the structure of the hydraulic pipeline system to be measured is known, the component information where the leak point is located can be obtained based on simple image recognition methods. Therefore, the component information in this step can include: whether the leak point is located at an elbow or joint in the hydraulic pipeline, whether the leak point is located at a valve in the hydraulic pipeline, whether the leak point is located in the pipe of the hydraulic pipeline, and when the leak point is located in the pipe of the hydraulic pipeline, the diameter of the pipe.

[0074] Furthermore, different components in a hydraulic piping system are topologically connected. For example, if pipe A and valve X are connected, they are considered topologically adjacent. If leak point 1 corresponds to pipe A and leak point 2 corresponds to valve X, then leak points 1 and 2 are considered topologically adjacent. The higher the degree of topological adjacency between multiple leak points in a hydraulic piping system, the more structured information is used in the structural similarity algorithm.

[0075] In this step, it is necessary to determine the structural confidence weight corresponding to the target hydraulic pipeline image based on the component information corresponding to each of the multiple leakage point locations and the topological adjacency information between the multiple leakage point locations. Figure 2 The flowchart of the structural confidence weight adjustment algorithm provided by the embodiment of the present invention is shown, which specifically includes the following steps S131 to S134.

[0076] Step S131 : determining the component information corresponding to each leakage point position, and obtaining the leakage point weight corresponding to each leakage point position by searching the component information weight table.

[0077] Step S132: Accumulate the leakage point weights corresponding to the leakage point positions to obtain the total leakage point weight.

[0078] Step S133 , determining the topological adjacency coefficients corresponding to the multiple leakage point positions according to the proportion of the number of leakage point positions in the maximum leakage point position set that are in a topological adjacency relationship among the multiple leakage point positions.

[0079] Step S134 : obtaining a structural confidence weight corresponding to the target hydraulic pipeline image according to the total weight of the leakage points and the topological adjacency coefficient.

[0080] In this embodiment of the present invention, since the structure of the hydraulic piping system to be measured is known, the component information at the location of the leak point can be determined using a simple image recognition method. The corresponding leak point weights for each component information are preset based on historical experience and pre-stored in a component information weight table. This component information weight table may store, for example, the following information: Pipeline 0-10mm, weight 0.5; Pipeline 10-20mm, weight 0.4; Pipeline 20-30mm, weight 0.3; Joint or elbow, weight 0.2; Valve, weight 0.1. The above data is merely illustrative; users can customize the weight values ​​for different actual hydraulic piping systems.

[0081] After obtaining multiple leak point weights for the target hydraulic pipeline image, a cumulative calculation is performed to obtain the total leak point weight, which reflects the degree of structured information reflected by each leak point location. In addition to the degree of structured information reflected by each leak point location, the degree of structured information reflected by the relationship between the leak point locations is obtained by analyzing the topological adjacency relationship between the leak point locations.

[0082] This embodiment of the present invention requires finding the largest set of topologically adjacent leak point locations among multiple leak point locations. In this embodiment, if two leak points are located in the same and connected components, they are considered to be topologically adjacent. For a set of three or more leak points, if any leak point in the set is topologically adjacent to another leak point in the set, the leak points in the set are considered to be topologically adjacent. In this case, it is necessary to find the largest set of topologically adjacent leak point locations. For example, for the four located leakage points 1 to 4, the component where leakage points 1 and 2 are located is pipeline A, the component where leakage point 3 is located is elbow M, and the component where leakage point 4 is located is valve X, where pipeline A is connected to elbow M, and valve X is connected neither to pipeline A nor to elbow M. Then, the maximum leakage point position set in a topologically adjacent relationship is the set consisting of leakage points 1 to 3. This set has the highest proportion of leakage point positions in the maximum leakage point position set in a topologically adjacent relationship among multiple leakage point positions 1 to 4, accounting for 75%. Therefore, the topological adjacency coefficient corresponding to the multiple leakage point positions is determined to be 0.75.

[0083] After obtaining the total weight of the leak points and the topological adjacency coefficient, it is necessary to calculate the structural confidence weight corresponding to the target hydraulic pipeline image. The calculation formula in the embodiment of the present invention is: structural confidence weight = total weight of the leak points × (1 + topological adjacency coefficient). This formula reflects that the higher the degree of structural information reflected by the individual leak point locations, or the higher the degree of structural information reflected by the relationship between the leak point locations, the higher the calculated structural confidence weight.

[0084] After calculating the structural confidence weights in steps S131-S134, the weights of the structural components in the structural similarity algorithm need to be adjusted based on the structural confidence weights. Structural similarity algorithms generally include three components: brightness, contrast, and structure. The importance of each component is adjusted based on its respective weight. Experimental data shows that in the hydraulic pipeline images of the present invention, the degree of structured signal significantly disrupts the accuracy of the structural similarity algorithm. Therefore, it is necessary to dynamically adjust the weights of the structural components in the structural similarity algorithm based on the degree of structured information in different target hydraulic pipeline images, as in the present invention.

[0085] The structural similarity SSIM(x, y) generally includes the brightness component l(x, y), the contrast component c(x, y) and the structure component s(x, y). The corresponding brightness component weight, contrast component weight, and structure component weight satisfy α>0, β>0, and γ>0, respectively, and are calculated according to the following formula.

[0086] SSIM(x,y)=(1(x,y)) α (c(x,y)) β (s(x, y)) γ

[0087] Generally speaking, the default values ​​of α, β, and γ in the structural similarity calculation formula are all 1. When adjusting the structural component weight γ, in order to prevent overfitting of the structural information, the upper limit of the γ adjustment can be preset, for example, the upper limit is 3, that is, the value range of γ adjustment is [1, 3]. At this time, the formula for adjusting the weight of the structural component in the structural similarity algorithm according to the structural confidence weight m can be obtained by comparing the structural confidence weight m with the historical average structural confidence weight n. The historical average structural confidence is the average value of the structural confidence obtained in the process of all hydraulic pipeline images processed in the history, which is a statistical data. Therefore, the calculation formula for adjusting γ can be as follows:

[0088] γ=2+(mn) / n

[0089] Step S140 , calculating the total leakage of the hydraulic pipeline based on the similarity result obtained by inputting the original hydraulic pipeline image and the target hydraulic pipeline image into the structural similarity algorithm, and then calculating the leakage rate result of the hydraulic pipeline.

[0090] After adjusting the weight γ of the structural component in the structural similarity algorithm, the original hydraulic pipeline image and the target hydraulic pipeline image are input into the structural similarity algorithm to obtain a similarity result between the original hydraulic pipeline image and the target hydraulic pipeline image. Based on this similarity result, the total leakage of the hydraulic pipeline can be calculated. An example of this calculation process is as follows.

[0091] Determine whether the real-time image SSIM (x, y) is ≥ 0.95. If so, this image indicates that there is no oil droplet leakage;

[0092] If not, determine whether SSIM(x, y) ≥ 0.8. If so, it means that the SSIM(x, y) of this image ∈ [0.8, 0.95), indicating that there is only one drop of oil leakage, and the number of oil drop leakage statistics is increased by one;

[0093] If not, determine whether SSIM(x, y) ≥ 0.7. If so, it means that the SSIM(x, y) of this image ∈ [0.7, 0.8), indicating that there are two oil droplets leaking, and the number of oil droplet leaks is increased by two;

[0094] If not, it means that this image SSIM(x, y)∈[0, 0.7), indicating that three oil droplets have leaked, and the number of oil droplet leaks is counted plus three.

[0095] After obtaining the number of leaked oil droplets used to characterize the total leakage of the hydraulic pipeline, the measured time difference is obtained based on the time when the original hydraulic pipeline image and the target hydraulic pipeline image are respectively obtained; based on the total leakage of the hydraulic pipeline and the measured time difference, the leakage rate result of the hydraulic pipeline is obtained.

[0096] Calculate the leakage rate result V according to the following formula, where n is the total leakage volume and T is the duration of oil drop leakage.

[0097] The hydraulic pipeline leakage rate calculation method provided in an embodiment of the present invention calculates the leakage rate of the hydraulic pipeline based on an improved structural similarity algorithm. It takes into account the structural information reflected by the locations of multiple leakage points and the topological adjacency relationship between the locations of the leakage points. It thus achieves dynamic adjustment of the weight of the structural component in the structural similarity algorithm according to the degree of structural information of the target hydraulic pipeline image, thereby achieving more accurate leakage rate measurement results.

[0098] Based on any of the above embodiments, Figure 3 The following is a schematic diagram showing the structure of a hydraulic pipeline leakage rate measuring device provided by an embodiment of the present invention, and the specific contents are as follows:

[0099] An image acquisition module 310 is used to respectively acquire an original hydraulic pipeline image before measurement and a target hydraulic pipeline image during measurement;

[0100] a leakage point detection module 320 for extracting the oil droplet contours of multiple leakage points of the target hydraulic pipeline image, and calculating the positions of multiple leakage points of the target hydraulic pipeline image based on the oil droplet contours of multiple leakage points;

[0101] a structural component adjustment module 330 for determining a structural confidence weight corresponding to the target hydraulic pipeline image based on component information corresponding to each of the multiple leak point locations and topological adjacency information between the multiple leak point locations, and adjusting a weight of a structural component in a structural similarity algorithm based on the structural confidence weight;

[0102] The leakage rate calculation module 340 is configured to calculate the total leakage of the hydraulic pipeline based on the similarity result obtained by inputting the original hydraulic pipeline image and the target hydraulic pipeline image into the structural similarity algorithm, and further calculate the leakage rate result of the hydraulic pipeline.

[0103] The hydraulic pipeline leakage rate calculation device provided in an embodiment of the present invention calculates the leakage rate of the hydraulic pipeline based on an improved structural similarity algorithm. It takes into account the structural information reflected by the locations of multiple leakage points and the topological adjacency relationship between the locations of each leakage point, thereby dynamically adjusting the weight of the structural component in the structural similarity algorithm according to the degree of structural information of the target hydraulic pipeline image, thereby achieving more accurate leakage rate measurement results.

[0104] Based on any of the above embodiments, Figure 4 The figure shows a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. The electronic device may include: a processor (processor) 410, a communication interface (Communications Interface) 420, a memory (memory) 430 and a communication bus 440. The processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the following method:

[0105] respectively acquiring an original hydraulic pipeline image before measurement and a target hydraulic pipeline image during measurement;

[0106] Extracting multiple leak point oil droplet contours of the target hydraulic pipeline image, and calculating the multiple leak point positions of the target hydraulic pipeline image based on the multiple leak point oil droplet contours;

[0107] Determining a structural confidence weight corresponding to the target hydraulic pipeline image based on component information corresponding to each of the multiple leak point locations and topological adjacency information between the multiple leak point locations, and adjusting a weight of a structural component in a structural similarity algorithm based on the structural confidence weight;

[0108] According to the similarity result obtained by inputting the original hydraulic pipeline image and the target hydraulic pipeline image into the structural similarity algorithm, the total leakage of the hydraulic pipeline is calculated, and then the leakage rate result of the hydraulic pipeline is calculated.

[0109] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0110] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method provided in each of the above embodiments is implemented, for example, including:

[0111] respectively acquiring an original hydraulic pipeline image before measurement and a target hydraulic pipeline image during measurement;

[0112] Extracting multiple leak point oil droplet contours of the target hydraulic pipeline image, and calculating the multiple leak point positions of the target hydraulic pipeline image based on the multiple leak point oil droplet contours;

[0113] Determining a structural confidence weight corresponding to the target hydraulic pipeline image based on component information corresponding to each of the multiple leak point locations and topological adjacency information between the multiple leak point locations, and adjusting a weight of a structural component in a structural similarity algorithm based on the structural confidence weight;

[0114] According to the similarity result obtained by inputting the original hydraulic pipeline image and the target hydraulic pipeline image into the structural similarity algorithm, the total leakage of the hydraulic pipeline is calculated, and then the leakage rate result of the hydraulic pipeline is calculated.

[0115] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0116] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for calculating leakage rate of a hydraulic pipeline, characterized in that: The method comprises: respectively acquiring an original hydraulic pipeline image before measurement and a target hydraulic pipeline image during measurement; Extracting multiple leak point oil droplet contours of the target hydraulic pipeline image, and calculating the multiple leak point positions of the target hydraulic pipeline image based on the multiple leak point oil droplet contours; Determining a structural confidence weight corresponding to the target hydraulic pipeline image based on component information corresponding to each of the multiple leak point locations and topological adjacency information between the multiple leak point locations, and adjusting a weight of a structural component in a structural similarity algorithm based on the structural confidence weight; Calculating the total leakage of the hydraulic pipeline based on a similarity result obtained by inputting the original hydraulic pipeline image and the target hydraulic pipeline image into the structural similarity algorithm, and then calculating the leakage rate result of the hydraulic pipeline; The step of determining the structural confidence weight corresponding to the target hydraulic pipeline image based on the component information corresponding to each of the multiple leakage point locations and the topological adjacency information between the multiple leakage point locations specifically includes: Determine the component information corresponding to each leak point location, and obtain the leak point weight corresponding to each leak point location by searching the component information weight table; Accumulate the leakage point weights corresponding to the leakage point positions to obtain the total leakage point weight; Determining the topological adjacency coefficients corresponding to the multiple leakage point positions according to the proportion of the number of leakage point positions in the maximum leakage point position set in the multiple leakage point positions that are in a topological adjacency relationship; A structural confidence weight corresponding to the target hydraulic pipeline image is obtained according to the total weight of the leakage points and the topological adjacency coefficient.

2. The method for calculating the leakage rate of a hydraulic pipeline according to claim 1, characterized in that: The component information includes: whether the leakage point is located at the elbow or joint of the hydraulic pipeline, whether the leakage point is located at the valve of the hydraulic pipeline, whether the leakage point is located at the pipe of the hydraulic pipeline, and when the leakage point is located at the pipe of the hydraulic pipeline, the diameter of the pipe.

3. The method for calculating the leakage rate of a hydraulic pipeline according to claim 1, characterized in that: Determining the topological adjacency coefficients corresponding to the multiple leakage point positions according to the proportion of the leakage point positions in the multiple leakage point positions that are in a topological adjacency relationship specifically includes: A combination of the largest number of leakage point locations is selected from the multiple leakage point locations, so that a component where any leakage point location in the combination is located is topologically adjacent to a component where at least one other leakage point location in the combination is located.

4. The method for calculating the leakage rate of a hydraulic pipeline according to claim 1, characterized in that: The step of calculating the locations of multiple leak points in the target hydraulic pipeline image based on the oil droplet contours at the multiple leak points specifically includes: For each oil droplet contour, find the corresponding maximum inscribed circle in the target hydraulic pipeline image; wherein all pixels in the maximum inscribed circle do not overlap with pixels of the oil droplet contour, and the maximum number of adjacent pixels to pixels of the oil droplet contour is within the maximum inscribed circle; The pixel where the center of the maximum inscribed circle is located is determined to be the leakage point position corresponding to the oil droplet contour.

5. The method for calculating the leakage rate of a hydraulic pipeline according to claim 1, characterized in that: The step of extracting the oil droplet contours of multiple leakage points from the target hydraulic pipeline image specifically includes: grayscale and binarize the target hydraulic pipeline image to obtain a processed target hydraulic pipeline image; The processed target hydraulic pipeline image is subjected to edge detection using a Sobel operator to obtain the contours of multiple leakage points and oil droplets in the target hydraulic pipeline image.

6. The method for calculating the leakage rate of a hydraulic pipeline according to claim 1, characterized in that: The calculation to obtain the leakage rate result of the hydraulic pipeline specifically includes: According to the time when the original hydraulic pipeline image and the target hydraulic pipeline image are respectively acquired, a time difference is calculated; A leakage rate result of the hydraulic pipeline is obtained according to the total leakage of the hydraulic pipeline and the measured time difference.

7. A hydraulic pipeline leakage rate measuring device, characterized in that: The device comprises: An image acquisition module, used to respectively acquire an original hydraulic pipeline image before measurement and a target hydraulic pipeline image during measurement; a leakage point detection module, configured to extract the oil droplet contours of multiple leakage points of the target hydraulic pipeline image, and calculate the positions of multiple leakage points of the target hydraulic pipeline image based on the oil droplet contours of multiple leakage points; a structural component adjustment module, configured to determine a structural confidence weight corresponding to the target hydraulic pipeline image based on component information corresponding to each of the multiple leak point locations and topological adjacency information between the multiple leak point locations, and adjust a weight of a structural component in a structural similarity algorithm based on the structural confidence weight; a leakage rate calculation module, configured to calculate the total leakage of the hydraulic pipeline based on a similarity result obtained by inputting the original hydraulic pipeline image and the target hydraulic pipeline image into the structural similarity algorithm, and further calculate the leakage rate result of the hydraulic pipeline; The step of determining the structural confidence weight corresponding to the target hydraulic pipeline image based on the component information corresponding to each of the multiple leakage point locations and the topological adjacency information between the multiple leakage point locations specifically includes: Determine the component information corresponding to each leak point location, and obtain the leak point weight corresponding to each leak point location by searching the component information weight table; Accumulate the leakage point weights corresponding to the leakage point positions to obtain the total leakage point weight; Determining the topological adjacency coefficients corresponding to the multiple leakage point positions according to the proportion of the number of leakage point positions in the maximum leakage point position set in the multiple leakage point positions that are in a topological adjacency relationship; A structural confidence weight corresponding to the target hydraulic pipeline image is obtained according to the total weight of the leakage points and the topological adjacency coefficient.

8. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having executable instructions stored thereon, characterized in that: When the executable instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multi-scale target detection method and device based on confidence significance analysis

    CN115019213A

  • Underwater pipeline leakage detection system, method and equipment

    CN116934724A