Method and system for monitoring leaks in port oil pipelines

By constructing a machine learning model to process pipeline sound signals, the blind spots and equipment deployment limitations of existing pipeline leak monitoring technologies have been solved, enabling non-intrusive online monitoring, improving the effectiveness and flexibility of leak detection, and adapting to the safety operation and maintenance needs of port oil pipelines.

CN122258307APending Publication Date: 2026-06-23TIANJIN RES INST FOR WATER TRANSPORT ENG M O T
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610365104.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-24
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technologies for pipeline leak monitoring have blind spots and limitations in equipment deployment, making it difficult to achieve non-invasive, online monitoring and affecting the effectiveness and flexibility of detection.

Method used

A machine learning model is constructed to identify leaks and their patterns by collecting and processing sound signals from pipeline operation. This includes building an experimental equipment system to simulate different leak patterns, collecting sound signals, performing preprocessing and feature extraction, and using the random forest algorithm to build a model to achieve non-invasive online monitoring.

Benefits of technology

It enables rapid identification and type determination of pipeline leaks, improves the effectiveness and flexibility of detection, provides intelligent diagnostic support, and adapts to the leak monitoring needs under different pressures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122258307A_ABST
    Figure CN122258307A_ABST
Patent Text Reader

Abstract

The application discloses a kind of port oil pipeline leakage monitoring method and system, belong to pipeline defect monitoring technical field.The port oil pipeline leakage monitoring method, comprising the following steps: constructing machine learning model for identifying pipeline leakage and its mode;Real-time monitoring the sound signal of port oil pipeline, and the sound signal is input into the machine learning model;Whether the oil pipeline leaks and the leakage mode are judged by the machine learning model whether the oil pipeline leaks and the leakage mode are judged by model;Machine learning model includes the following steps: initial model is constructed using random forest algorithm, decision boundary is determined, to obtain trained machine learning model, and the trained machine learning model is verified using the test set Performance.The port oil pipeline leakage monitoring method of the application can realize non-invasive, online monitoring of pipeline, thereby improving the effectiveness and flexibility of pipeline leakage monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline defect detection technology, specifically to a method and system for monitoring leaks in port oil pipelines. Background Technology

[0002] Pipeline transportation is a core mode of transporting modern energy sources such as oil and natural gas, offering excellent stability and reliability. However, due to the high pressure, flammability, and explosiveness of the media transported in pipelines (crude oil, refined oil, natural gas, etc.), pipeline leakage is a major risk in oil and gas pipeline operations. Once a pipeline leaks, it can lead to a series of secondary hazards such as fires and explosions, severely impacting personnel, equipment, the environment, and reputation of enterprises. Deliberate damage to pipelines, pipeline corrosion and perforation, and malfunctions of attached equipment (especially safety valves, pressure reducing valves, and pressure gauges) can all cause pipeline leaks. Therefore, monitoring oil and gas pipeline leaks, especially research on early warning technologies, is crucial for ensuring the safe and stable operation of ports.

[0003] Pipeline leaks can be monitored using monitoring equipment. Common monitoring methods include direct leak detection methods such as infrared, ground-penetrating radar, and fiber optic distributed monitoring (temperature, vibration). Some studies also rely on indirect leak detection methods such as monitoring changes in upstream and downstream pressure, flow rate, and negative pressure waves.

[0004] However, the application of the above-mentioned equipment monitoring methods is often limited in practical applications because leaks are easily blocked by flanges and valves, creating blind spots in detection, or because fiber optic cables or pressure flow meters need to be installed before the pipeline is put into operation. Summary of the Invention

[0005] The purpose of this invention is to overcome the problems in the prior art and provide a method for monitoring leaks in port oil pipelines. This method enables non-invasive, online monitoring of pipelines, avoids structural limitations of pipeline system components, and improves the effectiveness and flexibility of pipeline leak detection.

[0006] This invention provides a method for monitoring leaks in port oil pipelines, comprising the following steps: A machine learning model is constructed to identify pipeline leaks and their patterns; the sound signals of the port oil pipeline are monitored in real time and input into the machine learning model; the sound signals are processed by the machine learning model to determine whether the oil pipeline is leaking and the leakage pattern. Building a machine learning model for identifying pipeline leaks and their patterns involves the following steps: An experimental equipment system was set up to simulate different leakage modes of the pipeline under a predetermined pressure. The experimental equipment system was started and multiple sets of sound signals were collected from the experimental equipment system under different leakage modes. The collected multiple sets of sound signals are preprocessed to improve the signal-to-noise ratio of the multiple sets of sound signals; features are extracted from each set of sound signals to extract multiple sound signal features, including multiple Mel-frequency cepstral coefficients, multiple time-domain features, and multiple frequency-domain features; the sound signal features of the multiple sets of sound signals are aggregated to form an audio feature dataset; the audio feature dataset is divided into a training set and a test set according to a predetermined ratio; An initial model is constructed using the random forest algorithm, and the initial model is iteratively optimized using the training set to determine the decision boundary, thereby obtaining a trained machine learning model. The performance of the trained machine learning model is then verified using the test set.

[0007] Preferably, when extracting features from each group of sound signals, the plurality of Mel frequency cepstral coefficients include 12th-order MFCC parameters and the first and second derivatives of each MFCC parameter, generating a total of 36 MFCC features, of which 7 are time-domain features and 6 are frequency-domain features.

[0008] Preferably, after feature extraction of the audio signal is completed, the correspondence between each audio signal feature and different leakage modes is plotted in a graph, and obviously irrelevant audio signal features are eliminated. When training the model, leave-one-out cross-validation is used to examine the impact of each audio signal feature on the model prediction results one by one, and audio signal features that do not contribute to the model or have a negative contribution are eliminated to narrow down the range of audio signal features. Using the importance assessment function of audio signal features of the random forest algorithm, the initially screened audio signal features are ranked by weight, and a screening threshold of 0.95 is set for the cumulative importance parameter. The core audio signal features with a cumulative importance ratio of 95% are retained to obtain a simplified audio feature dataset for subsequent model training.

[0009] Preferably, when constructing the decision tree, eight sound signal features are randomly sampled from the extracted multiple sound signal features to participate in the splitting decision, and the minimum number of leaf nodes in the decision tree is four.

[0010] Preferably, when preprocessing the acquired sound signal, at least 30 seconds of background noise data are collected before starting the experimental equipment system, and the frequency domain characteristics of the noise signal are analyzed. During the preprocessing of the sound signal, the sound signal is framed and windowed according to the frequency domain characteristics of the noise signal to improve the signal-to-noise ratio of the sound signal.

[0011] Preferably, during the preprocessing of the audio signal, the noise power and the resulting frequency range are calculated. Then, a bandpass filter is selected based on the frequency range of the noise to suppress the noise. Next, the noise power is subtracted from the spectrum of the audio signal using spectral subtraction. Finally, an adaptive threshold is used to remove noise frame by frame.

[0012] Preferably, the experimental equipment system collects multiple sets of sound signals under different hydraulic conditions and different leakage modes under each hydraulic condition.

[0013] This invention also provides a system for monitoring leaks in port oil pipelines, including a pressurizing water pump and a pressure stabilizing tank. The pressurizing water pump is connected to a water supply source, and the pressure stabilizing tank is connected to the pressurizing water pump via a pipeline. The pressure stabilizing tank is used to maintain the water in the pipeline at a predetermined pressure. The system also includes: A pipeline leakage defect simulation valve is installed on the pipeline. The pipeline leakage defect simulation valve is connected to the atmosphere. By changing the defect fittings inside the pipeline leakage defect simulation valve, the connection state between the pipeline and the atmosphere can be changed, thereby simulating the leakage point state when there is a pipeline defect and the leakage point state when there is a defect at different diameters. The sound signal acquisition unit includes a microphone, a data sampling module, and a signal conditioner. The microphone is used to detect the original sound signal at its location. The microphone is electrically connected to the data sampling module, which is used to sample the original sound signal at a predetermined sampling rate. The signal conditioner is electrically connected to the data sampling module and is used to preprocess the sampled sound signal. A computer is electrically connected to the signal conditioner. The computer has a data analysis module, which contains the machine learning model. The data analysis module is used to train and test the model using pre-processed sound signals. The machine learning model can analyze the pattern of pipe leakage based on the input pre-processed sound signals.

[0014] Preferably, the microphone is fixed on a tripod at a position approximately 10cm-50cm away from the pipeline leakage defect simulation valve, the microphone is 0.9m-1.1m above the ground, and the microphone is pointed towards the pipeline leakage defect simulation valve.

[0015] Preferably, a pressure gauge and a check valve are installed between the pressurizing water pump and the pressure stabilizing tank.

[0016] Compared with the prior art, the beneficial effects of the present invention are: the port oil pipeline leakage monitoring method of the present invention can simulate port oil pipeline leakage and build a machine learning model. Then, relying on the machine learning model, it can quickly determine whether the pipeline is leaking, as well as the type and extent of the leakage, simply by collecting the pipeline's operating sound signal. This achieves non-invasive, online monitoring, avoids the structural limitations of pipeline system components, and thus improves the effectiveness and flexibility of leakage detection.

[0017] This port oil pipeline leakage monitoring method lays the foundation for subsequent sound signal-based leakage monitoring and early warning in port liquid chemical terminals, pipelines, and pipe corridors. It establishes a set of scalable and implementable sound signal-based artificial intelligence leakage early warning model parameters, thereby providing intelligent diagnostic support for the safe operation and maintenance of port oil pipelines. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the structure of the present invention; Figure 2 This is a table of defect states simulated under different leakage modes in this invention. Figure 3 This is a sequence list of different leakage modes under different pipeline pressures according to the present invention; Figure 4 This is a slice processing table for the sound signal preprocessing stage of the present invention; Figure 5 This is a preliminary processing diagram of the sound signal, including frame segmentation and windowing, according to the present invention. Figure 6 This is a flowchart of the sound signal processing for a 1mm diameter point leakage in the pipeline leakage simulation experiment of this invention; Figure 7 This is a diagram showing the time-domain and frequency-domain characteristic values ​​of the sound signal of leakage in the pipeline of the present invention under a medium pressure of 0.4 MPa, as a function of six different leakage states. Figure 8 The leave-one-out cross-validation method of this invention examines the impact of each feature dimension on the model's prediction. Detailed Implementation

[0019] The following is in conjunction with the appendix Figures 1-7 The specific embodiments of the present invention will be described in detail below, but it should be understood that the scope of protection of the present invention is not limited to the specific embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0020] like Figures 1-7 As shown, the present invention provides a method for monitoring leaks in port oil pipelines, comprising the following steps: A machine learning model is constructed to identify pipeline leaks and their patterns; the sound signals of the port oil pipeline are monitored in real time and input into the machine learning model; the sound signals are processed by the machine learning model to determine whether the oil pipeline is leaking and the leakage pattern. Building a machine learning model for identifying pipeline leaks and their patterns involves the following steps: An experimental equipment system was set up to simulate different leakage modes of the pipeline under a predetermined pressure. The experimental equipment system was started and multiple sets of sound signals were collected from the experimental equipment system under different leakage modes. The collected multiple sets of sound signals are preprocessed to improve the signal-to-noise ratio of the multiple sets of sound signals; features are extracted from each set of sound signals to extract multiple sound signal features, including multiple Mel-frequency cepstral coefficients, multiple time-domain features, and multiple frequency-domain features; the sound signal features of the multiple sets of sound signals are aggregated to form an audio feature dataset; the audio feature dataset is divided into a training set and a test set according to a predetermined ratio; An initial model is constructed using the random forest algorithm, and the initial model is iteratively optimized using the training set to determine the decision boundary, thereby obtaining a trained machine learning model. The performance of the trained machine learning model is then verified using the test set.

[0021] The working principle of the above embodiments is briefly described below: The port's oil pipeline leakage monitoring method is based on a core process of stable water supply, multi-condition leakage simulation, sound signal acquisition and analysis, and random forest model early warning, which enables accurate identification of the leakage status of port oil pipelines.

[0022] Before the experiment began, an experimental equipment system was constructed, consisting of a pressure stabilizing tank, a pressurizing water pump, pipelines, a pipeline leakage defect simulation valve, a sound signal acquisition unit, and a computer (containing a machine learning model). All drain and vent valves on the pipeline were closed. The inlet of the pressurizing water pump was connected to a tap water supply, and the pump was started to pressurize the pressure stabilizing tank, raising the pressure inside the pipeline to predetermined pressures of 0.4 MPa, 0.6 MPa, and 0.8 MPa. The pressure stabilizing tank maintained stable pipeline pressure through an air-filled diaphragm, simulating a pressurized oil pipeline transport scenario at a port. Subsequently, the pressurizing water pump and related valves were shut off to maintain stable medium and pressure within the pipeline.

[0023] By replacing the six defect fittings of the pipeline leakage defect simulation valve on the pipeline, different leakage modes can be simulated. Opening the "leakage mode regulating valve" in front of the corresponding defect fitting can simulate working conditions such as pitting leakage (point defects with a diameter of 0.5mm-5mm) and weld corrosion leakage (line defects with a width of 0.5mm-20mm).

[0024] During the sound signal acquisition phase, CY-211 microphones are first deployed. The microphones should be placed close to the pipeline, at a distance of 10cm-50cm and a height of approximately 1m, avoiding noise sources such as motors and pressure tanks. First, 30 seconds of background noise are collected, followed by sound signals under normal pipeline conditions as baseline data. Then, valves with different defective fittings are opened sequentially, and the microphones detect sound signals under predetermined pressure conditions for different leakage modes. Each signal detection session lasts at least 30 seconds, with a detection rate set to 96kHz to ensure data reliability.

[0025] The detected sound signal needs to be preprocessed to improve the signal-to-noise ratio. First, the original signal is sliced ​​into 1-second sample data. Then, the sample data undergoes subsequent signal processing and feature extraction. The number of samples in this experiment is as follows: Figure 4 As shown, the sample data is resampled at 16kHz, and segmented using a 40ms frame length, 50% inter-frame overlap, and Hamming window. Then, a four-step noise suppression process is employed: first, the noise power is estimated from the first 100ms of signal-free segments; then, a 200Hz-8kHz bandpass filter is used to suppress out-of-band noise; next, spectral subtraction is used to eliminate the background noise spectrum; finally, an adaptive threshold is used to remove silent and noise segments frame by frame, resulting in a clean and effective signal.

[0026] After preprocessing, multi-dimensional feature extraction was performed on the audio signal, yielding a total of 49 features. These include 36-dimensional time-frequency domain features, namely the 12th-order Mel-frequency cepstral coefficients and their first and second derivatives; 7-dimensional time-domain features, such as short-time energy and peak values; and 6-dimensional frequency-domain features, such as spectral centroid and spectral bandwidth. Features were filtered using data visualization and leave-one-out cross-validation, and then a random forest model was used to retain core features with a cumulative importance threshold of 0.95 to form an audio feature dataset.

[0027] The audio feature dataset was divided into training and test sets in an 8:2 ratio. The training set was then used to train a random forest model. This model consists of 300 decision trees, with each tree randomly selecting 8 features for splitting. The minimum number of leaf nodes was set to 4, and a multi-tree voting mechanism was used to reduce the risk of overfitting. The model's decision boundary was iteratively optimized using the training set, and the model performance was validated using the test set. The final model achieved an accuracy of 84.21% in identifying mild, moderate, and severe leakage states.

[0028] This invention discloses a port oil pipeline leakage monitoring method that can simulate pipeline leaks and construct a machine learning model. This model allows for rapid determination of pipeline leakage, including its type and extent, simply by collecting the pipeline's operational sound signals. This non-invasive, online monitoring method enhances the effectiveness and flexibility of leak detection. Furthermore, this method lays the foundation for subsequent sound signal-based leak monitoring and early warning systems at port liquid chemical terminals, pipelines, and pipe corridors, establishing a set of scalable and implementable sound signal-based AI-powered leak early warning model parameters. Ultimately, this provides intelligent diagnostic support for the safe operation and maintenance of port oil pipelines.

[0029] As a preferred embodiment, when extracting features from each group of sound signals, the multiple Mel-frequency cepstral coefficients include 12th-order MFCC (Melt-Frequency Cepstral Coefficient) parameters and the first and second derivatives of each MFCC parameter, generating a total of 36 MFCC features, including 7 time-domain features and 6 frequency-domain features. Specifically, when extracting features from each group of sound signals, the 12th-order MFCC parameters are extracted, and the first and second derivatives of each parameter are calculated, ultimately generating 36 time-frequency domain features. Simultaneously, seven time-domain features (mean square, standard deviation, peak value, energy, variance, root square amplitude, RMS value, average variance, average kurtosis, average sound pressure level, and average energy entropy of the sound signal) and six frequency-domain features (FFT is performed on the time-domain signal to obtain the spectrum, and frequency domain indicators such as centroid frequency, root mean square frequency, frequency standard deviation, self-power spectral density, average spectral bandwidth, average spectral flux, average leakage energy percentage, average peak density, and mid-frequency energy percentage of the sound signal are extracted) are formed, creating a 49-dimensional multi-dimensional feature matrix. This optimized scheme, by refining the extraction dimensions of time- and frequency-domain features, supplements the dynamic change information of the sound signal, allowing the feature matrix to more comprehensively characterize the acoustic differences of different leakage states in the pipeline, and improving the accuracy of subsequent models in identifying leakage states.

[0030] As a preferred option, such as Figure 8As shown, after feature extraction of the audio signal, the correspondence between each audio signal feature and different leakage modes is plotted into a chart to visually determine whether the audio signal feature has discriminative power, and obviously irrelevant audio signal features are eliminated. During model training, leave-one-out cross-validation is used to examine the impact of each audio signal feature on the model's prediction results, eliminating audio signal features that do not contribute to the model or have a negative contribution, thus narrowing the range of audio signal features. Using the importance assessment function of the random forest algorithm, the initially screened audio signal features are weighted and ranked, with a cumulative importance parameter of 0.95 set as the screening threshold. Core audio signal features with a cumulative importance ratio of 95% are retained to obtain a simplified audio feature dataset for subsequent model training. After audio signal feature extraction, the correspondence between each feature and different leakage modes is first plotted into a visual chart to visually eliminate features without discriminative power. During the model training phase, as... Figure 1 As shown, leave-one-out cross-validation is used to verify the impact of each feature on the model's prediction results, eliminating features that contribute no or negatively. Then, the feature importance assessment function of the random forest algorithm is used to weight and rank the initially screened features, setting a cumulative importance threshold of 0.95 to retain core features and form a concise audio feature dataset. This optimized approach, through two steps of screening to eliminate redundant and interfering features, reduces the computational cost of model training while allowing the model to focus on key features, improving the accuracy and stability of leakage state judgment.

[0031] As a preferred option, such as Figure 7 As shown, when constructing the decision tree, eight audio signal features are randomly sampled from the extracted multiple audio signal features to participate in the splitting decision (one of the eight features is selected as the root node, and the remaining seven are internal nodes). The minimum number of leaf nodes in the decision tree is four. When constructing the decision tree for the random forest model, each decision tree is configured to randomly sample eight features for splitting decisions, with one feature serving as the root node and the remaining seven as internal nodes. The minimum number of leaf nodes is also set to four. This preferred scheme enhances the randomness of feature selection and reduces redundant interference between features by limiting the number of features sampled in a single decision tree. Setting a reasonable minimum number of leaf nodes balances the model's classification accuracy and computational efficiency, avoids overfitting or underfitting, and further improves the model's sensitivity and generalization ability in capturing key leaked features.

[0032] As a preferred option, such as Figure 5As shown, during the preprocessing of the acquired sound signal, at least 30 seconds of background noise data are collected before starting the experimental equipment system, and the frequency domain characteristics of the noise signal are analyzed. During the sound signal preprocessing, the sound signal is framed and windowed according to the frequency domain characteristics of the noise signal to improve the signal-to-noise ratio of the sound signal. Before starting the experimental equipment system, at least 30 seconds of background noise data are collected in advance, and the frequency domain characteristics of the noise signal are analyzed. In the sound signal preprocessing stage, based on the frequency domain characteristics of the noise, frame parameters of 40ms frame length and 50% inter-frame overlap are specifically set, and Hamming windows are used for windowing processing. This preferred scheme, based on noise characteristics, customizes the frame-segmentation and windowing strategy, reduces the aliasing of noise signals and effective sound signals, improves the signal-to-noise ratio of the sound signal, and allows the subsequently extracted features to more realistically reflect the acoustic characteristics of the pipeline leak.

[0033] As a preferred option, such as Figure 6 As shown, in the preprocessing of the audio signal, the noise power and its resulting frequency range are calculated. Then, a bandpass filter is selected based on the noise's frequency range to suppress it. Next, spectral subtraction is used to subtract the noise power from the audio signal's spectrum. Finally, an adaptive threshold is used to remove noise frame by frame. In the audio signal preprocessing, the background noise power and frequency range are first calculated, and a 200Hz~8kHz bandpass filter with 60dB stopband attenuation is designed accordingly to strongly suppress out-of-band noise. Then, spectral subtraction is used to subtract the estimated noise power from the original signal's spectrum, initially eliminating the noise's influence. Finally, an adaptive threshold is set based on the signal-to-noise ratio (SNR), and the signal segment attributes are judged frame by frame. Silent or noisy segments below the threshold are directly removed. The adaptive threshold is set based on the SNR of the signal frame. The process involves calculating the SNR of each frame, setting a dynamic threshold range, and identifying and removing frames with an SNR below the lower limit of the range as noise frames. This preferred solution achieves precise noise removal through a four-step noise suppression process, significantly improving the purity of the effective sound signal and providing a high-quality data foundation for feature extraction and model training.

[0034] As a preferred option, such as Figure 3As shown, the experimental equipment system collects multiple sets of sound signals under different hydraulic conditions and for different leakage modes under each hydraulic condition. During the setup of the experimental equipment system, the pressure inside the pipeline is precisely adjusted to different predetermined pressures such as 0.4 MPa, 0.6 MPa, and 0.8 MPa through the coordinated control of the pressure stabilizing tank and the pressurizing water pump. Under each predetermined pressure condition, six different defective components are switched sequentially to simulate different leakage modes, and multiple sets of corresponding sound signals are collected. This preferred solution, by covering multiple hydraulic and leakage mode combinations, enriches the scenario diversity of the audio feature dataset, enabling the trained early warning model to adapt to the leakage monitoring needs of port oil pipelines under different pressures, and improving the model's practical application adaptability.

[0035] This invention also provides a system for monitoring leaks in port oil pipelines, including a pressurizing water pump and a pressure stabilizing tank. The pressurizing water pump is connected to a water supply source, and the pressure stabilizing tank is connected to the pressurizing water pump via a pipeline. The pressure stabilizing tank is used to maintain the water in the pipeline at a predetermined pressure. The system also includes: A pipeline leakage defect simulation valve is installed on the pipeline. The pipeline leakage defect simulation valve is connected to the atmosphere. By changing the defect fittings inside the pipeline leakage defect simulation valve, the connection state between the pipeline and the atmosphere can be changed, thereby simulating the leakage point state when there is a pipeline defect and the leakage point state when there is a defect at different diameters. The sound signal acquisition unit includes a microphone, a data sampling module, and a signal conditioner. The microphone is used to detect the original sound signal at its location. The microphone is electrically connected to the data sampling module, which is used to sample the original sound signal at a predetermined sampling rate. The signal conditioner is electrically connected to the data sampling module and is used to preprocess the sampled sound signal. A computer is electrically connected to the signal conditioner. The computer has a data analysis module, which contains the machine learning model. The data analysis module is used to train and test the model using pre-processed sound signals. The machine learning model can analyze the pattern of pipe leakage based on the input pre-processed sound signals.

[0036] The pipeline leakage defect simulation valve uses six defective components to simulate different leakage conditions. Figure 2The displayed pipeline leakage defect simulates the defect state of the valve; the core microphone is model CY-2111 / 2. For pump testing, a free-field type (suitable for directional sound sources) microphone is used with a sensitivity of 50mV / Pa. The microphone's frequency response range is 6.3Hz~20kHz (covering the audible range of 20Hz~20kHz). The data sampling module uses an NI data acquisition card (National Instruments data acquisition card), which has analog input channels and constant current source power supply capabilities. The sampling rate is at least 2.56 times the highest analysis frequency (according to the Nyquist sampling theorem). For anti-aliasing, it is usually set to more than 4 times the target highest frequency. Currently, the sampling rate is set to 96kHz, which meets the requirement of 4 times the highest possible analysis frequency. The NI data acquisition card is a 24-bit ADC (analog-to-digital converter) to ensure dynamic range. The NI data acquisition card can simultaneously acquire 4 channels of acoustic or vibration signals (if measured simultaneously). The NI data acquisition card has a built-in ICP power supply or anti-aliasing filter. Computer and Analysis Software: The data analysis module uses SignalPad software, which is compatible with NI acquisition cards, and MATLAB for data analysis, filtering, feature extraction, machine learning, and other tasks.

[0037] As a preferred option, such as Figure 1 As shown, the microphone is fixed on a tripod at a distance of approximately 10cm-50cm from the simulated pipeline leak valve, with the microphone 0.9m-1.1m above the ground and pointing towards the simulated pipeline leak valve. Sound wave propagation is directional and affected by reflection and background noise. The microphone placement principles are: close to the sound source, avoid reflective surfaces (such as the ground or walls), reduce background noise interference, avoid obvious noise sources within the system such as motors, pressure relief valves, and pressure stabilizing tanks, and securely mount the microphone on the tripod to ensure its position remains unchanged throughout the experiment.

[0038] As a preferred option, such as Figure 1 As shown, a pressure gauge and a check valve are installed between the pressurizing water pump and the pressure stabilizing tank. The pressure gauge allows for real-time monitoring to determine if the pressure in the pipeline has reached the predetermined level.

[0039] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.

Claims

1. A method for monitoring leaks in port oil pipelines, characterized in that, Includes the following steps: A machine learning model is constructed to identify pipeline leaks and their patterns; the sound signals of the port oil pipeline are monitored in real time and input into the machine learning model; the sound signals are processed by the machine learning model to determine whether the oil pipeline is leaking and the leakage pattern. Building a machine learning model for identifying pipeline leaks and their patterns involves the following steps: An experimental equipment system was set up to simulate different leakage modes of the pipeline under a predetermined pressure. The experimental equipment system was started and multiple sets of sound signals were collected from the experimental equipment system under different leakage modes. The collected multiple sets of sound signals are preprocessed to improve the signal-to-noise ratio of the multiple sets of sound signals; features are extracted from each set of sound signals to extract multiple sound signal features, including multiple Mel-frequency cepstral coefficients, multiple time-domain features, and multiple frequency-domain features; the sound signal features of the multiple sets of sound signals are aggregated to form an audio feature dataset; the audio feature dataset is divided into a training set and a test set according to a predetermined ratio; An initial model is constructed using the random forest algorithm, and the initial model is iteratively optimized using the training set to determine the decision boundary, thereby obtaining a trained machine learning model. The performance of the trained machine learning model is then verified using the test set.

2. The port oil pipeline leakage monitoring method as described in claim 1, characterized in that, When extracting features from each group of sound signals, the multiple Mel frequency cepstral coefficients include 12th-order MFCC parameters and the first and second derivatives of each MFCC parameter, generating a total of 36 MFCC features, of which 7 are time-domain features and 6 are frequency-domain features.

3. The port oil pipeline leakage monitoring method as described in claim 2, characterized in that, After feature extraction of the sound signal is completed, the correspondence between each sound signal feature and different leakage modes is plotted in a chart, and obviously irrelevant sound signal features are eliminated. When training the model, leave-one-out cross-validation is used to examine the impact of each sound signal feature on the model prediction results one by one, and sound signal features that do not contribute to the model or have a negative contribution are eliminated to narrow the range of sound signal features. By leveraging the importance assessment function of the random forest algorithm for audio signal features, the initially screened audio signal features are weighted and sorted. A screening threshold of 0.95 is set for the cumulative importance parameter, and core audio signal features with a cumulative importance ratio of 95% are retained to obtain a simplified audio feature dataset for subsequent model training.

4. The port oil pipeline leakage monitoring method as described in claim 3, characterized in that, When constructing the decision tree, eight sound signal features are randomly sampled from the extracted multiple sound signal features to participate in the splitting decision, and the minimum number of leaf nodes in the decision tree is four.

5. The port oil pipeline leakage monitoring method as described in claim 1, characterized in that, Before starting the experimental equipment system, at least 30 seconds of background noise data are collected and the frequency domain characteristics of the noise signal are analyzed. During the preprocessing of the sound signal, the sound signal is divided into frames and windowed according to the frequency domain characteristics of the noise signal in order to improve the signal-to-noise ratio of the sound signal.

6. The port oil pipeline leakage monitoring method as described in claim 5, characterized in that, In the process of preprocessing the audio signal, the noise power and the resulting frequency range are calculated. Then, a bandpass filter is selected based on the frequency range of the noise to suppress the noise. Next, the noise power is subtracted from the spectrum of the audio signal using spectral subtraction. Finally, an adaptive threshold is used to remove noise frame by frame.

7. The port oil pipeline leakage monitoring method as described in claim 1, characterized in that, The experimental equipment system collects multiple sets of sound signals under different hydraulic conditions and different leakage modes under each hydraulic condition.

8. A system used in the port oil pipeline leakage monitoring method as described in claim 1, comprising a pressurizing water pump and a pressure stabilizing tank, wherein the pressurizing water pump is connected to a water supply source, and the pressure stabilizing tank is connected to the pressurizing water pump via a pipeline, and the pressure stabilizing tank is used to maintain the water in the pipeline at a predetermined pressure, characterized in that... Also includes: A pipeline leakage defect simulation valve is installed on the pipeline. The pipeline leakage defect simulation valve is connected to the atmosphere. By changing the defect fittings inside the pipeline leakage defect simulation valve, the connection state between the pipeline and the atmosphere can be changed, thereby simulating the leakage point state when there is a pipeline defect and the leakage point state when there is a defect at different diameters. The sound signal acquisition unit includes a microphone, a data sampling module, and a signal conditioner. The microphone is used to detect the original sound signal at its location. The microphone is electrically connected to the data sampling module, which is used to sample the original sound signal at a predetermined sampling rate. The signal conditioner is electrically connected to the data sampling module and is used to preprocess the sampled sound signal. A computer is electrically connected to the signal conditioner. The computer has a data analysis module, which contains the machine learning model. The data analysis module is used to train and test the model using pre-processed sound signals. The machine learning model can analyze the pattern of pipe leakage based on the input pre-processed sound signals.

9. The system as described in claim 8, characterized in that, The microphone is fixed on a tripod at a position approximately 10cm-50cm away from the simulated pipeline leakage defect valve, with the microphone 0.9m-1.1m above the ground and pointing towards the simulated pipeline leakage defect valve.

10. The system as described in claim 8, characterized in that, A pressure gauge and a check valve are installed between the pressurizing water pump and the pressure stabilizing tank.