Vertical oil pipe leakage identification method and system based on principal component analysis and support vector machine, medium and equipment

By combining principal component analysis and support vector machine methods, identifying the leakage location of the vertical oil pipes, solving the problem of inefficiency of traditional detection methods, and achieving high-precision, rapid response and cost-effective leakage detection.

CN119643070APending Publication Date: 2025-03-18CHINA NATIONAL OFFSHORE OIL (CHINA) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411652876.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Traditional vertical oil pipe leakage detection methods are inefficient and have a long delay time, especially in harsh environments or remote oil fields.

Method used

Using a method based on principal component analysis (PCA) and support vector machine (SVM), the sound propagation time signals in the oil pipe are collected, preprocessed and data dimensionality reduction, time domain features are extracted, and feature matrix is ​​constructed as input to the SVM to identify the leakage location.

Benefits of technology

It improves the accuracy and efficiency of leak detection, reduces false positives and false negatives, enhances signal-to-noise ratio, reduces calculation costs, and has fast response performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119643070A_ABST
    Figure CN119643070A_ABST
Patent Text Reader

Abstract

The invention relates to the field of oil pipe leakage detection, and discloses a vertical oil pipe leakage identification method and system based on principal component analysis and a support vector machine, a medium and equipment, and the method comprises the steps: collecting a sound propagation time signal in a vertical oil pipe as a to-be-detected signal; the method comprises the following steps: preprocessing a to-be-detected signal, performing data dimension reduction through principal component analysis to extract corresponding time domain features, and constructing a feature matrix by the extracted time domain features to serve as input of a support vector machine; and inputting feature vectors in the feature matrix into a support vector machine after training optimization, and performing working condition identification on the features by using the support vector machine to determine a leakage position. According to the method, a complex data leakage mode can be identified, and the detection accuracy is improved through continuous iterative optimization of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil pipe leakage detection in the oil and gas industry, and in particular to a method, system, medium and equipment for vertical oil pipe leakage identification based on principal component analysis and support vector machine. Background Art

[0002] In the process of oilfield exploitation, vertical oil pipelines are key facilities for transporting oil and gas. They run through the entire drilling wellbore and directly output and input oil and gas reservoirs. The integrity of vertical oil pipelines is crucial to ensure the effective extraction of oil and gas and prevent resource waste and environmental pollution. However, due to the influence of various internal and external factors, such as corrosion, fatigue cracks, and equipment aging, oil pipeline leakage incidents occur from time to time. Once leaked, it will not only cause the loss of oil and gas resources, but also may bring a series of risks such as fire, environmental pollution and even casualties.

[0003] Traditional vertical pipeline leak detection methods mainly include sound monitoring, chemical marking and pressure testing, etc. These methods either rely on expensive equipment, or have poor environmental sensitivity, or cannot achieve continuous monitoring, and most rely on manual judgment, which makes the leak detection efficiency low and the delay time long, especially in harsh environmental conditions or remote unmanned oil fields. Summary of the invention

[0004] In view of the above problems, the purpose of the present invention is to provide a vertical oil pipeline leakage identification method, system, medium and equipment based on principal component analysis and support vector machine, which can identify complex data leakage patterns and improve the accuracy of detection through continuous iterative optimization of the model.

[0005] To achieve the above-mentioned purpose, the present invention adopts the following technical scheme: a method for identifying vertical oil pipe leakage based on principal component analysis and support vector machine, which comprises: collecting the sound propagation time signal in the vertical oil pipe as the signal to be detected; preprocessing the signal to be detected and performing data dimension reduction through principal component analysis to extract the corresponding time domain features, constructing a feature matrix with the extracted time domain features as the input of the support vector machine; inputting the feature vectors in the feature matrix into the trained and optimized support vector machine, using the support vector machine to identify the working conditions of the features and determine the leakage location.

[0006] Furthermore, the signal to be detected is preprocessed and data dimension reduction is performed through principal component analysis to extract the corresponding time domain features, including:

[0007] Collect n groups of sound propagation time signals x1, x2, ..., x n , each group of signals contains P samples, so a sample matrix x of size n×p can be constructed;

[0008] Standardize the sample matrix x to obtain the standardized matrix X;

[0009] According to the standardized matrix X, the covariance matrix R of the standardized sample is obtained, and the eigenvalues ​​and eigenvectors of the covariance matrix R are calculated;

[0010] The principal component contribution rate and cumulative contribution rate are calculated according to the eigenvalues, and the first m principal components corresponding to the eigenvalues ​​whose cumulative contribution rate is greater than the set value are taken as the extracted time domain features.

[0011] Furthermore, the extracted time domain features are used to construct a feature matrix, including:

[0012] Arrange the eigenvectors into a matrix row by row from top to bottom according to the corresponding eigenvalues, and take the first m rows to form the matrix U;

[0013] Multiply the matrix U by the normalized matrix X to obtain the feature matrix after dimension reduction to m dimensions.

[0014] Furthermore, the contribution rate refers to the proportion of variance explained by a single principal component. The first principal component captures the largest variance, and the contribution rate decreases accordingly. The cumulative contribution rate is the sum of the contribution rates of the first n principal components.

[0015] Furthermore, the training of the support vector machine includes:

[0016] The support vector machine classifier is trained by using the feature vector after dimension reduction through principal component analysis;

[0017] The grid search and cross-validation methods are used to determine the optimal kernel function parameters and regularization parameters to obtain the optimal decision boundary, improve model performance, and optimize the ROC curve.

[0018] Furthermore, an automatic feature selection mechanism is adopted during leak identification to dynamically adjust the feature set input to the SVM model by continuously monitoring the performance of the SVM model and the importance of features, so that the model can adapt to the changing data characteristics and environmental noise.

[0019] Furthermore, the optimization method of the support vector machine includes:

[0020] Select vertical oil pipelines in different regions in different time periods and different noise environments to collect sound signals when leaking and when not leaking to form a sample library, and randomly select a set number of samples from the sample library as training samples and test samples;

[0021] The support vector machine is trained using the features of the training samples to obtain a classifier for leaky samples and non-leakage samples;

[0022] The trained support vector machine classifier is tested using the features of the test samples, and the support vector machine is further optimized based on the test results until the accuracy meets the requirements.

[0023] A vertical oil pipe leakage identification system based on principal component analysis and support vector machine comprises: a signal acquisition module, which collects the sound propagation time signal in the vertical oil pipe as a signal to be detected; a feature extraction module, which preprocesses the signal to be detected and performs data dimension reduction through principal component analysis to extract corresponding time domain features, and constructs a feature matrix with the extracted time domain features as an input of a support vector machine; and an identification module, in which the feature vectors in the feature matrix are input into a trained and optimized support vector machine, and the support vector machine is used to identify the working condition of the features and determine the leakage position.

[0024] A computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any of the above methods.

[0025] A computing device comprises: one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the above methods.

[0026] The present invention adopts the above technical solution, which has the following advantages:

[0027] 1. The present invention has high accuracy: Combining the classification accuracy of SVM and the data simplification capability of PCA, the present invention can more accurately identify true leakage events and reduce false positives and false negatives.

[0028] 2. The present invention can enhance the signal-to-noise ratio: PCA can help suppress irrelevant noise in the data and highlight the signal features related to leakage, thereby enhancing the signal-to-noise ratio of the signal and improving the detection quality.

[0029] 3. The present invention can reduce computational costs: the data after dimensionality reduction can significantly reduce the computational resources required for SVM training and prediction, thereby achieving economical and efficient leakage identification. This is particularly important under limited hardware resources.

[0030] 4. The present invention has fast response performance: Due to the simplification of the model, PCA-SVM can complete the identification of leakage in a shorter time, which helps to timely discover and respond to oil pipeline leakage incidents, thereby reducing potential environmental and property losses.

[0031] 5. The present invention has strong adaptability: SVM has good adaptability when dealing with nonlinear and high-dimensional problems. Combined with PCA's optimization processing of data, the PCA-SVM method can adapt to various complex application scenarios.

[0032] In summary, the vertical oil pipe leakage detection scheme based on PCA-SVM of the present invention can not only improve the accuracy and efficiency of detection, but also reduce economic costs and respond to leakage incidents in a timely manner. It is a highly practical technical solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a flow chart of a vertical oil pipe leakage identification method based on principal component analysis and support vector machine in an embodiment of the present invention;

[0034] Figure 2 is a flow chart of principal component analysis data processing in an embodiment of the present invention;

[0035] Figure 3 1 is a diagram of a leakage simulation experimental device for a vertical oil pipe in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] With the rapid development of data acquisition technology and intelligent analysis methods, the combined method based on principal component analysis (PCA) and support vector machine (SVM) has shown significant potential in the field of vertical oil pipeline leakage detection. This method effectively combines the advantages of PCA in data dimension reduction and feature extraction and the high efficiency of SVM in complex classification problems, providing a new technical solution for oil pipeline leakage identification. Combining PCA and SVM can build a powerful leakage identification system. First, PCA is used to reduce the dimension and extract features of the collected large-scale monitoring data, and then SVM is used to learn and classify the extracted features, so as to achieve accurate identification of vertical oil pipeline leakage. This combined method not only improves the accuracy of identification, but also significantly enhances the model's ability to process high-dimensional data. Therefore, the present invention proposes a vertical oil pipeline leakage identification method, system, medium and equipment based on principal component analysis and support vector machine (SVM), which integrates advanced acoustic signal processing technology and machine recognition algorithm. The present invention includes: collecting and inputting the sound propagation time signal, preprocessing and feature extraction of the input signal, inputting the feature vector into the support vector machine for model training to obtain a classifier, and then inputting the sound propagation time signal into the formed classifier for working condition identification. The method uses principal component analysis (PCA) to propose time domain features, uses the features to construct a feature matrix as the support vector machine input, and uses the support vector machine as a classification standard to identify and output the results. The method can accurately identify and locate pipeline leaks, improve detection efficiency and reliability, and has a significant effect on improving the safety of oil and gas transportation systems, reducing environmental pollution and economic losses.

[0037] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.

[0038] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0039] In one embodiment of the present invention, a method for identifying vertical oil pipe leakage based on principal component analysis and support vector machine is provided, in particular, a method for identifying leakage using a machine learning algorithm is provided, a corresponding time domain feature is proposed based on principal component analysis (PCA), and a feature matrix is ​​constructed using the feature as a support vector machine input, and the support vector machine is used as a classifier to identify the signal and output the result to determine whether the signal is a leakage signal. Specifically, in this embodiment, if Figure 1 As shown, the method comprises the following steps:

[0040] 1) Collecting the sound propagation time signal in the vertical oil pipe as the signal to be detected;

[0041] 2) Preprocessing the signal to be detected and performing data dimension reduction through principal component analysis (PCA) to extract the corresponding time domain features, and constructing a feature matrix with the extracted time domain features as the input of the support vector machine;

[0042] 3) The feature vectors in the feature matrix are input into the trained and optimized support vector machine (SVM), and the support vector machine is used to identify the working conditions of the features and determine the leakage location.

[0043] When used, the present invention uses PCA as a data preprocessing step to reduce the data dimension, propose corresponding time domain features, and highlight the main features of the data, thereby improving the efficiency and accuracy of subsequent processing. Principal component analysis can effectively extract key features and reduce the interference of irrelevant information. Afterwards, SVM is used for classification learning. SVM uses its excellent generalization ability to find the best hyperplane in high-dimensional space to distinguish leaked data from normal data. Through training, the system can identify complex data leakage patterns and improve the accuracy of detection through continuous iterative optimization of the model.

[0044] In the above step 1), it includes real-time acquisition of the sound propagation time signal. The sound signal is acquired using a microphone with high sensitivity and a wide frequency response range, which is arranged at preset positions around the oil pipe. And signal preprocessing is performed on the sound propagation time signal, and the signal preprocessing includes signal amplification, filtering, and denoising to improve the signal's response to leakage events and the signal-to-noise ratio.

[0045] In this embodiment, optionally, the acquisition of the acoustic signal is performed through a sensor array installed at multiple key positions of the vertical oil pipe to ensure that possible leakage sounds can be captured from different angles and positions.

[0046] In the above step 2), the PCA (Principal Components Analysis) adopted in this embodiment, that is, principal component analysis, is a commonly used data analysis method and a dimensionality reduction method often used in image processing. For a set of data that may have a linear correlation relationship between different dimensions, PCA can transform this set of data into data that is linearly independent between each dimension through orthogonal transformation. The relationship between each sample in the data processed by PCA is often more intuitive, so it is a very commonly used data analysis and preprocessing tool. After PCA processing, the data in each dimension is linearly independent. By removing the data in those dimensions with smaller variances, the present invention can achieve the purpose of data dimensionality reduction.

[0047] PCA starts from the original variables and constructs a new set of uncorrelated new variables through rotation transformation (i.e., linear combination of the original variables). These variables explain as much as possible the differences between the original data (i.e., the internal structure of the data), and they become the principal components of the original data. Since these variables are uncorrelated, they each explain a part of the differences without overlap. Sorting them according to the size of the differences when each variable is explained, they become the first principal component, the second principal component, and so on.

[0048] Principal component analysis (PCA) is an effective method for data compression, dimensionality reduction, and denoising based on the covariance matrix of variables. The idea of PCA is to map n-dimensional features to k dimensions (k < n). These k-dimensional features are called principal components (principal elements), which are linear combinations of the old features. These linear combinations maximize the sample variance and try to make the new k features uncorrelated with each other. These k dimensions are brand-new orthogonal features, which are re-constructed k-dimensional features, rather than simply taking out the remaining n - k dimensions of features from the n-dimensional features.

[0049] Specifically, the signal to be detected is preprocessed and data dimensionality reduction is performed through principal component analysis to extract corresponding time-domain features, such as Figure 2 shown, including the following steps:

[0050] 2.1) Collect n groups of sound propagation time signals x1, x2, ..., x n , each group of signals contains P samples, so a sample matrix x of size n×p can be constructed;

[0051]

[0052] 2.2) Standardize the sample matrix x to obtain a standardized matrix X;

[0053] Specifically, calculate the mean and standard deviation S j :

[0054]

[0055] By the mean and standard deviation S j Calculate the standardized data X ij :

[0056]

[0057] Then the original sample matrix is ​​standardized to become the standardized matrix X:

[0058]

[0059] 2.3) Obtain the covariance matrix R of the standardized sample according to the standardized matrix X, and calculate the eigenvalues ​​and eigenvectors of the covariance matrix R;

[0060] The covariance matrix R is:

[0061]

[0062] but:

[0063]

[0064] Using matrix knowledge, find the eigenvalue λ of the covariance R and the corresponding eigenvector a (each eigenvalue corresponds to an eigenvector):

[0065] Ra=λa (6)

[0066] P eigenvalues ​​λ1≥λ2≥…≥λ p ≥0(R is a semi-positive definite matrix, and );

[0067] The P eigenvectors are:

[0068]

[0069] This step can use the function for calculating eigenvalues and eigenvectors in Matlab: eig(R).

[0070] 2.4) Calculate the contribution rate and cumulative contribution rate of the principal components based on the eigenvalues, and select the first m principal components corresponding to the eigenvalues with a cumulative contribution rate greater than the set value as the extracted time-domain features.

[0071] In the above step 2), constructing the feature matrix from the extracted time-domain features further includes the following steps:

[0072] 2.5) Arrange the eigenvectors in a matrix row by row from top to bottom according to the corresponding eigenvalue magnitudes, and take the first m rows to form matrix U;

[0073] 2.6) Multiply matrix U by the standardized matrix X to obtain the feature matrix after dimensionality reduction to m dimensions.

[0074] In the above step 2.4), the contribution rate refers to the proportion of variance explained by a single principal component. The first principal component captures the largest variance, decreasing in turn; the cumulative contribution rate is the sum of the contribution rates of the first n principal components. If the dataset has many features, generally taking 70%-80% can capture most of the information. This needs to be determined according to the characteristics of the data itself, domain knowledge, and the requirements of subsequent tasks.

[0075] Where:

[0076]

[0077] In this embodiment, take the first m principal components (m < p) corresponding to the eigenvalues with a cumulative contribution rate exceeding 80%, then the i-th principal component F i is:

[0078] F i = a 1i X1 + a 2i X2 + … + a pi X p (i = 1, 2, ···, m) (9)

[0079] Arrange the eigenvectors in a matrix row by row from top to bottom according to the corresponding eigenvalue magnitudes, and take the first m rows to form matrix U (retaining the largest m eigenvectors); then: F = UX, which is the data after dimensionality reduction to m dimensions.

[0080] Perform dimensionality reduction preprocessing on the original sound signal through the above principal component analysis (PCA), and then detect and identify the leakage of vertical oil pipes based on the support vector machine.

[0081] In the above step 3), the support vector machine (SVM) used in this embodiment is a powerful supervised learning model, which is widely used in classification and regression analysis. SVM works well in high-dimensional space, especially for solving nonlinear classification problems, and can also be used in pattern recognition, anomaly detection and other fields.

[0082] Specifically, in this embodiment, the training of the support vector machine includes the following steps:

[0083] 3.1.1) Train the support vector machine classifier using the feature vector after dimension reduction through principal component analysis;

[0084] 3.1.2) Grid search and cross-validation methods are used to determine the optimal kernel function parameters and regularization parameters to obtain the optimal decision boundary, improve model performance, optimize the ROC curve, and ensure the accuracy and generalization ability of leakage identification.

[0085] In this embodiment, an automatic feature selection mechanism is used during leakage identification to dynamically adjust the feature set input to the support vector machine model by continuously monitoring the performance of the support vector machine model and the importance of features, so that the model can adapt to the changing data features and environmental noise.

[0086] In the above step 3), the optimization method of the support vector machine includes the following steps:

[0087] 3.2.1) Select vertical oil pipelines in different regions at different time periods and under different noise environments to collect sound signals when leaking and when not leaking to form a sample library, and randomly select a set number of samples from the sample library as training samples and test samples;

[0088] 3.2.2) Using the features of the training samples to train the support vector machine, a classifier for leaky samples and non-leakage samples is obtained;

[0089] 3.2.3) Use the features of the test samples to test the trained support vector machine classifier, and further optimize the support vector machine based on the test results until the accuracy meets the requirements.

[0090] In this embodiment, specifically, it is assumed that the processed sound signal training sample set data is (x i ,y i ), where 1<=i<=N, the separating hyperplane is: f(x)=w T x+b=0 (w is the normal vector of the hyperplane, b is the bias term), where w and b determine the position of the hyperplane. The setting conditions are:

[0091] y i (w T·x+b)=1 (10)

[0092] The samples that meet the above conditions are called support vectors (y i is the category label, whose value is 1 or -1).

[0093] The sample optimization problem is actually the problem of solving the optimal classification hyperplane. The steps are as follows:

[0094] Find the optimal hyperplane:

[0095] w T ·x+b (i.e. find the parameters w and b) (11)

[0096] Find the maximum geometric separation:

[0097]

[0098] Add slack variables and find the maximum geometric interval:

[0099]

[0100] In most cases, data is often not completely separable linearly. By relaxing the variables, the SVM model allows a certain amount of classification error while maintaining the maximum interval. This improves the generalization ability of the model for actual complex data. C is the regularization parameter. The larger the value of C, the fewer misclassified points, but overfitting may occur.

[0101] Integrate the constraints into the optimization objective function and establish the Lagrangian formula:

[0102]

[0103] The optimization objective function becomes:

[0104] The above objective function satisfies the KKT condition: The KKT condition is a necessary and sufficient condition for a nonlinear programming problem to have an optimal solution.

[0105] Find the dual problem:

[0106] Find the minimum value of w, b, ξ, that is, find the partial derivative of w, b, ξ and set its value to 0, and we get:

[0107]

[0108] Substituting the above equation back into L(w,b,α), we get the dual problem of the optimization problem:

[0109]

[0110] By taking the derivative of α, we can find the maximum value of W(α) and use the SMO algorithm.

[0111] The core of the SOM algorithm is to train the network in a self-organizing way to achieve visualization and dimensionality reduction of high-dimensional data, which can reveal the intrinsic structure and pattern of the data.

[0112] After calculation, the classification function is:

[0113]

[0114] For the case of nonlinear separability, a mapping function (called kernel function in SVM) can be used to map the low-dimensional input space Rm to the high-dimensional feature space Y, so that the linearly inseparable problem in the low-dimensional space is transformed into a linearly separable problem in the high-dimensional space. At this time, the dual problem of the optimization problem is:

[0115]

[0116] Among them, K(x,z) is the kernel function, and <,> is the vector inner product. For nonlinear separable problems, it is necessary to select a suitable kernel function K<●> to construct the SVM model.

[0117] Using formula (18), the corresponding decision function is:

[0118]

[0119] The factors that determine the performance of the SVM model are the kernel function and the regularization parameter C. The kernel functions of SVM are mainly divided into linear kernel, polynomial kernel, sigmoid kernel and radial basis kernel. Figure 3 The figure shows a leakage simulation experimental device of a vertical oil pipe, which shows the acquisition process of normal signals and leakage signals of the vertical oil pipe. According to the characteristics of the vertical oil pipe leakage sound signal and the generalization ability of the SVM model, the present invention selects the radial basis kernel as the kernel function. The expression of the radial basis kernel function is:

[0120]

[0121] The main parameters of the radial basis function (RBF) kernel are (penalty parameter C) and (kernel function "width" parameter γ). Parameter C determines the tolerance of the model to errors, and the value of C is usually 2 -5 ,2 -4 ,…,2 15 The parameter γ affects the distribution of data after it is mapped to the new feature space. The value of γ is usually 2 -15 , 2 -14 ,…,2 5. These parameters are optimized through methods such as cross-validation and grid search to increase the generalization ability of the model and achieve the best model performance. The following are two optimization methods:

[0122] Grid search is a method of finding the best parameters by traversing a given parameter combination. In SVM using RBF kernel, is the penalty parameter, which controls the model's tolerance for misclassification; controls the width of the RBF kernel, which affects the distribution of the data after it is mapped to the new feature space. Grid search systematically explores multiple values ​​of and parameters, trains a new SVM model for each pair of parameter combinations, and evaluates its performance.

[0123] Cross-validation is a model evaluation method that evaluates the performance of a model by splitting a dataset into several parts, one of which is used as training data and the other as test data, and improves the accuracy and stability of the evaluation through multiple splitting and evaluation processes. The most commonly used is k-fold cross-validation, in which the dataset is divided into k subsets, k-1 subsets are used as training data each time, and the remaining subset is used as test data. This process is repeated k times, and a different subset is selected as test data each time.

[0124] In one embodiment of the present invention, a vertical oil pipe leakage identification system based on principal component analysis and support vector machine is provided, which includes:

[0125] A signal acquisition module collects the sound propagation time signal in the vertical oil pipe as a signal to be detected;

[0126] The feature extraction module preprocesses the signal to be detected and performs data dimension reduction through principal component analysis to extract the corresponding time domain features, and constructs a feature matrix with the extracted time domain features as the input of the support vector machine;

[0127] In the recognition module, the feature vectors in the feature matrix are input into the trained and optimized support vector machine, and the support vector machine is used to identify the working conditions of the features and determine the leakage location.

[0128] In the above embodiment, the signal to be detected is preprocessed and data dimension reduction is performed through principal component analysis to extract corresponding time domain features, including:

[0129] Collect n groups of sound propagation time signals x1, x2, ..., x n , each group of signals contains P samples, so a sample matrix x of size n×p can be constructed;

[0130] Standardize the sample matrix x to obtain the standardized matrix X;

[0131] According to the standardized matrix X, the covariance matrix R of the standardized sample is obtained, and the eigenvalues ​​and eigenvectors of the covariance matrix R are calculated;

[0132] The principal component contribution rate and cumulative contribution rate are calculated according to the eigenvalues, and the first m principal components corresponding to the eigenvalues ​​whose cumulative contribution rate is greater than the set value are taken as the extracted time domain features.

[0133] In this embodiment, the extracted time domain features are used to construct a feature matrix, including:

[0134] Arrange the eigenvectors into a matrix by row from top to bottom according to the corresponding eigenvalues, and take the first m rows to form the matrix U;

[0135] Multiply the matrix U by the normalized matrix X to obtain the feature matrix after dimension reduction to m dimensions.

[0136] In this embodiment, the contribution rate refers to the proportion of variance explained by a single principal component, the first principal component captures the largest variance, and the contribution rate decreases successively; the cumulative contribution rate is the sum of the contribution rates of the first n principal components.

[0137] In the above embodiment, the training of the support vector machine includes:

[0138] The support vector machine classifier is trained by using the feature vector after dimension reduction through principal component analysis;

[0139] The grid search and cross-validation methods are used to determine the optimal kernel function parameters and regularization parameters to obtain the optimal decision boundary, improve model performance, and optimize the ROC curve.

[0140] In this embodiment, an automatic feature selection mechanism is used during leakage identification to dynamically adjust the feature set input to the support vector machine model by continuously monitoring the performance of the support vector machine model and the importance of features, so that the model can adapt to the changing data features and environmental noise.

[0141] In the above embodiment, the optimization method of the support vector machine includes:

[0142] Select vertical oil pipelines in different regions in different time periods and different noise environments to collect sound signals when leaking and when not leaking to form a sample library, and randomly select a set number of samples from the sample library as training samples and test samples;

[0143] The support vector machine is trained using the features of the training samples to obtain a classifier for leaky samples and non-leakage samples;

[0144] The trained support vector machine classifier is tested using the features of the test samples, and the support vector machine is further optimized based on the test results until the accuracy meets the requirements.

[0145] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.

[0146] In one embodiment of the present invention, a computing device is provided, which may be a terminal, and may include: a processor, a communication interface, a memory, a display screen, and an input device. Among them, the processor, the communication interface, and the memory communicate with each other through a communication bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory, and the non-volatile storage medium stores an operating system and a computer program. When the computer program is executed by the processor, the method in each of the above embodiments is implemented; the internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a management network, NFC (near field communication) or other technologies. The display screen may be a liquid crystal display screen or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computing device, or an external keyboard, touchpad or mouse, etc. The processor may call the logic instructions in the memory.

[0147] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, 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, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each 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.

[0148] In one embodiment of the present invention, a computer program product is provided, wherein the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments.

[0149] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores server instructions, and the computer instructions enable a computer to execute the methods provided in the above embodiments.

[0150] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0151] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0152] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0154] 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 embodiments of the present invention.

Claims

1. A vertical oil pipe leakage identification method based on principal component analysis and support vector machine, characterized in that: include: Collecting the sound propagation time signal in the vertical oil pipe as the signal to be detected; The signal to be detected is preprocessed and data dimension reduction is performed through principal component analysis to extract the corresponding time domain features, and the extracted time domain features are used to construct a feature matrix as the input of the support vector machine; The feature vectors in the feature matrix are input into the trained and optimized support vector machine, and the support vector machine is used to identify the working conditions of the features and determine the leakage location.

2. The vertical oil pipe leakage identification method based on principal component analysis and support vector machine as claimed in claim 1, characterized in that: The signal to be detected is preprocessed and data dimension reduction is performed through principal component analysis to extract the corresponding time domain features, including: Collect n groups of sound propagation time signals x1, x2, ..., x n , each group of signals contains P samples, so a sample matrix x of size n×p can be constructed; Standardize the sample matrix x to obtain the standardized matrix X; According to the standardized matrix X, the covariance matrix R of the standardized sample is obtained, and the eigenvalues ​​and eigenvectors of the covariance matrix R are calculated; The principal component contribution rate and cumulative contribution rate are calculated according to the eigenvalues, and the first m principal components corresponding to the eigenvalues ​​whose cumulative contribution rate is greater than the set value are taken as the extracted time domain features.

3. The vertical oil pipe leakage identification method based on principal component analysis and support vector machine as claimed in claim 2 is characterized in that: The extracted time domain features are used to construct a feature matrix, including: Arrange the eigenvectors into a matrix by row from top to bottom according to the corresponding eigenvalues, and take the first m rows to form the matrix U; Multiply the matrix U by the normalized matrix X to obtain the feature matrix after dimension reduction to m dimensions.

4. The vertical oil pipe leakage identification method based on principal component analysis and support vector machine as claimed in claim 2, characterized in that: The contribution rate refers to the proportion of variance explained by a single principal component. The first principal component captures the largest variance, and the contribution rate decreases successively. The cumulative contribution rate is the sum of the contribution rates of the first n principal components.

5. The vertical oil pipe leakage identification method based on principal component analysis and support vector machine as claimed in claim 1, characterized in that: Support vector machine training, including: The support vector machine classifier is trained by using the feature vector after dimension reduction through principal component analysis; The grid search and cross-validation methods are used to determine the optimal kernel function parameters and regularization parameters to obtain the optimal decision boundary, improve model performance, and optimize the ROC curve.

6. The vertical oil pipe leakage identification method based on principal component analysis and support vector machine as claimed in claim 5, characterized in that: An automatic feature selection mechanism is used during leak identification to continuously monitor the performance of the support vector machine model. Function and characteristics The importance of dynamically adjusting the feature set input to the support vector machine model makes the model adapt to changing data characteristics and environmental noise.

7. The vertical oil pipe leakage identification method based on principal component analysis and support vector machine as claimed in claim 1, characterized in that: Support vector machine optimization methods include: Select vertical oil pipelines in different regions in different time periods and different noise environments to collect sound signals when leaking and when not leaking to form a sample library, and randomly select a set number of samples from the sample library as training samples and test samples; The support vector machine is trained using the features of the training samples to obtain a classifier for leaky samples and non-leakage samples; The trained support vector machine classifier is tested using the features of the test samples, and the support vector machine is further optimized based on the test results until the accuracy meets the requirements.

8. A vertical oil pipe leakage identification system based on principal component analysis and support vector machine, characterized in that: include: A signal acquisition module collects the sound propagation time signal in the vertical oil pipe as a signal to be detected; The feature extraction module preprocesses the signal to be detected and performs data dimension reduction through principal component analysis to extract the corresponding time domain features, and constructs a feature matrix with the extracted time domain features as the input of the support vector machine; In the recognition module, the feature vectors in the feature matrix are input into the trained and optimized support vector machine, and the support vector machine is used to identify the working conditions of the features and determine the leakage location.

9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 7.

10. A computing device, characterized in that include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods described in claims 1 to 7.