Pipeline defect detection method, device and equipment and storage medium
By extracting and classifying ultrasonic signal components and establishing a defect prediction model, the problem of high misjudgment rate of ultrasonic detection during pipe bends or inclined ports is solved, and more accurate defect detection and future defect prediction are achieved.
Patent Information
- Application Number
- CN202510182860.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-03
AI Technical Summary
Existing ultrasonic pipeline detection technology can easily lead to signal attenuation and distortion when the pipe has bent or inclined openings, and the misjudgment rate is high, making it difficult to accurately detect defects.
By obtaining the ultrasonic signal of the pipeline, extracting signal components, classifying signal types, deleting the same signal type, marking it as defect type, obtaining signal characteristics, establishing a defect prediction model, and predicting future defect characteristics.
It reduces the chance of defect misjudgment, improves detection accuracy, can predict pipeline defects in advance, and reduces losses.
Smart Images

Figure CN120084873A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pipeline detection, and particularly to a method, device, equipment and storage medium for defect detection of pipelines. Background Art
[0002] With the acceleration of the urbanization process and the continuous improvement of infrastructure, the pipeline system, as an important part of industrial and urban infrastructure, undertakes the important task of transporting media such as liquids and gases, and its safety and reliability are crucial; however, long-term operation and external environmental impacts are likely to cause various defects in pipelines, such as corrosion, cracks, deformation, aging, construction damage, etc. If these defects are not discovered and processed in time, they will affect public safety and environmental protection.
[0003] In order to be able to nondestructively detect whether a pipeline has defects, ultrasonic detection is usually used to achieve nondestructive detection.
[0004] Ultrasonic pipeline detection is a nondestructive detection method that uses ultrasonic technology to detect internal defects of pipelines. In ultrasonic testing, ultrasonic waves can propagate in pipeline materials at a certain speed and direction. When encountering heterogeneous interfaces with different acoustic impedances (such as defects or the bottom surface of the object under test, etc.), reflection, refraction, and waveform conversion will occur. Using these reflection, refraction, and diffraction and other information, the internal defects of pipeline materials, such as cracks, slag inclusions, shrinkage cavities, etc., can be evaluated, and the location and size of the defects can be roughly judged. Ultrasonic pipeline detection has the advantages of non-destructiveness, high efficiency, and accuracy. It will not cause any damage to the pipeline and can complete the detection task without destroying the pipeline structure. At the same time, ultrasonic detection is fast, and a large number of pipelines can be detected in a short time, greatly improving the detection efficiency. In addition, ultrasonic detection also has high accuracy and can accurately detect tiny defects inside the pipeline.
[0005] In practical applications, ultrasonic pipeline detection is mostly used for straight pipelines. When there are bends (elbows) or beveled ends in the pipeline, ultrasonic waves will generate multiple reflections and refractions when passing through these areas, resulting in signal attenuation and distortion, affecting the accuracy of detection. In addition, some residual waves may be generated at the bends, further reducing the signal-to-noise ratio and making the misjudgment rate of ultrasonic detection relatively large. Summary of the Invention
[0006] The main purpose of the present application is to provide a method, device, equipment and storage medium for defect detection of pipelines to solve the problem of relatively large misjudgment rate of ultrasonic detection when there are bends (elbows) or beveled ends in the pipeline in the prior art.
[0007] To achieve the above purpose, the present application provides the following technical solutions:
[0008] A defect detection method for pipelines, which is applied to a number of pipelines of the same specification. The defect detection method includes:
[0009] Step S1, obtaining ultrasonic signals of at least two detection parts of each pipeline respectively through an external ultrasonic detector based on a number of preset time periods;
[0010] Step S2, extracting a number of signal components of each ultrasonic signal respectively;
[0011] Step S3, classifying all signal components of the same detection part to obtain at least two signal types;
[0012] Step S4, deleting all the same signal types based on the current detection part and marking the remaining signal types as defect types;
[0013] Step S5, obtaining the signal characteristics of each signal component in each defect type as defect characteristics respectively;
[0014] Step S6, obtaining the pipelines corresponding to each defect type respectively and marking them as defective pipelines;
[0015] Step S7, obtaining the environmental temperature, environmental humidity, environmental light duration, the environmental light intensity, and the pH value of the environmental medium of all defective pipelines based on a number of preset time periods;
[0016] Step S8, analyzing the linear regression relationships between all signal characteristics and all environmental temperatures, all environmental humidities, all environmental light durations, all environmental light intensities, and all pH values of the environmental medium to obtain a defect prediction model;
[0017] Step S9, predicting the future defect characteristics of at least one step based on a preset number of prediction steps through the defect prediction model.
[0018] As a further improvement of the present application, step S2, extracting a number of signal components of each ultrasonic signal respectively, includes:
[0019] Step S21, obtaining all the maximum values and all the minimum values of the current ultrasonic signal;
[0020] Step S22, connecting all the maximum values in sequence to form an upper envelope line;
[0021] Step S23, connecting all the minimum values in sequence to form a lower envelope line;
[0022] Step S24, obtaining the average value of the upper envelope line and the lower envelope line to form an average line;
[0023] Step S25: Subtract the current mean envelope from the current ultrasonic signal to obtain a first-order intermediate signal;
[0024] Step S26: Repeat steps S21 to S25 several times to iterate the first-order intermediate signal several times;
[0025] Step S27: Respectively obtain the first-order intermediate signals whose difference between the number of extreme points and the number of zero-crossing points after each iteration is 0 or 1, and mark them as second-order intermediate signals;
[0026] Step S28: Obtain the second-order intermediate signal with a zero mean line and define it as the signal component of the current ultrasonic signal.
[0027] As a further improvement of this application, in step S3, classify all signal components of the same detection site to obtain at least two signal types, including:
[0028] Step S31: Define a signal set to be classified based on all signal components for the same detection site;
[0029] Step S32: Define a category set according to the preset signal types;
[0030] Step S33: Calculate the conditional probabilities of the signal set to be classified under each preset signal type;
[0031] Step S34: Classify each signal component into the preset signal type with the highest conditional probability for each;
[0032] Step S35: Delete the preset signal types without signal components to obtain at least two signal types.
[0033] As a further improvement of this application, in step S8, analyze the linear regression relationships between all signal features and all environmental temperatures, all environmental humidities, all environmental light durations, all environmental light intensities, and all pH values of the environmental media to obtain a defect prediction model, including:
[0034] Step S81: Define one signal feature as a dependent variable;
[0035] Step S82: Define all environmental temperatures, all environmental humidities, all environmental light durations, all environmental light intensities, and all pH values of the environmental media within a preset time period as a set of independent variables;
[0036] Step S83: Define the linear regression relationship between the dependent variable and all independent variables within the same preset time period through a multiple linear regression model;
[0037] Step S84: Solve all linear regression coefficients of the multiple linear regression model;
[0038] Step S85: Substitute all the obtained regression coefficients into the multiple linear regression model to obtain the defect prediction model.
[0039] As a further improvement of the present application, in step S6, pipes corresponding to each defect type are respectively obtained and marked as defective pipes. After that, it includes:
[0040] Step S10: Obtain the geographical locations of all defective pipes and send them to an external monitoring terminal.
[0041] As a further improvement of the present application, in step S9, based on a preset number of prediction steps, the future defect features for at least one step are predicted through the defect prediction model. After that, it includes:
[0042] Step S100: Obtain the pipes corresponding to the future defect features and mark them as pipes where future defects may occur;
[0043] Step S200: Send the future defect features and the corresponding future timestamps to an external monitoring terminal;
[0044] Step S300: Obtain the geographical locations of all pipes where future defects may occur and send them to an external monitoring terminal.
[0045] To achieve the above object, the present application also provides the following technical solutions:
[0046] A defect detection device for pipes, the defect detection device is applied to the defect detection method as described above, and the defect detection device includes:
[0047] A pipeline ultrasonic signal acquisition module, configured to respectively acquire ultrasonic signals of at least two detection parts of each pipeline through an external ultrasonic detector based on a plurality of preset time periods;
[0048] An ultrasonic signal component extraction module, configured to respectively extract a plurality of signal components of each ultrasonic signal;
[0049] A signal component classification module, configured to classify all signal components of the same detection part to obtain at least two signal types;
[0050] A defect type marking module, configured to delete all the same signal types based on the current detection part and mark the remaining signal types as defect types;
[0051] A defect feature marking module, configured to respectively obtain the signal features of each signal component in each defect type as defect features;
[0052] A defective pipe marking module, configured to respectively obtain the pipes corresponding to each defect type and mark them as defective pipes;
[0053] A defective pipeline environmental element acquisition module, configured to acquire the environmental temperature, environmental humidity, environmental light duration, the environmental light intensity, and the pH value of the environmental medium of all defective pipelines based on a plurality of preset time periods;
[0054] A defect prediction model acquisition module, configured to analyze the linear regression relationships between all signal features and all environmental temperatures, all environmental humidities, all environmental light durations, all environmental light intensities, and all pH values of the environmental medium, to obtain a defect prediction model;
[0055] A future defect feature acquisition module, configured to predict future defect features for at least one step through the defect prediction model based on a preset prediction step.
[0056] To achieve the above object, the present application also provides the following technical solutions:
[0057] An electronic device, including a processor and a memory coupled to the processor, where the memory stores program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the defect detection method of the pipeline as described above.
[0058] To achieve the above object, the present application also provides the following technical solutions:
[0059] A storage medium, in which program instructions are stored, and when the program instructions are executed by a processor, they can implement the defect detection method of the pipeline as described above.
[0060] This application obtains ultrasonic signals of at least two detection parts of each pipeline through an external ultrasonic detector based on several preset time periods; extracts several signal components of each ultrasonic signal; classifies all signal components of the same detection part to obtain at least two signal types; deletes all the same signal types based on the current detection part, and marks the remaining signal types as defect types; obtains the signal characteristics of each signal component in each defect type as defect characteristics respectively; obtains the pipelines corresponding to each defect type and marks them as defective pipelines respectively; obtains the ambient temperature, ambient humidity, ambient light duration, ambient light intensity, and ambient medium pH value of all defective pipelines based on several preset time periods; analyzes the linear regression relationships between all signal characteristics and all ambient temperatures, all ambient humidities, all ambient light durations, all ambient light intensities, and all ambient medium pH values to obtain a defect prediction model; predicts future defect characteristics for at least one step based on the preset prediction steps through the defect prediction model. This application uses all pipelines of the same specification (all pipelines of the same specification have bends) as control references for each other. By deleting the same ultrasonic signal characteristics (such as conventional propagation in straight sections, conventional refraction and reflection at bends, etc.), the remaining signals without the same type are identified as abnormal characteristics (such as corrosion, cracks, deformation, aging, construction damage, etc.), enabling ultrasonic detection to refer to signal characteristics for pipelines with bends, and deleting all normal reflections and refractions as normal signals, reducing the probability of misjudging defects. At the same time, this application conducts a linear regression analysis on pipelines of the same specification to achieve defect prediction of pipelines, enabling early awareness of possible upcoming defects in pipelines before the defects actually occur, and taking corresponding measures in advance to further reduce the losses caused by defects. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a schematic flowchart of the steps of an embodiment of the method for defect detection of pipelines in this application;
[0062] Figure 2 It is a schematic diagram of the functional modules of an embodiment of the device for defect detection of pipelines in this application;
[0063] Figure 3 It is a schematic structural diagram of an embodiment of the electronic device in this application;
[0064] Figure 4 It is a schematic structural diagram of an embodiment of the storage medium in this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0065] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application.
[0066] The terms "first", "second", and "third" in the present application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first", "second", and "third" may explicitly or implicitly include at least one of such features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of the present application are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0067] Referring to "embodiment" herein means that a specific feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase does not necessarily refer to the same embodiment at every occurrence in the specification, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0068] As Figure 1 shown, this embodiment provides an embodiment of a method for detecting defects in pipelines. In this embodiment, the defect detection method is applied to a number of pipelines of the same specification.
[0069] Preferably, this embodiment focuses on detecting pipelines with bends, and the technical solution provided in this embodiment can also be used for the detection of straight pipelines.
[0070] Specifically, the defect detection method includes the following steps:
[0071] Step S1, obtaining ultrasonic signals of at least two detection parts of each pipeline through an external ultrasonic detector based on a number of preset time periods.
[0072] Preferably, both the preset time period and the preset prediction steps in the following text can be set to one natural day.
[0073] Preferably, during the actual detection process, when ultrasonic signals are propagating, reflecting, or refracting, due to interference from medium factors or environmental factors, etc., the signals are missing to varying degrees. Therefore, the collected ultrasonic signals can be preprocessed, such as signal interpolation, reconstruction, or supplementary detection using other detection means, etc., to ensure the accuracy and reliability of subsequent analysis.
[0074] Step S2: Extract several signal components of each ultrasonic signal respectively.
[0075] Preferably, the signal components can be obtained through empirical mode decomposition. The empirical mode decomposition (EMD) algorithm is based on the concepts of instantaneous frequency and intrinsic mode function (IMF). Empirical mode decomposition can decompose a complex signal into several IMF components, and each IMF characterizes the local features of the signal. It decomposes the signal based on the time-scale characteristics of the data itself without the need to preset any basis functions in advance, so it has self-adaptability. The advantage of empirical mode decomposition is that it does not use any predefined functions as the basis, but adaptively generates intrinsic mode functions according to the analyzed signal. It can be used to analyze non-linear and non-stationary signal sequences, and has a high signal-to-noise ratio and good time-frequency focusing.
[0076] Step S3: Classify all the signal components of the same detection part to obtain at least two signal types.
[0077] Preferably, the defect signals detected by ultrasonic waves have diversity, characteristic features, and recognizability.
[0078] Among them, diversity: The defect signals detected by ultrasonic waves have various forms, which depend on factors such as the type, shape, size, and orientation of the defects. Different characteristics will appear in the ultrasonic signals, such as a sharp drop, sudden change, or slow change in sound speed and amplitude.
[0079] Characteristic features: Different types of defects have unique waveform features in ultrasonic signals. For example, the waveform of white dot defects is like a forest, with clear and sharp wave peaks; for internal cracks, depending on the direction and position of the cracks, there may be a situation where there is no bottom wave and no flaw wave, or there may be features such as strong waveform reflection, wide wave bottom, and branched wave peaks; for shrinkage cavities and shrinkage cavity residues, the flaw waves are strongly reflected, the wave bottom is wide, and often the bottom wave disappears; the flaw waves of inclusions may be single pulses or multiple, presenting a forest-like wave, etc.
[0080] Identifiability: Although defect signals are diverse and complex, professional ultrasonic testing equipment and experienced testers can accurately identify and analyze these signals, thereby locating, quantifying, and qualitatively evaluating the defects. For example, by using a digital ultrasonic detector and a suitable probe, typical waveforms of defects such as cracks, incomplete penetration, and slag inclusions can be captured, and then the nature and severity of the defects can be judged.
[0081] Preferably, when ultrasonic testing encounters a pipe bend, the signal characteristics are mainly manifested as a gradual change in sound velocity and amplitude in a trend, and the PSD (which may refer to a parameter related to the waveform or signal, but the specific meaning needs to be determined in combination with the context or professional knowledge) does not change strongly. During the detection process, if directly observed from the waveform, it may be misjudged as having a large range of defects. However, by observing the changes in PSD and the changes in the sound velocity and amplitude curves, it can be found that this change is caused by the skew of the acoustic pipe rather than a real defect.
[0082] Step S4, based on the current detection part, delete all the same signal types, and mark the remaining signal types as defect types.
[0083] Preferably, Bayesian classification can be adopted in this embodiment. Bayesian classification is a non-rule-based classification method. Bayesian classification technology trains on a subset of the classified samples, learns and induces a classification function (predicting discrete variables is called classification, and classifying continuous variables is called regression), and uses the trained classifier to classify unclassified data. Among different classification algorithms, the Naive Bayes classification algorithm is a simple Bayesian classification algorithm, and the application effect of the Naive Bayes classification algorithm is better than that of the neural network classification algorithm and the decision tree classification algorithm. Especially when the amount of data to be classified is very large, the Bayesian classification method has a high accuracy rate compared with other classification algorithms. The design intention of preferring the Naive Bayes classification algorithm rather than the neural network classification algorithm in this embodiment lies in the high accuracy rate.
[0084] Preferably, the signal features are mainly divided into three time-domain features: short-time energy, zero-crossing rate, and empirical permutation entropy; and six frequency-domain features: spectral centroid, spectral spread, spectral entropy, spectral flux, spectral roll-off point, and Mel frequency cepstral coefficients.
[0085] Preferably, one or two of the above features can be selected in this embodiment. If too many features are selected, it is easy to cause a sudden increase in the amount of calculation, and it is easy to cause the computer to freeze and become unresponsive during actual application.
[0086] Preferably, one or two of short-time energy, zero-crossing rate, spectral centroid, and spectral flux can be used in this embodiment to reduce the detection difficulty.
[0087] Preferably, in order to further reduce the computing power burden, the signal features can be one-dimensional features that are easier to obtain, such as phase features, polarity features, amplitude features, time-frequency features, and wavelet packet features.
[0088] Preferably, the signal features of the abnormal signal components can be directly obtained through the PRPD spectrogram, and the PRPD spectrogram is a mature existing technology. The specific extraction of the above one-dimensional features is also an existing technology, which will not be elaborated in this embodiment.
[0089] Step S5: Obtain the signal features of each signal component in each defect type as defect features respectively.
[0090] Step S6: Obtain the pipelines corresponding to each defect type respectively and mark them as defective pipelines.
[0091] Step S7: Obtain the ambient temperature, ambient humidity, ambient light duration, ambient light intensity, and ambient medium pH of all defective pipelines based on a number of preset time periods.
[0092] Preferably, the environmental factors in step S7 can be directly measured.
[0093] Step S8: Analyze the linear regression relationships between all signal features and all ambient temperatures, all ambient humidities, all ambient light durations, all ambient light intensities, and all ambient medium pH values to obtain a defect prediction model.
[0094] Preferably, LASSO linear regression is preferred in this embodiment.
[0095] Step S9: Predict the future defect features for at least one step based on the preset prediction steps through the defect prediction model.
[0096] Furthermore, in step S2, several signal components of each ultrasonic signal are extracted respectively, which specifically includes the following steps:
[0097] Step S21: Obtain all the maximum values and all the minimum values of the current ultrasonic signal.
[0098] Step S22: Connect all the maximum values in sequence to form an upper envelope line.
[0099] Step S23: Connect all the minimum values in sequence to form a lower envelope line.
[0100] Step S24: Obtain the average value of the upper envelope line and the lower envelope line to form a mean line.
[0101] Step S25: Subtract the current mean envelope line from the current ultrasonic signal to obtain a first-order intermediate signal.
[0102] Step S26, repeat steps S21 to S25 several times to iterate the first-order intermediate signal several times.
[0103] Step S27, respectively obtain the first-order intermediate signals whose difference between the number of extreme points and the number of zero-crossing points after each iteration is 0 or 1, and mark them as second-order intermediate signals.
[0104] Preferably, the signal component, that is, the Intrinsic Mode Functions (IMF), is each layer of signal components obtained after the original signal is decomposed by EMD.
[0105] Step S28, obtain the second-order intermediate signal with a zero mean line and define it as the signal component of the current ultrasonic signal.
[0106] It can be understood that the steps of Empirical Mode Decomposition (EMD) mainly include the following points:
[0107] ① Extreme point extraction: First, find the local maximum and local minimum of the signal. These local maximum and minimum values respectively represent the peak and valley of the signal's fluctuation at different time points.
[0108] ② Construct upper and lower envelope lines: Use the extracted local maximum and minimum values to construct the upper and lower envelope lines of the signal respectively. These two envelope lines completely enclose the signal and are tangent to the signal at the extreme points.
[0109] ③ Extract the mean function: Calculate the average of the upper and lower envelope lines to obtain the mean function. This mean function represents the average trend of the signal at the current time scale.
[0110] ④ Iterative decomposition: Subtract the mean function from the original signal to obtain a new signal that removes the average trend. Then, repeat the above steps for the new signal, that is, extract extreme points again, construct envelope lines, extract the mean function, and subtract the mean function again. This process will be iterated until the Intrinsic Mode Function (IMF) that meets certain conditions is obtained.
[0111] ⑤ Determine the Intrinsic Mode Function (IMF): During the iterative decomposition process, when the obtained new signal meets the conditions of the IMF, it is considered that an IMF component has been decomposed. The IMF component represents the local feature information of the signal at a specific time scale. Then, continue to perform iterative decomposition on the remaining signal until all IMF components are extracted.
[0112] ⑥ Reconstruct the signal: Add all the extracted IMF components and the residual (that is, the last remaining signal part) to reconstruct the original signal. This process verifies the perfect reconstruction property of the EMD method, that is, the decomposed signal can reconstruct the original signal without distortion.
[0113] ⑦ Through the above steps, empirical mode decomposition can decompose complex non-stationary signals into a finite number of intrinsic mode functions with local characteristics of different time scales, thus facilitating further analysis and processing of the signals.
[0114] Further, in step S3, all signal components of the same detection part are classified to obtain at least two signal types, which specifically include the following steps:
[0115] Step S31, define the signal set to be classified based on all signal components according to the same detection part.
[0116] Preferably, the signal set to be classified can be expressed as X = {x 1 , x 2 , …, x j , …, x m}, where x j is the j-th signal component and m is the number of all signal components.
[0117] Step S32, define the category set according to the preset signal types.
[0118] Preferably, the category set can be expressed as C = {y 1 , y 2 , …, y k , …, y n}, where y k is the k-th preset signal type in the category set C and n is the number of types of all preset signal types.
[0119] Step S33, calculate the conditional probabilities of the signal set to be classified under each preset signal type.
[0120] Preferably, the conditional probabilities of the signal set to be classified under each preset signal type can be calculated by the following formula:
[0121]
[0122] Among them, P(x|y j ) is the conditional probability of the signal set to be classified x under the j-th preset signal type; P(y j ) is the marginal probability of the j-th preset signal type; P(x i |y j ) is the conditional probability of the i-th signal component under the j-th preset signal type.
[0123] It should be noted that the meanings of the formulas and symbols in the above additional content are only for principle explanation and are not interoperable with the meanings of other formulas and symbols.
[0124] Step S34: Classify each signal component into the preset signal type with the highest conditional probability for each respective component.
[0125] Step S35: Delete the preset signal types without signal components to obtain at least two signal types.
[0126] Preferably, the Naive Bayes classification assumes that the presence of a specific feature in a class is independent of the presence of any other feature, that is, each feature is independent of each other. Therefore, it has constraints on the actual situation. If there is an association between attributes, the classification accuracy will decrease, but in the actual application process, the classification effect of Naive Bayes is relatively accurate. Naive Bayes solves, for a given item to be classified, the probability of each category occurring under the condition that this item appears, and whichever is the largest is considered that the item to be classified belongs to that category.
[0127] Specifically, the Bayesian classification process is as follows:
[0128] ① Let \(x = \{a 1 , a 2 , a 3 , \cdots, a n \}\) be an item to be classified, and each \(a\) is a feature of \(x\).
[0129] ② There is a class set \(c = \{y 1 , y 2 , y 3 , \cdots, y m \}\).
[0130] ③ Calculate \(P(y 1 |x), P(y 2 |x), \cdots, P(y m |x)\).
[0131] ④ If \(P(y k |x) = \max\{P(y 1 |x), P(y 2 |x), \cdots, P(y m |x)\}\), then \(x \in y k \).
[0132] ⑤ Then calculate each conditional probability in step ③ through the following steps:
[0133] ⑥ Find a set of items to be classified with known classifications, and this set is called the training sample set.
[0134] ⑦ Statistically obtain the conditional probability estimates of each feature attribute under each category. That is:
[0135] P(a 1 |y 1 ), P(a 2 |y1 ), ……, P(a n |y 1 )
[0136] P(a 1 |y 2 ), P(a 2 |y 2 ), ……, P(a n |y 2 );
[0137] ……
[0138] P(a 1 |y m ), P(a 2 |y m ), ……, P(a n |y m );
[0139] ⑧ Assume that each characteristic attribute is conditionally independent. Then, according to Bayes' theorem, we have:
[0140] P(y i |x) = P(x|y i )P(y i ) / P(x).
[0141] ⑨ Since the denominator is a constant for all classes, we only need to maximize the numerator. Also, because the characteristic attributes are conditionally independent, then:
[0142] P(x|y i )P(y i ) = P(a 1 |y i )P(a 2 |y i ) …… P(a n |y i )P(y i ).
[0143] It should be noted that the above preferred content is for principle explanation, and its symbol meanings are not interoperable with those of other formulas in this embodiment.
[0144] Furthermore, in step S8, analyze the linear regression relationships between all signal features and all environmental temperatures, all environmental humidities, all environmental light durations, all environmental light intensities, and all environmental medium pH values to obtain a defect prediction model, which specifically includes the following steps:
[0145] Step S81, define one signal feature as a dependent variable.
[0146] Step S82: Define all environmental temperatures, all environmental humidities, all environmental light durations, all environmental light intensities, and all environmental medium pH values within a preset time period as a set of independent variables.
[0147] Step S83: Define the linear regression relationship between the dependent variable and all independent variables within the same preset time period through a multiple linear regression model.
[0148] Preferably, the multiple linear regression model is shown as follows:
[0149]
[0150] where, y i is the dependent variable for the i-th preset time period, n is the total number of all preset time periods, β 0 is the intercept of the linear regression relationship, β j is the linear regression coefficient of the j-th independent variable, m is the total number of independent variables in a set of independent variables, x j,i is the j-th independent variable for the i-th preset time period, and δ is the random error of the linear regression relationship.
[0151] It should be noted that the above additional content is only for principle explanation, and the symbol meanings of the above additional content are not interoperable with the symbol meanings in other parts of this embodiment. If there are repeated symbols in the additional content at different positions, please understand them separately and do not connect them with each other.
[0152] Step S84: Solve all linear regression coefficients of the multiple linear regression model.
[0153] Preferably, all linear regression coefficients of the multiple linear regression model can be solved by the least squares method, and the least squares method is shown as follows:
[0154]
[0155] where, is the estimated value of β j , j = 1, 2, …, m, X is the matrix of all independent variables, X T is the transpose matrix of matrix X.
[0156] Preferably, since five independent variables are listed in this embodiment, then m = 5. If additional independent variables need to be added, they can be directly added.
[0157] It should be noted that the above additional content is only for principle explanation, and the symbol meanings of the above additional content are not interoperable with the symbol meanings in other parts of this embodiment. If there are repeated symbols in the additional content at different positions, please understand them separately and do not connect them with each other.
[0158] Step S85: Substitute all the obtained regression coefficients into the multiple linear regression model to obtain a defect prediction model.
[0159] Preferably, the residual sum of squares of linear regression can be used to judge the fitting effect of the model by comparing its magnitude. The Residual Sum of Squares (RSS) is the sum of the squares of the differences between the actual observed values and the values predicted by the regression equation, and is used to quantify the difference between the model predicted values and the actual values.
[0160] Preferably, the judgment criterion for the residual sum of squares is that the smaller the better. That is, the smaller the residual sum of squares, the closer the predicted values of the model are to the actual observed values, and the better the fitting effect of the model; conversely, if the residual sum of squares is large, it indicates that there is a large deviation between the predicted values of the model and the actual observed values, and the fitting effect of the model is poor.
[0161] Further, in step S6, the pipelines corresponding to each defect type are obtained respectively and marked as defective pipelines. After that, the following steps are further included:
[0162] Step S10: Obtain the geographical locations of all defective pipelines and send them to an external monitoring terminal.
[0163] Further, in step S9, based on a preset prediction step number, the future defect features for at least one step number are predicted by the defect prediction model. After that, the following steps are further included:
[0164] Step S100: Obtain the pipelines corresponding to the future defect features and mark them as pipelines where future defects may occur.
[0165] Step S200: Send the future defect features and the corresponding future timestamps to an external monitoring terminal.
[0166] Step S300: Obtain the geographical locations of all pipelines where future defects may occur and send them to an external monitoring terminal.
[0167] In this embodiment, ultrasonic signals of at least two detection parts of each pipeline are respectively obtained through an external ultrasonic detector based on a plurality of preset time periods; a plurality of signal components of each ultrasonic signal are respectively extracted; all signal components of the same detection part are classified to obtain at least two signal types; based on the current detection part, all the same signal types are deleted, and the remaining signal types are marked as defect types; the signal characteristics of each signal component in each defect type are respectively obtained as defect characteristics; the pipelines corresponding to each defect type are respectively obtained and marked as defective pipelines; the ambient temperature, ambient humidity, ambient light duration, ambient light intensity, and ambient medium pH value of all defective pipelines are obtained based on a plurality of preset time periods; the linear regression relationships between all signal characteristics and all ambient temperatures, all ambient humidities, all ambient light durations, all ambient light intensities, and all ambient medium pH values are analyzed to obtain a defect prediction model; based on a preset prediction step number, the future defect characteristics of at least one step number are predicted through the defect prediction model. In this embodiment, all pipelines of the same specification (all pipelines of the same specification have bends) are used as control references for each other. By deleting the same ultrasonic signal characteristics (such as normal propagation in a straight section, normal refraction and reflection occurring at a bend, etc.), the remaining signals without the same type are identified as abnormal characteristics (such as corrosion, cracks, deformation, aging, construction damage, etc.), so that ultrasonic detection can refer to signal characteristics for each other when detecting pipelines with bends, and all normal reflections and refractions are deleted as normal signals, reducing the probability of false defect judgment. At the same time, in this embodiment, linear regression analysis is performed on pipelines of the same specification to realize defect prediction of pipelines. When the defect will actually occur, it is possible to know in advance the possible upcoming defects of the pipeline, and take corresponding measures in advance, thereby further reducing the losses caused by defects.
[0168] As Figure 2 shown, this embodiment provides an embodiment of a defect detection device for pipelines. In this embodiment, the defect detection device is applied to the defect detection method in the above-mentioned embodiment.
[0169] Specifically, the defect detection device includes a pipeline ultrasonic signal acquisition module 1, an ultrasonic signal component extraction module 2, a signal component classification module 3, a defect type marking module 4, a defect feature marking module 5, a defective pipeline marking module 6, a defective pipeline environmental factor acquisition module 7, a defect prediction model acquisition module 8, and a future defect feature acquisition module 9 that are electrically connected in sequence.
[0170] Among them, the pipeline ultrasonic signal acquisition module 1 is used to respectively acquire the ultrasonic signals of at least two detection parts of each pipeline through an external ultrasonic detector based on a plurality of preset time periods; the ultrasonic signal component extraction module 2 is used to respectively extract a plurality of signal components of each ultrasonic signal; the signal component classification module 3 is used to classify all the signal components of the same detection part to obtain at least two signal types; the defect type marking module 4 is used to delete all the same signal types based on the current detection part and mark the remaining signal types as defect types; the defect feature marking module 5 is used to respectively obtain the signal features of each signal component in each defect type as defect features; the defective pipeline marking module 6 is used to respectively obtain the pipelines corresponding to each defect type and mark them as defective pipelines; the defective pipeline environmental element acquisition module 7 is used to acquire the environmental temperature, environmental humidity, environmental light duration, environmental light intensity, and environmental medium pH of all defective pipelines based on a plurality of preset time periods; the defect prediction model acquisition module 8 is used to analyze the linear regression relationships between all signal features and all environmental temperatures, all environmental humidities, all environmental light durations, all environmental light intensities, and all environmental medium pHs to obtain a defect prediction model; the future defect feature acquisition module 9 is used to predict the future defect features of at least one step through the defect prediction model based on a preset prediction step.
[0171] Further, the ultrasonic signal component extraction module 2 specifically includes a first ultrasonic signal component extraction unit, a second ultrasonic signal component extraction unit, a third ultrasonic signal component extraction unit, a fourth ultrasonic signal component extraction unit, a fifth ultrasonic signal component extraction unit, a sixth ultrasonic signal component extraction unit, a seventh ultrasonic signal component extraction unit, and an eighth ultrasonic signal component extraction unit that are electrically connected in sequence; the first ultrasonic signal component extraction unit is electrically connected to the pipeline ultrasonic signal acquisition module 1, and the eighth ultrasonic signal component extraction unit is electrically connected to the signal component classification module 3.
[0172] Among them, the first ultrasonic signal component extraction unit is used to obtain all the maximum values and all the minimum values of the current ultrasonic signal; the second ultrasonic signal component extraction unit is used to sequentially connect all the maximum values to form an upper envelope line; the third ultrasonic signal component extraction unit is used to sequentially connect all the minimum values to form a lower envelope line; the fourth ultrasonic signal component extraction unit is used to obtain the average value of the upper envelope line and the lower envelope line to form an average line; the fifth ultrasonic signal component extraction unit is used to subtract the current ultrasonic signal from the current average envelope line to obtain a first-order intermediate signal; the sixth ultrasonic signal component extraction unit is used to repeatedly execute the operations of the first ultrasonic signal component extraction unit to the fifth ultrasonic signal component extraction unit for several times to iterate the first-order intermediate signal for several times; the seventh ultrasonic signal component extraction unit is used to respectively obtain the first-order intermediate signals whose difference between the number of extreme points and the number of zero-crossing points after each iteration is 0 or 1, and mark them as second-order intermediate signals; the eighth ultrasonic signal component extraction unit is used to obtain the second-order intermediate signals whose average line is zero and define them as the signal components of the current ultrasonic signal.
[0173] Further, the signal component classification module 3 specifically includes a first signal component classification unit, a second signal component classification unit, a third signal component classification unit, a fourth signal component classification unit, and a fifth signal component classification unit that are electrically connected in sequence; the first signal component classification unit is electrically connected to the eighth ultrasonic signal component extraction unit, and the fifth signal component classification unit is electrically connected to the defect type marking module 4.
[0174] Among them, the first signal component classification unit is used to define a set of signals to be classified based on all signal components for the same detection part; the second signal component classification unit is used to define a set of categories according to preset signal types; the third signal component classification unit is used to calculate the conditional probabilities of the set of signals to be classified under each preset signal type; the fourth signal component classification unit is used to classify each signal component into the preset signal type with the highest conditional probability for each of them; the fifth signal component classification unit is used to delete the preset signal types without signal components to obtain at least two signal types.
[0175] Further, the defect prediction model acquisition module 8 specifically includes a first defect prediction model acquisition unit, a second defect prediction model acquisition unit, a third defect prediction model acquisition unit, a fourth defect prediction model acquisition unit, and a fifth defect prediction model acquisition unit that are electrically connected in sequence; the first defect prediction model acquisition unit is electrically connected to the defective pipeline environment element acquisition module 7, and the fifth defect prediction model acquisition unit is electrically connected to the future defect feature acquisition module 9.
[0176] Among them, the first defect prediction model acquisition unit is used to define a signal feature as a dependent variable; the second defect prediction model acquisition unit is used to define all environmental temperatures, all environmental humidities, all environmental light durations, all environmental light intensities, and all environmental medium pH values within a preset time period as a set of independent variables; the third defect prediction model acquisition unit is used to define the linear regression relationship between the dependent variable and all independent variables within the same preset time period through a multiple linear regression model; the fourth defect prediction model acquisition unit is used to solve all linear regression coefficients of the multiple linear regression model; the fifth defect prediction model acquisition unit is used to substitute all the obtained regression coefficients into the multiple linear regression model to obtain a defect prediction model.
[0177] Furthermore, the defect detection device further includes a defective pipeline geographical location acquisition and sending module electrically connected to the defective pipeline marking module 6, and this module is used to acquire the geographical locations of all defective pipelines and send them to an external monitoring end.
[0178] Furthermore, the defect detection device further includes a future defective pipeline marking module, a future defect feature and future timestamp sending module, and a future defective pipeline geographical location sending module that are electrically connected in sequence; the future defective pipeline marking module is electrically connected to the future defect feature acquisition module 9.
[0179] Among them, the future defective pipeline marking module is used to acquire the pipelines corresponding to future defect features and mark them as future defective pipeline possibilities; the future defect feature and future timestamp sending module is used to send the future defect features and the corresponding future timestamps to an external monitoring end; the future defective pipeline geographical location sending module is used to acquire the geographical locations of all future defective pipeline possibilities and send them to an external monitoring end.
[0180] It should be noted that this embodiment is a functional module embodiment based on the above method embodiment. For the preferred, extended, limited, exemplified, and principle description parts of this embodiment, please refer to the above embodiment, and this embodiment will not be elaborated here.
[0181] In this embodiment, ultrasonic signals of at least two detection parts of each pipeline are respectively obtained through an external ultrasonic detector based on a plurality of preset time periods; a plurality of signal components of each ultrasonic signal are respectively extracted; all signal components of the same detection part are classified to obtain at least two signal types; all the same signal types are deleted based on the current detection part, and the remaining signal types are marked as defect types; the signal features of each signal component in each defect type are respectively obtained as defect features; the pipelines corresponding to each defect type are respectively obtained and marked as defective pipelines; the ambient temperature, ambient humidity, ambient light duration, ambient light intensity, and ambient medium pH value of all defective pipelines are obtained based on a plurality of preset time periods; the linear regression relationships between all signal features and all ambient temperatures, all ambient humidities, all ambient light durations, all ambient light intensities, and all ambient medium pH values are analyzed to obtain a defect prediction model; the future defect features of at least one step are predicted based on a preset prediction step through the defect prediction model. In this embodiment, all pipelines of the same specification (all pipelines of the same specification have bends) are used as control references for each other. By deleting the same ultrasonic signal features (such as conventional propagation in straight sections, conventional refraction and reflection occurring at bends, etc.), the remaining signals without the same type are identified as abnormal features (such as corrosion, cracks, deformation, aging, construction damage, etc.), so that ultrasonic detection can refer to signal features for pipelines with bends, and all normal reflections and refractions are deleted as normal signals, reducing the probability of misjudging defects. At the same time, in this embodiment, linear regression analysis is performed on pipelines of the same specification to achieve defect prediction of pipelines. When the defects will actually occur, it is possible to know in advance the possible upcoming defects of the pipelines, and take corresponding measures in advance, thereby further reducing the losses caused by defects.
[0182] As Figure 3 shown, this embodiment provides an embodiment of an electronic device. In this embodiment, the electronic device 10 includes a processor 101 and a memory 102 coupled to the processor 101.
[0183] The memory 102 stores program instructions for implementing the pipeline defect detection method of any of the above embodiments.
[0184] The processor 101 is configured to execute the program instructions stored in the memory 102 to perform pipeline defect detection.
[0185] Among them, the processor 101 can also be referred to as a CPU (Central Processing Unit). The processor 101 may be an integrated circuit chip with data processing capabilities. The processor 101 can also be a general-purpose processor, a digital data processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0186] Furthermore, Figure 4 FIG. is a schematic structural diagram of a storage medium according to an embodiment of the present application. The storage medium 11 of the embodiment of the present application stores program instructions 111 that can implement all the above methods. Among them, the program instructions 111 can be stored in the above storage medium in the form of a software product, including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing 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 disc, or a terminal device such as a computer, a server, a mobile phone, or a tablet.
[0187] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.
[0188] In addition, the functional units in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. The above is only the embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structural or equivalent process transformation made by using the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
[0189] The specific implementation manners of the present application have been described in detail above, but they are only examples, and the present application is not limited to the specific implementation manners described above. For those skilled in the art, any equivalent modifications or substitutions to the present application are also within the scope of the present application. Therefore, all equivalent transformations, modifications, improvements, etc. made without departing from the spirit and principles of the present application should be covered within the scope of the present application.
Claims
1. A pipeline defect detection method, the defect detection method is applied to a plurality of pipelines of the same specification, characterized in that: The defect detection method comprises: Step S1, obtaining ultrasonic signals of at least two detection positions of each pipeline through an external ultrasonic detection component based on a number of preset time periods; Step S2, extracting a plurality of signal components of each ultrasonic signal respectively; Step S3, classifying all signal components of the same detection part to obtain at least two signal types; Step S4, deleting all identical signal types based on the current detection location, and marking the remaining signal types as defect types; Step S5, respectively obtaining the signal characteristics of each signal component in each defect type as defect characteristics; Step S6, respectively obtaining the pipeline corresponding to each defect type and marking it as a defective pipeline; Step S7, obtaining the ambient temperature, ambient humidity, ambient light duration, ambient light intensity, and pH value of the ambient medium of all defective pipelines based on a number of preset time periods; Step S8, analyzing the linear regression relationship between all signal features and all ambient temperatures, all ambient humidity, all ambient light durations, all ambient light intensities, and all ambient medium pH values, to obtain a defect prediction model; Step S9, predicting future defect characteristics of at least one step number through the defect prediction model based on a preset prediction step number.
2. The defect detection method according to claim 1, characterized in that: Step S2, extracting several signal components of each ultrasonic signal respectively, including: Step S21, obtaining all maximum values and all minimum values of the current ultrasonic signal; Step S22, sequentially connecting all the maximum values to form an upper envelope; Step S23, sequentially connecting all the minimum values to form a lower envelope; Step S24, obtaining the average value of the upper envelope and the lower envelope to form a mean line; Step S25, subtracting the current mean envelope from the current ultrasonic signal to obtain a first-order intermediate signal; Step S26, repeating steps S21 to S25 for several times to iterate the first-order intermediate signal for several times; Step S27, respectively obtaining first-order intermediate signals whose difference between the number of extreme value points and the number of zero-crossing points after each iteration is 0 or 1, and marking them as second-order intermediate signals; Step S28, obtaining a second-order intermediate signal with a mean line of zero and defining it as a signal component of the current ultrasonic signal.
3. The defect detection method according to claim 1, characterized in that: Step S3, classifying all signal components of the same detection part to obtain at least two signal types, including: Step S31, defining a set of signals to be classified according to all signal components based on the same detection location; Step S32, defining a category set according to a preset signal type; Step S33, calculating the conditional probability of the signal set to be classified under each preset signal type; Step S34, classifying each signal component into the preset signal type with the highest conditional probability; Step S35, deleting the preset signal types without signal components to obtain at least two signal types.
4. The defect detection method according to claim 1, characterized in that: Step S8, analyzing the linear regression relationship between all signal features and all ambient temperatures, all ambient humidity, all ambient lighting durations, all ambient lighting intensities, and all ambient medium pH values, to obtain a defect prediction model, including: Step S81, defining a signal feature as a dependent variable; Step S82, defining all ambient temperatures, all ambient humidity, all ambient lighting durations, all ambient lighting intensities, and all ambient medium pH values within a preset time period as a set of independent variables; Step S83, defining the linear regression relationship between the dependent variable and all independent variables in the same preset time period through a multiple linear regression model; Step S84, solving all linear regression coefficients of the multivariate linear regression model; Step S85, substituting all the obtained regression coefficients into the multivariate linear regression model to obtain the defect prediction model.
5. The defect detection method according to claim 1, characterized in that: Step S6, respectively obtaining the pipeline corresponding to each defect type and marking it as a defective pipeline, and then comprising: Step S10, obtaining the geographical locations of all defective pipelines and sending them to an external monitoring terminal.
6. The defect detection method according to claim 1, characterized in that: Step S9, predicting future defect characteristics of at least one step number through the defect prediction model based on a preset prediction step number, and then comprising: Step S100, obtaining the pipeline corresponding to the future defect feature and marking it as a possible pipeline with future defects; Step S200, sending the future defect feature and the corresponding future timestamp to an external monitoring terminal; Step S300, obtaining the geographical locations of all possible future defective pipelines and sending them to an external monitoring terminal.
7. A pipeline defect detection device, the defect detection device is applied to the defect detection method according to any one of claims 1 to 6, characterized in that: The defect detection device comprises: A pipeline ultrasonic signal acquisition module, used to acquire ultrasonic signals of at least two detection positions of each pipeline through an external ultrasonic detection component based on a number of preset time periods; An ultrasonic signal component extraction module, used to extract several signal components of each ultrasonic signal respectively; A signal component classification module, used to classify all signal components of the same detection part to obtain at least two signal types; A defect type marking module is used to delete all identical signal types based on the current detection part and mark the remaining signal types as defect types; A defect feature marking module is used to obtain the signal feature of each signal component in each defect type as a defect feature; A defective pipeline marking module is used to obtain pipelines corresponding to each defect type and mark them as defective pipelines; A defective pipeline environmental factor acquisition module is used to obtain the environmental temperature, environmental humidity, environmental light duration, environmental light intensity, and environmental medium pH value of all defective pipelines based on a number of preset time periods; A defect prediction model acquisition module is used to analyze the linear regression relationship between all signal features and all ambient temperatures, all ambient humidity, all ambient light durations, all ambient light intensities, and all pH values of the ambient media to obtain a defect prediction model; The future defect feature acquisition module is used to predict future defect features of at least one step number through the defect prediction model based on a preset prediction step number.
8. An electronic device, characterized in that: It comprises a processor and a memory coupled to the processor, wherein the memory stores program instructions executable by the processor; when the processor executes the program instructions stored in the memory, the defect detection method as described in any one of claims 1 to 6 is implemented.
9. A storage medium, characterized in that: The storage medium stores program instructions, and when the program instructions are executed by a processor, the defect detection method according to any one of claims 1 to 6 can be implemented.
Citation Information
Cited By
Petroleum pipeline inner wall defect detection system
CN120468291A