Method and device for measuring leakage amount of stuffing box of water pump and storage medium

Through image recognition technology and convolutional neural network, the leakage volume of the water pump filler box is detected online in real time, solving the problem of difficulty in time discovering abnormal leakage volume in the existing technology, improving the real-time and accuracy of monitoring, and ensuring the safe operation of the water pump.

CN119693848APending Publication Date: 2025-03-25SHANDONG FENGSHI INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411832635.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

It is difficult to timely detect abnormal leakage of water pump filler box, especially faults with too small or too large leakage, which will affect the normal operation of the water pump.

Method used

Image recognition technology is used to capture the leakage of filler boxes through the camera, and a leakage detection model is constructed using a convolutional neural network, and the total number of water droplets per minute is detected online in real time to judge the abnormal leakage.

Benefits of technology

Real-time online detection of the leakage of the water pump filler box is realized, real-time and accuracy of monitoring is improved, abnormal leakage is discovered in a timely manner, and the safe operation of the water pump is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693848A_ABST
    Figure CN119693848A_ABST
Patent Text Reader

Abstract

The invention relates to a method and equipment for measuring the leakage amount of a stuffing box of a water pump and a storage medium, and belongs to the technical field of image processing and pump station monitoring. The method comprises the following steps: placing a scale beside a stuffing box of a water pump, selecting a proper position to set a camera to regularly shoot a short video with a fixed time length, recording the dripping process of water drops during leakage, carrying out image preprocessing and image analysis, selecting key frames which are 1-5cm away from the stuffing box when the water drops fall, and extracting features used for identifying the dripping of the water drops; constructing a water pump stuffing box leakage detection model; using the trained model to identify the key frame image of water drop dripping, and calculating to obtain the total number of water drops leaked by the stuffing box within one minute; and according to the total number of water drops per minute and the change trend of the previous and later time periods, judging the abnormal condition of the stuffing box leakage water amount. According to the method, quantitative analysis can be carried out by utilizing an image recognition method, and the situation that the leakage amount of the stuffing box is increased and the situation that the leakage amount of the stuffing box is reduced can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method, equipment and storage medium for measuring leakage of a water pump stuffing box, and belongs to the technical field of image processing and pump station monitoring. Background Art

[0002] After a long period of operation, the stuffing box of the water pump will cause the packing to wear, resulting in a large amount of water leakage, affecting the normal operation of the water pump; at the same time, if the packing is pressed too tightly, the water leakage of the stuffing box is too small, the lubrication and cooling conditions deteriorate, and the packing is easy to wear and heat and damage. Therefore, it is particularly important to detect the leakage of the water pump stuffing box. At present, the detection of the leakage of the stuffing box mainly relies on manual regular inspection, which cannot detect the abnormal leakage in time, which has a certain impact on the safe operation of the water pump.

[0003] In the prior art, such as Chinese patent CN 203639993U, a pump station stuffing box leakage detection device is disclosed, including a mounting sleeve and a water storage box. A drainage pipe is connected to one side of the bottom of the water storage box, a leakage sensing box is installed on the other side of the water storage box, an overflow hole is opened on one side of the upper part of the water storage box, a liquid level sensor is installed inside the leakage sensing box, and an alarm is installed on the leakage sensing box. By converting the change in the amount of leakage into the change in the liquid level in the leakage sensing box, the alarm is triggered to start, and it is possible to detect and maintain the stuffing box in time when the leakage is abnormal. Although the device is effective in detecting stuffing box leakage, it still has some shortcomings. First, it takes a certain amount of time for the device to detect the abnormality of the stuffing box. After the water storage box reaches the alarm liquid level, the pump stuffing box has been working abnormally for a long time and cannot be discovered in time. Secondly, this device can only detect the fault problem when the stuffing box leaks a large amount of water, and cannot detect the fault when the stuffing box leaks too little.

[0004] With the development of existing image recognition technology, the emergence of methods using image processing to detect water leakage can replace manual periodic inspections. However, the existing technology often detects whether there is a water leakage for qualitative judgment, and rarely performs quantitative detection of the amount of water leakage. For the water pump stuffing box leakage, too much or too little is not conducive to the operation of the water pump, so further quantitative analysis is needed. Summary of the invention

[0005] The object of the present invention is to overcome the above-mentioned shortcomings and provide a method for measuring the leakage of a water pump stuffing box, which can realize real-time online detection of the leakage.

[0006] The technical solution adopted in the present invention is: A method for measuring leakage of a water pump stuffing box comprises the following steps: S1. Place a ruler next to the stuffing box of the water pump, and set up a camera at a suitable location in front of the stuffing box. Adjust the focal length of the camera to ensure that the leakage of the stuffing box and the indication of the ruler can be clearly captured; S2. The camera shoots a short video of a fixed length every half an hour to record the process of water drops falling when the stuffing box leaks in the current period, pre-processes the collected image data, analyzes the images of water drops falling in the pre-processed time series images, selects key frames containing the distance of 1-5 cm from the stuffing box when the water drops fall, and extracts features for identifying the water drops falling; S3. Several collected short videos recording the stuffing box of the water pump are used as corresponding training sample data, and the convolutional neural network is input to distinguish and identify the key frames of the extracted water droplets falling at a distance of 1-5 cm from the stuffing box, so as to build a water pump stuffing box leakage detection model; S4. Use the trained water pump stuffing box leakage detection model to identify the key frame images of water droplets falling, summarize the number of frames in each short video where the water droplets are 1-5 cm away from the stuffing box, and calculate the total number of water droplets leaking from the stuffing box within one minute. The calculation method is as follows: For each short video, process it frame by frame and identify the key frames. The number of key frames identified is the number of water droplets tracked. K ; For each tracked water droplet, record the time point t of its key frame j (where j represents the sequence number of the water drop), then the time interval between two adjacent water droplets is Δt j =t j+1 t j (where j = 1, 2, ..., K 1, K is the total number of water droplets); Determine the sum of the time intervals between drops of all water drops using the formula: ; The total number of water drops per minute is calculated based on the sum of the time intervals and the length of each minute (60 seconds). Let the total number of water drops per minute be N , then: ; S5. According to the total number of water drops per minute and the changing trend of the previous and next time periods, judge the abnormal leakage of the stuffing box. The computer counts the total number of water drops per minute calculated after each test and draws a chart to display the results. The amount of water leaking from the stuffing box per minute is 30-60 drops, which indicates a normal operation of the pump. If the leakage is less than 30 drops per minute, it means that the lubrication and cooling conditions of the pump have deteriorated; if the leakage is more than 60 drops per minute, it means that the pump is leaking too much and an alarm needs to be activated.

[0007] In the above method, the fixed duration of the short video in step S2 is 10 seconds. The preprocessing includes video decomposition, image graying, and image denoising. The video decomposition is used to decompose the captured short video into a series of image frames. The video decomposition uses a video processing library (such as OpenCV) to read the video file and extract it frame by frame.

[0008] The construction of the water pump stuffing box leakage detection model in step S3 is to input the preprocessed image into the alternatingly distributed convolutional layer and pooling layer in the convolutional neural network, obtain the pooled feature map, input the pooled feature map into the fully connected layer in the convolutional neural network, obtain the image feature tensor of the fully connected layer, and then use the softmax function to obtain the probability that the image belongs to each category. Use the back propagation algorithm to pass the loss value back to the network layer by layer, and use the optimization algorithm (such as SGD, Adam, etc.) according to the gradient obtained by back propagation to update the weight and bias of the network to obtain the final model.

[0009] A device for measuring leakage of a water pump stuffing box comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described above are implemented.

[0010] A storage medium for measuring leakage of a water pump stuffing box stores a computer program, which implements the method described above when executed by a processor.

[0011] The beneficial effects of the present invention are: The present invention can utilize image recognition methods to perform quantitative analysis, namely leakage detection, which can not only detect the increase in leakage of the stuffing box, but also detect the decrease in leakage of the stuffing box, filling the gap in the prior art and providing a solid guarantee for the operation of the water pump. In the later stage, it can also be used for leakage detection of water pipes and valves, and has certain application prospects.

[0012] The present invention can monitor and calculate the leakage of the water pump stuffing box in real time online, thereby improving the real-time and accuracy of monitoring. When abnormal situations are found, corresponding measures can be taken in time, thereby ensuring the safe operation of the water pump. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 It is a video image preprocessing flow chart of the present invention; Figure 3 Schematic diagram of the convolutional neural network (CNN) model of the present invention. DETAILED DESCRIPTION

[0014] The present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0015] Embodiment 1 A method for measuring the leakage of a water pump stuffing box comprises the following steps (eg Figure 1 As shown) are as follows: S1. Place a ruler next to the stuffing box of the water pump, and set up a camera at a suitable location in front of the stuffing box. Adjust the focal length of the camera to ensure that the leakage of the stuffing box and the indication of the ruler can be clearly captured: Place a ruler next to the stuffing box of the water pump, and install an image acquisition camera at a suitable position in front of the stuffing box. The image acquisition camera can be a high-definition camera, inspection robot or monitoring equipment to ensure that the leakage of the stuffing box and the scale of the ruler can be clearly photographed. The ruler can be fixed in a vertical or hanging manner, and the specific installation method can be determined according to the actual local conditions.

[0016] S2. The camera shoots a short video of a fixed length every half an hour to record the process of water drops falling when the stuffing box leaks in the current period, pre-processes the collected image data, analyzes the images of water drops falling in the pre-processed time series images, selects key frames containing the distance of 1-5 cm from the stuffing box when the water drops fall, and extracts features for identifying the water drops falling: The camera takes pictures of the leakage of the stuffing box every half an hour, and each picture is taken for 10 seconds to ensure that the process of water dripping when the stuffing box leaks is captured. The collected image data is preprocessed, including video decomposition, image grayscale, image inversion, image denoising, etc., to better improve the image quality and the accuracy of subsequent analysis. The video image preprocessing process of the present invention is as follows: Figure 2 As shown, (1) Video decomposition is used to decompose the captured short video into a series of image frames for subsequent processing. Video decomposition can use a video processing library (such as OpenCV) to read the video file and extract it frame by frame; (2) The decomposed image frame is grayed out for subsequent processing. The gray value of the image is: T=0.299×R+0.587×G+0.114×B, In the formula, T is the grayscale value after conversion, R, G, B are the channel values ​​of red, green, and blue respectively; (3) Invert the image, change the grayscale value of 1 to 0, and change the grayscale value of 0 to 1, set the background image to black, and the water drop itself to white, to highlight the state of the water drop; (4) De-noise the processed image using a median filter algorithm, including a. Select a specific neighborhood size, which is usually a square or rectangle. The size can be adjusted according to actual needs. Common neighborhood sizes are 3×3, 5×5, and 7×7. This neighborhood includes the pixel values ​​around the current pixel. b. Sort the pixel values ​​in the neighborhood by size and find the middle value after sorting. Use the middle value as the new value of the current pixel to replace the original noise pixel value; c. Repeat step b until all pixels in the image are processed; The formula for median filtering can be expressed as: g(x,y)=Med{f(xk,yl),(k,l)∈W} , In the formula, f (xk,yl) is the gray value of the current pixel; g(x,y) is the gray value of the pixel after processing; W is a two-dimensional template usually in a 3×3 or 5×5 area; Med {} represents the median operation. Specifically, it means sorting the set of values ​​in the brackets and taking the value in the middle as the result; (5) In the preprocessed image frame, the image of the water droplets in the preprocessed time series image is analyzed. The process is as follows: a. Select the image of the water drop falling at a distance of 1-5 cm from the stuffing box as the key frame, select the key frame, and extract the most representative features in the key frame for identifying the water drop falling process, such as the shape of the water drop, brightness change, and scale scale; b. Record the occurrence time of the key frame and define the timestamp t of the key frame k : t k ={t|t∈K} where K is the set of key frames; t k Represents the timestamps of all frames identified as keyframes.

[0017] S3. Several short videos of water pump stuffing boxes collected are used as corresponding training sample data, and input into the convolutional neural network to distinguish and identify the key frames of the extracted water droplets falling at a distance of 1-5 cm from the stuffing box, and build a water pump stuffing box leakage detection model: The preprocessed image is input into the alternating convolutional layer and pooling layer in the convolutional neural network to obtain the pooled feature map. The formula for two-dimensional convolution can be expressed as: s(i,j)=(X W)(i,j)=∑ m ∑ n x(i+m,j+n)w(m,n) , in, s(i,j)Represents the position in the output feature map (i,j) The pixel value of x(i+m,j+n) Represents the position in the input image (i+m,j+n) The pixel value of w(m,n) Represents the position in the convolution kernel (m,n) The weight value of .

[0018] Each convolutional layer of the convolutional neural network is connected to a ReLU activation layer corresponding to the convolutional layer to enhance the expressive power of the model. The expression of the ReLU activation function is ReLU(q)=max(0,q), where q represents the output of the activation layer. The convolutional layer uses a 3×3 convolution kernel with a step size of 1. The size of the feature map extracted by the convolutional layer is ((WF) / S)+1, where W is the input size, F is the size of the convolution kernel, and S is the step size.

[0019] After the image passes through the activation layer, it is pooled, and the average value pooling method is used to reduce the dimension of the feature map while retaining the main feature information to improve the robustness and computational efficiency of the model. The pooled feature map is input into the fully connected layer in the convolutional neural network to obtain the image feature tensor of the fully connected layer.

[0020] The image feature tensor of the fully connected layer is input into the last layer in the convolutional neural network, namely the Softmax (output) layer, to obtain the probability that the image belongs to each category; for classification tasks, the output layer usually uses the softmax function to convert the output into a probability distribution.

[0021] After the output, the back propagation algorithm is used to pass the loss value back to the network layer by layer, and based on the gradient obtained by back propagation, the optimization algorithm (such as SGD, Adam, etc.) is used to update the weights and biases of the network.

[0022] The structure diagram of the convolutional neural network (CNN) model is as follows Figure 3 shown.

[0023] In order to train the CNN model to recognize water droplets, a large amount of labeled image data (i.e., key frame images containing water droplets) is required for training. The model parameters (such as the weight and bias of the convolution kernel) are continuously adjusted to minimize the error between the predicted results and the actual labels.

[0024] S4. Use the trained water pump stuffing box leakage detection model to identify the key frame images of water droplets falling, summarize the number of frames in each short video where the water droplets are 1-5 cm away from the stuffing box, and calculate the total number of water droplets leaking from the stuffing box within one minute. The calculation method is as follows: For each short video, process it frame by frame and identify the key frames. The number of key frames identified is the number of water droplets tracked. K; For each tracked water droplet, record the time point t of its key frame j (where j represents the sequence number of the water drop), then the time interval between two adjacent water droplets is Δt j =t j+1 t j (where j = 1, 2, ..., K 1, K is the total number of water droplets); In order to calculate the total number of water drops in one minute, we first need to determine the sum of the time intervals between all the water drops. The formula is: , Then, the total number of water drops per minute is calculated based on the sum of the time intervals and the length of each minute (60 seconds). Let the total number of water drops per minute be N , then: .

[0025] S5. According to the total number of water drops per minute and the changing trend of the previous and next time periods, determine the abnormal leakage of the stuffing box: The computer counts the total number of water drops per minute calculated after each test, and draws a chart to display the analysis results. For a normally operating pump, the amount of water leaking from the stuffing box per minute should be around 30-60 drops. If the leakage is less than or exceeds this range, a timely warning is required.

[0026] Preferably, the analysis results are presented in the form of a table, a line graph, a bar graph, a report or a real-time monitoring interface.

[0027] For the release of early warning information, methods such as but not limited to mobile phones, text messages and phone calls can be used to notify the system's preset management personnel for timely processing.

[0028] Embodiment 2 A device for measuring leakage of a water pump stuffing box comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described in Embodiment 1 above are implemented.

[0029] Example 3 A storage medium for measuring leakage of a water pump stuffing box stores a computer program, which, when executed by a processor, implements the method described in Example 1 above.

[0030] The above description is only a specific implementation mode of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for measuring the leakage of a water pump stuffing box, characterized in that: The steps include: S1. Place a ruler next to the stuffing box of the water pump, and set up a camera at a suitable location in front of the stuffing box. Adjust the focal length of the camera to ensure that the leakage of the stuffing box and the indication of the ruler can be clearly captured; S2. The camera shoots a short video of a fixed length every half an hour to record the process of water drops falling when the stuffing box leaks in the current period, pre-processes the collected image data, analyzes the images of water drops falling in the pre-processed time series images, selects key frames containing the distance of 1-5 cm from the stuffing box when the water drops fall, and extracts features for identifying the water drops falling; S3. Several collected short videos recording the stuffing box of the water pump are used as corresponding training sample data, and the convolutional neural network is input to distinguish and identify the key frames of the extracted water droplets falling at a distance of 1-5 cm from the stuffing box, so as to build a water pump stuffing box leakage detection model; S4. Use the trained water pump stuffing box leakage detection model to identify the key frame images of water droplets falling, summarize the number of frames in each short video where the water droplets are 1-5 cm away from the stuffing box, and calculate the total number of water droplets leaking from the stuffing box within one minute. The calculation method is as follows: For each short video, process it frame by frame and identify the key frames. The number of key frames identified is the number of water droplets tracked. K ; For each tracked water droplet, record the time point t of its key frame j , then the time interval between two adjacent water drops is Δt j =t j+1 t j, j=1,2,…,K 1; Determine the sum of the time intervals between drops of all water drops using the formula: , Calculate the total number of water drops per minute based on the sum of the time intervals and the length of each minute, 60 seconds. Suppose the total number of water drops per minute is N , then: ; S5. Determine the abnormal leakage of the stuffing box based on the total number of water drops per minute and the changing trend of the previous and next time periods.

2. A method for measuring leakage of a water pump stuffing box according to claim 1, characterized in that: The fixed duration of the short video described in step S2 is 10 seconds.

3. A method for measuring leakage of a water pump stuffing box according to claim 1, characterized in that: The preprocessing described in step S2 includes video decomposition, image grayscale, and image denoising.

4. A method for measuring leakage of a water pump stuffing box according to claim 3, characterized in that: The function of the video decomposition is to decompose the captured short video into a series of image frames. The video decomposition uses a video processing library to read the video file and extract it frame by frame.

5. A method for measuring leakage of a water pump stuffing box according to claim 1, characterized in that: The construction of the water pump stuffing box leakage detection model in step S3 is to input the preprocessed image into the alternatingly distributed convolutional layer and pooling layer in the convolutional neural network, obtain the pooled feature map, input the pooled feature map into the fully connected layer in the convolutional neural network, obtain the image feature tensor of the fully connected layer, and then use the softmax function to obtain the probability that the image belongs to each category. Use the back propagation algorithm to pass the loss value back to the network layer by layer, and use the optimization algorithm to update the network weights and biases according to the gradient obtained by back propagation to obtain the final model.

6. A method for measuring leakage of a water pump stuffing box according to claim 1, characterized in that: In step S5, the amount of water leaking from the stuffing box per minute is 30-60 drops for a normal operation of the water pump. If the leakage is less than 30 drops per minute, it means that the lubrication and cooling conditions of the pump have deteriorated; if the leakage is greater than 60 drops per minute, it means that the pump leaks too much and an alarm needs to be activated.

7. A device for measuring leakage of a water pump stuffing box, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

8. A storage medium for measuring leakage of a water pump stuffing box, on which a computer program is stored, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Anti-freezing tap water pipe

    CN203639993U