Crack detection method and device, electronic equipment and storage medium
By training a multi-sensor fusion feature mutual supervision neural network, and using a magnetic flux leakage detector to collect signals to generate a sample set and update network parameters, the problem of low detection accuracy in pipeline inspection is solved, and high-precision crack detection is achieved.
Patent Information
- Application Number
- CN202211308775.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-25
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-10-25
AI Technical Summary
Existing crack detection methods have low accuracy in pipeline inspection due to fluctuations in non-crack signals and insufficient crack training samples.
A multi-sensor fusion feature mutual supervision neural network is adopted. The leakage magnetic field detector collects the axial and radial signals of leakage magnetic field, generates a training sample set, and performs multiple rounds of training. This makes the fused axial and radial features at the crack approach each other, while the features at non-crack locations move away from each other. The network parameters are then updated to improve the detection accuracy.
It achieves high-precision detection of cracks in buried pipelines, overcomes the problems of non-crack signal fluctuations and insufficient crack training samples, and improves detection accuracy.
Smart Images

Figure CN115496167B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of fault diagnosis technology, and more specifically, relates to a crack detection method, device, electronic device and storage medium. Background Technology
[0002] Pipeline transportation is one of the most common methods of transporting petroleum energy, characterized by low cost, large transport capacity, and long transport distance. As a type of oil and gas pipeline, buried pipelines are located in complex underground environments and are susceptible to leakage or even explosion due to factors such as rock compression, damp soil, and corrosion from energy raw materials. Therefore, the detection of cracks in buried pipelines is very important.
[0003] Magnetic flux leakage (MFL) detection is one of the most commonly used methods for detecting pipe cracks, offering advantages such as high speed, high accuracy, and high sensitivity. Once deployed in a pipe, the MFL detector collects and stores MFL signals through sensors. MFL detection detects cracks by training known samples to predict whether unknown samples contain cracks. Many crack detection algorithms exist, with common methods including reconstruction-based and prediction-based methods. The applicant recognizes that when using reconstruction-based crack detection methods for pipe crack detection, the complex operating environment of the pipe often leads to fluctuations in non-crack signals, affecting the detection accuracy. Furthermore, prediction-based crack detection methods require a large number of crack and non-crack samples for network training, but in practice, crack training samples are insufficient to meet network training requirements, further impacting detection accuracy. Therefore, when using these methods to detect pipe cracks, the fluctuations in non-crack signals and insufficient crack training samples result in low detection accuracy. Summary of the Invention
[0004] In view of this, the present invention provides a crack detection method, device, electronic device and storage medium, the main purpose of which is to solve the problem that the crack detection accuracy is not high when detecting cracks in pipelines due to fluctuations in non-crack signals and insufficient crack training samples.
[0005] According to a first aspect of this application, a crack detection method is provided, comprising:
[0006] The magnetic flux leakage detector installed inside the buried pipeline is controlled to move forward. The magnetic flux leakage detector is used to release magnetic signals and receive magnetic flux leakage signals generated when the magnetic signals pass through the metal pipe wall of the buried pipeline.
[0007] During the forward movement of the magnetic flux leakage detector, axial and radial magnetic flux leakage signals are acquired, and an initial crack training sample set, an initial non-crack training sample set, and an initial test sample set are generated based on the axial and radial magnetic flux leakage signals, respectively. The initial crack training sample set, the initial non-crack training sample set, and the initial test sample set are then preprocessed to obtain the crack training sample set, the non-crack training sample set, and the test sample set.
[0008] Establish a multi-sensor fusion feature mutual supervision neural network;
[0009] The multi-sensor fusion feature mutual supervision neural network is trained for the first time based on the crack training sample set, and the network parameters are updated so that the fused axial features and fused radial features at the crack are close to each other. Then, the multi-sensor fusion feature mutual supervision neural network after the first training is trained based on the non-crack training sample set, and the network parameters are updated so that the fused axial features at the non-crack location and the fused radial features at the non-crack location are far apart from each other. The multi-sensor fusion feature mutual supervision neural network after the second training is used as the training network for the next round.
[0010] The number of training iterations is determined. In each training iteration, the multi-sensor fusion feature mutual supervision neural network obtained from the second training in the previous iteration is trained for the first time based on the crack training sample set. The network parameters are updated to make the fused axial features and fused radial features at the crack continue to approach each other. The multi-sensor fusion feature mutual supervision neural network obtained from the first training in the current iteration is trained for the second time based on the non-crack training sample set. The network parameters are updated to make the fused axial features and fused radial features at non-crack locations continue to move away from each other. This process continues until the number of training iterations reaches the specified number of training iterations, thus obtaining the target multi-sensor fusion feature mutual supervision neural network.
[0011] At least one crack sample in the test sample set is determined based on the target multi-sensor fusion feature mutual supervision neural network.
[0012] Optionally, the step of generating an initial crack training sample set, an initial non-crack training sample set, and an initial test sample set based on the leakage magnetic axial signal and the leakage magnetic radial signal, respectively, includes:
[0013] Training signal sample sets and test signal sample sets are generated based on the leakage magnetic axial signal and the leakage magnetic radial signal;
[0014] The training signal sample set is divided into several parts to determine an initial crack training sample set including multiple axial crack training samples and corresponding multiple radial crack training samples, and an initial non-crack training sample set including multiple axial non-crack training samples and corresponding multiple radial non-crack training samples.
[0015] The initial crack training sample set is X. d : This refers to the i-th axial crack training sample in the initial crack training sample set. Let N be the i-th radial crack training sample in the initial crack training sample set, and N be the number of axial crack training samples / radial crack training samples in the initial crack training sample set.
[0016] The initial non-crack training sample set X nd for: This refers to the i-th axially non-cracked training sample in the initial non-cracked training sample set. Let N be the i-th radial non-crack training sample in the initial non-crack training sample set, and N be the number of axial non-crack training samples / radial non-crack training samples in the initial non-crack training sample set.
[0017] The axial and radial magnetic flux leakage signals included in the test signal sample set are divided into multiple test samples according to a preset rule to obtain an initial axial test sample set and an initial radial test sample set, wherein...
[0018] The initial axial test sample set for: Let N be the i-th initial axial test sample in the initial axial test sample set. T The initial axial test sample set contains the number of initial axial test samples.
[0019] The initial radial test sample set for: Let N be the i-th initial radial test sample in the initial radial test sample set. T The number of initial radial test samples in the initial radial test sample set;
[0020] The initial axial test sample set and the initial radial test sample set The initial test sample set is thus formed.
[0021] Optionally, the preprocessing of the initial crack training sample set, the initial non-crack training sample set, and the initial test sample set to obtain the crack training sample set, the non-crack training sample set, and the test sample set includes:
[0022] Base value correction is performed on each sample in the initial crack training sample set, the initial non-crack training sample set, the initial axial test sample set, and the initial radial test sample set to ensure that the mean value of each channel in the initial crack training sample set, the initial non-crack training sample set, the initial axial test sample set, and the initial radial test sample set is a constant value ε.
[0023] Two-dimensional cubic spline interpolation is used to interpolate each corrected sample in the initial crack training sample set, the initial non-crack training sample set, the initial axial test sample set, and the initial radial test sample set. Each positively corrected and interpolated sample in these sets is then converted into a three-channel image using rainbow encoding, thus obtaining the crack training sample set, the non-crack training sample set, the axial test sample set, and the radial test sample set.
[0024] The crack training sample set S d for: This refers to the i-th axial crack training sample in the crack training sample set. Let i be the i-th radial crack training sample in the crack training sample set.
[0025] The non-crack training sample set S nd for: This refers to the i-th axially non-cracked training sample in the non-cracked training sample set. This refers to the i-th radially non-cracked training sample in the non-cracked training sample set.
[0026] The axial test sample set for: For the i-th axial test sample in the axial test sample set,
[0027] The radial test sample set for: This refers to the i-th radial test sample in the radial test sample set.
[0028] The axial test sample set and the radial test sample set The test sample set is composed of these components.
[0029] Optionally, the establishment of a multi-sensor fusion feature mutual supervision neural network includes:
[0030] Establish a multi-sensor fusion feature mutual supervision neural network comprising feature extraction, feature fusion, and feature mutual supervision components; wherein,
[0031] The feature extraction part includes a first pre-trained network pre-trained with fixed and fine-tuning layers for extracting axial depth adaptive features. a A second pre-trained network, pre-trained with fixed and fine-tuned layers, is used to extract radial depth adaptive features. r A third pre-trained model for extracting general features of axial depth. and a fourth pre-trained model for extracting radial depth general features
[0032] The feature fusion section is used to fuse the axial depth adaptive feature value with the axial depth general feature to obtain a fused axial feature vector, and to fuse the radial depth adaptive feature value with the radial depth general feature to obtain a fused radial feature vector;
[0033] The feature mutual supervision part is used to continuously supervise the fused axial feature vector and the fused radial feature vector to make the fused axial feature at the crack and the fused radial feature at the crack approach each other, and the fused axial feature at the non-crack and the fused radial feature at the non-crack away from each other.
[0034] Optionally, the first training of the multi-sensor fusion feature mutual supervision neural network based on the crack training sample set, and the updating of the network parameters, includes:
[0035] From the crack training sample set S d Extracting the axial crack training dataset and radial crack training dataset
[0036] The axial crack training dataset The inputs are respectively fed into the first pre-trained network pre a and the third pre-trained model In this process, adaptive features for axial crack depth are obtained. General characteristics of axial crack depth and the radial crack training dataset The inputs are respectively fed into the second pre-trained network pre r and the four pre-trained models In this process, adaptive features of radial crack depth are obtained. General characteristics of radial crack depth
[0037] The adaptive feature of the axial crack depth Common features with the axial crack depth By performing fusion, the fused axial feature vector at the crack is obtained. And the adaptive feature of the radial crack depth Common features with the radial crack depth The fusion process is performed to obtain the fused radial feature vector at the crack.
[0038] The axial feature vector at the crack is fused. As labels for the radial network, the second pre-trained network pre is updated using gradient descent by minimizing the first loss function. r The network parameters, and the radial crack training data. The input is fed into the second pre-trained network after training. r In this process, the adaptive feature for updating radial crack depth is obtained. The updated radial crack depth adaptive feature Common features with the radial crack depth Perform a second fusion to obtain the updated fused radial feature vector at the crack. The first loss function is:
[0039]
[0040] Where λ represents the weight;
[0041] Update the radial fusion feature vector at the crack. As labels for the axial network, the first pre-trained network pre is updated using gradient descent by minimizing the second loss function. a The network parameters, and the training dataset of the axial crack. Input into the first pre-trained network after training a In this process, the adaptive feature for updating the axial crack depth is obtained. The updated axial crack depth adaptive feature Common features with the axial crack depth Perform a second fusion to obtain the updated axial fusion feature vector at the crack. The multi-sensor fusion feature mutual supervision neural network after the first training is obtained, wherein the second loss function is:
[0042]
[0043] Optionally, the second training of the multi-sensor fusion feature mutual supervision neural network based on the non-slit training sample set after the first training, and the updating of the network parameters, includes:
[0044] From the non-crack training sample set S nd Extracting the axial non-crack training dataset and radial non-crack training dataset
[0045] The axial non-crack training dataset The inputs are respectively fed into the first pre-trained network pre after training. a 'and the third pre-trained model In this process, adaptive features for axial non-crack depth are obtained. General characteristics of axial non-crack depth and the radial non-crack training dataset The inputs are respectively fed into the trained second pre-trained network pre r 'and the fourth pre-trained model In this process, the adaptive feature of radial non-crack depth is obtained. Radial non-crack depth general characteristics
[0046] The adaptive feature of the axial non-crack depth Common features with the aforementioned axial non-crack depth The axial non-crack fusion feature vector is obtained by fusion. and the radial non-crack depth adaptive feature Common features with the radial non-crack depth The fusion process is performed to obtain the fused radial feature vector at the non-crack locations.
[0047] The radial feature vector at the non-crack location is fused. As a label for the radial network, the second pre-trained network (pre) is further updated using gradient descent by minimizing the third loss function. r The network parameters, and the radial non-crack training dataset. The input is fed into the second pre-trained network after retraining. r In this process, the updated radial non-crack depth adaptive features are obtained. The updated radial non-crack depth adaptive feature Common features with the radial non-crack depth Perform a second fusion to obtain the updated fused radial feature vector at the non-crack locations. The third loss function is:
[0048]
[0049] Where α is a constant;
[0050] Update the fused radial feature vector at the non-crack locations. As labels for the axial network, the first pre-trained network (pre) is updated using gradient descent by minimizing the fourth loss function. a The network parameters, and the axial non-crack training dataset. The input is fed into the first pre-trained network after retraining. a In this process, the adaptive features for updating the axial non-crack depth are obtained. The updated axial non-crack depth adaptive feature Common features with the aforementioned axial non-crack depth Perform a second fusion to obtain the updated fused axial feature vector at non-crack locations. The multi-sensor fusion feature mutual supervision neural network after the second training is obtained, wherein the fourth loss function is:
[0051]
[0052] Optionally, determining at least one crack sample in the axial test sample set and the radial test sample set based on the target multi-sensor fusion feature mutual supervision neural network includes:
[0053] The axial test sample set and the radial test sample set The inputs are respectively fed into the target multi-sensor fusion feature mutual supervision neural network to obtain axial depth adaptive features. Axial Depth General Features Radial Depth Adaptive Features Radial Depth General Features
[0054] The axial depth adaptive feature and the axial depth general feature The fusion process is performed to obtain the fused axial feature vector. and the radial depth adaptive feature and the radial depth general feature Perform fusion, fusing radial feature vectors
[0055] Calculate the fused axial eigenvector With fused radial eigenvectors The error E between them is expressed as:
[0056]
[0057] Set an anomaly threshold τ, and measure the error e of each test sample in the test sample set. i Compared with the aforementioned abnormal threshold τ, if ei If ≥τ, then the test sample is determined to be a crack sample;
[0058] Obtain at least one crack sample.
[0059] According to a second aspect of this application, a crack detection device is provided, comprising:
[0060] A control module is used to control the forward movement of a magnetic flux leakage detector installed inside a buried pipeline. The magnetic flux leakage detector is used to release a magnetic signal and receive a magnetic flux leakage signal generated when the magnetic signal passes through the metal wall of the buried pipeline.
[0061] The generation module is used to acquire magnetic flux leakage axial signal and magnetic flux leakage radial signal during the forward movement of the magnetic flux leakage detector, and to generate an initial crack training sample set, an initial non-crack training sample set, and an initial test sample set based on the magnetic flux leakage axial signal and the magnetic flux leakage radial signal, respectively. The initial crack training sample set, the initial non-crack training sample set, and the initial test sample set are preprocessed to obtain the crack training sample set, the non-crack training sample set, and the test sample set.
[0062] Establish a module for building a multi-sensor fusion feature mutual supervision neural network;
[0063] The first training module is used to perform a first training on the multi-sensor fusion feature mutual supervision neural network based on the crack training sample set, update the network parameters so that the fused axial features and fused radial features at the crack are close to each other, and perform a second training on the multi-sensor fusion feature mutual supervision neural network after the first training based on the non-crack training sample set, update the network parameters so that the fused axial features at the non-crack location and the fused radial features at the non-crack location are far apart from each other, and obtain the multi-sensor fusion feature mutual supervision neural network after the second training as the training network for the next round.
[0064] The second training module is used to determine the number of training rounds. In each training round, the multi-sensor fusion feature mutual supervision neural network obtained from the second training in the previous round is trained based on the crack training sample set. The network parameters are updated to make the fused axial features and fused radial features at the crack continue to approach each other. The multi-sensor fusion feature mutual supervision neural network obtained from the first training in the current round is trained based on the non-crack training sample set. The network parameters are updated to make the fused axial features at non-crack locations and the fused radial features at non-crack locations continue to move away from each other. The training rounds are repeated until the number of training rounds is reached, thus obtaining the target multi-sensor fusion feature mutual supervision neural network.
[0065] The determination module is used to determine at least one crack sample in the test sample set based on the target multi-sensor fusion feature mutual supervision neural network.
[0066] According to a third aspect of this application, an electronic device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in any one of the first aspects above.
[0067] According to a fourth aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above.
[0068] Using the above technical solution, this application provides a crack detection method. First, a magnetic flux leakage detector installed inside a buried pipeline is controlled to move forward. Then, based on the axial and radial signals of the magnetic flux leakage, a crack training sample set, a non-crack training sample set, and a test sample set are obtained. Next, a multi-sensor fusion feature mutual supervision neural network is established. The multi-sensor fusion feature mutual supervision neural network is trained for the first time based on the crack training sample set, updating the network parameters. Then, the multi-sensor fusion feature mutual supervision neural network after the first training is trained for the second time, updating the network parameters again. The resulting multi-sensor fusion feature mutual supervision neural network after the second training serves as the training network for the next round. The number of training iterations is determined until training is complete. The training rounds are completed to obtain the target multi-sensor fusion feature mutual supervision neural network. Finally, based on the target multi-sensor fusion feature mutual supervision neural network, at least one crack sample in the test sample set is determined. This method realizes crack detection of buried pipelines through the mutual supervision of leakage magnetic axial and radial fusion features. That is, through continuous training, the fused axial features and fused radial features at cracks continuously approach each other, while the fused axial features and fused radial features at non-crack locations continuously move away from each other. The network parameters are updated to obtain the target multi-sensor fusion feature mutual supervision neural network, which realizes high-precision crack detection and overcomes the current problem of low crack detection accuracy due to insufficient crack training samples and fluctuations in non-crack signals.
[0069] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0070] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0071] Figure 1 A flowchart of a crack detection method provided in an embodiment of this application is shown;
[0072] Figure 2 This illustration shows a schematic diagram of the structure of a multi-sensor fusion feature mutual supervision neural network for a crack detection method provided in an embodiment of this application;
[0073] Figure 3 This paper shows a schematic diagram of the structure of a crack detection device provided in an embodiment of the present application;
[0074] Figure 4 A schematic diagram of the device structure of the electronic device provided in the embodiments of this application is shown. Detailed Implementation
[0075] Various embodiments and features of this application are described herein with reference to the accompanying drawings.
[0076] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.
[0077] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0078] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.
[0079] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application.
[0080] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.
[0081] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.
[0082] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.
[0083] Example 1
[0084] This application provides a crack detection method, such as... Figure 1 As shown, it includes:
[0085] 101. Control the magnetic flux leakage detector installed in the buried pipeline to move forward.
[0086] In this embodiment of the application, the magnetic flux leakage detector is used to release a magnetic signal and receive a magnetic flux leakage signal generated when the magnetic signal passes through the metal pipe wall of the buried pipeline;
[0087] 102. During the forward movement of the magnetic flux leakage detector, the magnetic flux leakage axial signal and the magnetic flux leakage radial signal are collected, and an initial crack training sample set, an initial non-crack training sample set, and an initial test sample set are generated based on the magnetic flux leakage axial signal and the magnetic flux leakage radial signal, respectively. The initial crack training sample set, the initial non-crack training sample set, and the initial test sample set are preprocessed to obtain the crack training sample set, the non-crack training sample set, and the test sample set.
[0088] 103. Establish a multi-sensor fusion feature mutual supervision neural network;
[0089] 104. The multi-sensor fusion feature mutual supervision neural network is trained for the first time based on the crack training sample set, and the network parameters are updated so that the fused axial features and fused radial features at the crack are close to each other. The multi-sensor fusion feature mutual supervision neural network after the first training is trained based on the non-crack training sample set, and the network parameters are updated so that the fused axial features at the non-crack location and the fused radial features at the non-crack location are far apart from each other. The multi-sensor fusion feature mutual supervision neural network after the second training is used as the training network for the next round.
[0090] 105. Determine the number of training rounds. In each training round, the multi-sensor fusion feature mutual supervision neural network obtained from the second training in the previous round is trained for the first time based on the crack training sample set. The network parameters are updated so that the fused axial features and fused radial features at the crack continue to approximate each other. The multi-sensor fusion feature mutual supervision neural network obtained from the first training in the current round is trained for the second time based on the non-crack training sample set. The network parameters are updated so that the fused axial features at non-crack locations and the fused radial features at non-crack locations continue to move away from each other. This process continues until the number of training rounds is reached, thus obtaining the target multi-sensor fusion feature mutual supervision neural network.
[0091] 106. Determine the crack samples in the test sample set based on the target multi-sensor fusion feature mutual supervision neural network.
[0092] The method provided in this application first controls a magnetic flux leakage detector installed in a buried pipeline to move forward. Then, based on the axial and radial signals of the magnetic flux leakage, a crack training sample set, a non-crack training sample set, and a test sample set are obtained. Next, a multi-sensor fusion feature mutual supervision neural network is established. The network is then trained for the first time using the crack training sample set, updating the network parameters. A second training is performed on the network after the first training using the non-crack training sample set, updating the network parameters again. The resulting multi-sensor fusion feature mutual supervision neural network after the second training is used as the training network for the next round. The number of training rounds is determined until the required number of training rounds is reached. The method trains the target multi-sensor fusion feature mutual supervision neural network a certain number of times, and finally determines at least one crack sample in the test sample set based on the target multi-sensor fusion feature mutual supervision neural network. The method realizes crack detection of buried pipelines through mutual supervision of leakage magnetic field axial and radial fusion features. That is, through continuous training, the fused axial features and fused radial features at cracks continuously approach each other, while the fused axial features and fused radial features at non-crack locations continuously move away from each other. The network parameters are updated to obtain the target multi-sensor fusion feature mutual supervision neural network, which realizes high-precision crack detection and overcomes the current problem of low crack detection accuracy due to insufficient crack training samples and fluctuations in non-crack signals.
[0093] Furthermore, the method provided in this application embodiment has the following specific steps:
[0094] 201. Control the forward movement of the magnetic flux leakage detector installed in the buried pipeline. According to Maxwell's equations, as shown in formula (1), the magnet in the magnetic flux leakage detector releases a magnetic signal that passes through the metal pipe wall, generating a magnetic flux leakage signal.
[0095] Formula (1):
[0096] in, It is a differential operator, where H is the magnetic field strength, J is the current density, B is the magnetic flux density, μ is the free permeability, and A is the magnetic vector potential.
[0097] 202. The magnetic flux leakage detector integrates two mutually perpendicular magnetic flux leakage sensors. As the detector moves forward, it acquires axial and radial magnetic flux leakage signals to generate training and test signal sample sets, respectively. The specific process is as follows:
[0098] 2021. Generate training signal sample sets and test signal sample sets based on leakage magnetic axial signals and leakage magnetic radial signals.
[0099] 2022. The signals included in the training signal sample set are divided to determine an initial crack training sample set including multiple axial crack training samples and corresponding multiple radial crack training samples, and an initial non-crack training sample set including multiple axial non-crack training samples and corresponding multiple radial non-crack training samples, wherein,
[0100] The initial crack training sample set is X d : This is the i-th axial crack training sample in the initial crack training sample set. Let N be the i-th radial crack training sample in the initial crack training sample set, and N be the number of axial crack training samples / radial crack training samples in the initial crack training sample set.
[0101] Initial non-crack training sample set X nd for: Let i be the i-th axially non-cracked training sample in the initial non-cracked training sample set. Let N be the i-th radial non-crack training sample in the initial non-crack training sample set, and N be the number of axial non-crack training samples / radial non-crack training samples in the initial non-crack training sample set.
[0102] 2023. The axial and radial magnetic flux leakage signals included in the test signal sample set are divided into multiple test samples according to a sliding window with a fixed step size t = 20 and a size of 64×64, to obtain the initial axial test sample set and the initial radial test sample set.
[0103] Initial axial test sample set for: Let N be the i-th initial axial test sample in the initial axial test sample set. T This represents the number of initial axial test samples in the initial axial test sample set.
[0104] Initial radial test sample set for: Let N be the i-th initial radial test sample in the initial radial test sample set. T This represents the number of initial radial test samples in the initial radial test sample set.
[0105] 203. Preprocess the initial crack training sample set, the initial non-crack training sample set, and the initial test sample set to obtain the crack training sample set, the non-crack training sample set, and the test sample set. The specific process is as follows:
[0106] 2031. As shown in formula (2), base value correction is performed on each sample in the sample set to ensure that the mean of each channel in the sample set is a constant value ε.
[0107] Formula (2):
[0108] Where f1(·) is the base value correction operation function, x p,q Let be the value point in the p-th row and q-th column of sample x, M be the row number of matrix x, and ε = 0.
[0109] 2032. Using two-dimensional cubic spline interpolation, for each corrected sample x in the sample set... p,q Interpolation is performed to obtain interpolated samples for each dataset. The interpolated samples are f2(x) p,q ), where f2(·) is the interpolation function and the interpolation sample dimension is 64×64.
[0110] 2033. Each positively corrected and interpolated sample in the sample set is converted into a three-channel image using rainbow encoding. The conversion formulas are shown in formulas (3)-(5), and the converted sample f3(x) is obtained. p,q ), where f3(·) is the matrix-to-image conversion function,
[0111] Formula (3):
[0112] Formula (4):
[0113] Formula (5):
[0114] R, G, and B respectively convert the red, green, and blue channels of the image.
[0115] 2034, obtain the crack training sample set S d Non-crack training sample set S nd Axial test sample set Radial test sample set The specific processing steps are shown in formulas (6) to (9), where formula (6) is:
[0116] in, Let i be the i-th axial crack training sample in the crack training sample set. Let i be the i-th radial crack training sample in the crack training sample set.
[0117] Formula (7):
[0118] in, This is the i-th axially non-crack training sample in the non-crack training sample set. Let i be the i-th radially non-crack training sample in the non-crack training sample set.
[0119] Formula (8):
[0120] in, Let i be the i-th axial test sample in the axial test sample set.
[0121] Formula (9):
[0122] in, Let i be the i-th radial test sample in the radial test sample set.
[0123] 204. Establish a multi-sensor fusion feature mutual supervision neural network, such as... Figure 2 As shown, the multi-sensor fusion mutual supervision neural network includes a feature extraction part, a feature fusion part, and a feature mutual supervision part.
[0124] 2041. The feature extraction part is divided into deep adaptive features and deep general features.
[0125] In this embodiment, the depth adaptive feature part consists of two pre-trained networks, each containing a fixed layer and a fine-tuning layer, used to extract depth adaptive features for axial samples and radial samples, respectively. These two pre-trained networks are defined as the first pre-trained network pre... a =[fix a finetune a ] and the second pre-trained network pre r =[fix r finetune r ]. Among them, fix a and fix r These are fixed layers in a pre-trained model whose parameters are not updated during training; fine-tuning is used for this purpose. a and finetune r It is a fine-tuning layer of the pre-trained model, whose parameters are updated during training.
[0126] Furthermore, the deep general feature extraction part consists of two pre-trained models with completely fixed parameters, defined as the third pre-trained model. and the fourth pre-trained model
[0127] Specifically,
[0128] 2042. The feature fusion part fuses the depth adaptive features and the depth general features, as shown in Equation (10), to obtain the fused axial features and the fused radial features.
[0129] Formula (10): fea=θfea a +(1-θ)fea g ,
[0130] Where fea represents the fused feature, fea a For deep adaptive features, fea g For deep general features, θ is the feature fusion weight and θ∈(0,1).
[0131] 2043. The mutual supervision of features is achieved by continuously supervising and fusing axial and radial features, so that the axial and radial feature values at the crack continuously approach each other, while the axial and radial feature values at the non-crack locations continuously diverge.
[0132] 205. Train a multi-sensor fusion feature mutual supervision neural network.
[0133] 2051. First stage of network training. The training samples are the crack training sample set S. d By updating the network parameters, the axial and radial features at the crack are continuously approximated. The specific process is as follows:
[0134] 2051.1. Training dataset for axial cracks The inputs are respectively fed into the first pre-trained network pre a and the third pre-trained model In this process, adaptive features for axial crack depth are obtained. General characteristics of axial crack depth and the radial crack training dataset The inputs are respectively fed into the second pre-trained network pre r and four pre-trained models In this process, adaptive features of radial crack depth are obtained. General characteristics of radial crack depth
[0135] 2051.2 Adaptive feature for axial crack depth Common characteristics with axial crack depth By performing fusion, the fused axial feature vector at the crack is obtained. As shown in Equation (12), and the adaptive feature of radial crack depth Common features with radial crack depth The fusion process is performed to obtain the fused radial feature vector at the crack. As shown in formula (13),
[0136] Formula (12):
[0137] Formula (13):
[0138] Where θ = 0.5.
[0139] 2051.3. Merge the axial feature vector at the crack. As a label for the radial network, the second pre-trained network pre is updated by minimizing the first loss function, as shown in Equation (14), using gradient descent. r Network parameters.
[0140] Formula (14):
[0141] Furthermore, the radial crack training data The input is fed into the second pre-trained network after training. r In this process, the adaptive feature for updating radial crack depth is obtained. Update the radial crack depth adaptive feature Common features with radial crack depth Perform a second fusion to obtain the updated fused radial feature vector at the crack. Where λ = 0.2.
[0142] 2051.4. Update the radial fusion feature vector at the crack. As the label for the axial network, the first pre-trained network pre is updated using gradient descent by minimizing the second loss function, as shown in Equation (15). a Network parameters.
[0143] Formula (15):
[0144] Furthermore, the axial crack training dataset Input into the first pre-trained network after training a In this process, the adaptive feature for updating the axial crack depth is obtained. Update the adaptive feature for axial crack depth Common characteristics with axial crack depth Perform a second fusion to obtain the updated axial fusion feature vector at the crack. Where λ = 0.2, the multi-sensor fusion feature mutual supervision neural network after the first training is obtained.
[0145] 2052. Second stage of network training. The training samples are the non-slit training sample set S. nd By updating the network parameters, the axial features fused at non-crack locations and the radial features fused at non-crack locations are continuously pulled further apart.
[0146] 2052.1, The axial non-crack training dataset The inputs are respectively fed into the first pre-trained network after training. a 'and the third pre-trained model In this process, adaptive features for axial non-crack depth are obtained. General characteristics of axial non-crack depth and the radial non-crack training dataset The inputs are respectively fed into the second pre-trained network after training. r 'and the fourth pre-trained model In this process, the adaptive feature of radial non-crack depth is obtained. Radial non-crack depth general characteristics
[0147] 2052.2 Adaptive feature for axial non-crack depth Common features with axial non-crack depth By fusing the eigenvectors, we obtain the axial non-crack fusion feature vectors. As shown in Equation (16), and the adaptive feature of radial non-crack depth Common features with radial non-crack depth The fusion process is performed to obtain the fused radial feature vector at the non-crack locations. As shown in formula (17),
[0148] Formula (16):
[0149] Formula (17):
[0150] Where θ = 0.5.
[0151] 2052.3. Merge the radial feature vectors at non-crack locations. As a label for the radial network, the second pre-trained network pre is updated using gradient descent by minimizing the third loss function, as shown in Equation (18). r 'Network parameters'.
[0152] Formula (18):
[0153] Where α = 0.05.
[0154] Furthermore, the radial non-crack training dataset The input is fed into the second pre-trained network after retraining. r In this process, the updated radial non-crack depth adaptive features are obtained. Update the radial non-crack depth adaptive feature Common features with radial non-crack depth Perform a second fusion to obtain the updated fused radial feature vector at the non-crack locations.
[0155] 2052.4. Update and fuse the radial feature vector at non-crack locations. As the label for the axial network, the first pre-trained network pre is updated using gradient descent by minimizing the fourth loss function, as shown in Equation (19). a 'Network parameters'.
[0156] Formula (19):
[0157] Where α = 0.05.
[0158] Furthermore, the axial non-crack training dataset The input is fed into the first pre-trained network after retraining. a In this process, the adaptive features for updating the axial non-crack depth are obtained. Update the axial non-crack depth adaptive feature Common features with axial non-crack depth Perform a second fusion to obtain the updated fused axial feature vector at non-crack locations. Obtain the multi-sensor fusion feature mutual supervision neural network after the second training.
[0159] 2053. Repeat steps 2051 and 2052 continuously to update the network parameters until the training rounds reach the cutoff condition, complete the network parameter update, and obtain the target multi-sensor fusion feature mutual supervision neural network.
[0160] Specifically, the number of training iterations is determined. In each training iteration, the multi-sensor fusion feature mutual supervision neural network (MSN) obtained from the second training iteration in the previous iteration is trained on the crack training sample set for the first time in the current iteration. The network parameters are updated to ensure that the fused axial and radial features at the crack continue to approximate each other. Conversely, the multi-sensor fusion feature mutual supervision neural network obtained from the first training iteration in the current iteration is trained on the non-crack training sample set for the second time in the current iteration. The network parameters are updated to ensure that the fused axial and radial features at non-crack locations continue to diverge from each other. This process continues until the number of training iterations reaches the predetermined number, thus obtaining the target multi-sensor fusion feature mutual supervision neural network.
[0161] 206. The crack signal in the test sample is determined based on the trained multi-sensor fusion feature mutual supervision neural network. The specific process is as follows:
[0162] 2061. Axial test sample set and radial test sample set The inputs are respectively fed into the target multi-sensor fusion feature mutual supervision neural network to obtain axial depth adaptive features. Axial Depth General Features Radial Depth Adaptive Features Radial Depth General Features
[0163] 2062. Adaptive feature for axial depth and axial depth general features The fusion process is performed to obtain the fused axial feature vector. and adaptive radial depth features and radial depth general features Perform fusion, fusing radial feature vectors
[0164] 2063. Calculate the fused axial eigenvector. With fused radial eigenvectors The error E between them is expressed as:
[0165]
[0166] 2064. Set an anomaly threshold τ, and set the error e of each test sample in the test sample set as the threshold. i Compared with the abnormal threshold τ, if e i If e ≥ τ, then the test sample is determined to be a crack sample. i If <τ, then the test sample is determined to be a non-cracked sample, and at least one cracked sample is obtained.
[0167] The method in this application extracts depth-adaptive features and depth-general features from leakage magnetic crack and non-crack signals using a pre-trained model with fine-tuning layers and a pre-trained model with completely fixed parameters. These depth-adaptive and depth-general features are then fused. Mutual supervision training continuously approximates the fused features of crack signals corresponding to the axial and radial directions, while simultaneously distancing the fused features of non-crack signals corresponding to the axial and radial directions. Finally, the crack detection network is trained, achieving high-precision crack detection. This invention overcomes the problem of insufficient actual crack samples and the issue of indistinct crack variations, while improving the accuracy of crack detection in buried pipelines and exhibiting strong robustness to signal noise.
[0168] Example 2
[0169] This application provides a crack detection device, such as... Figure 3 As shown, it includes: a control module 301, a generation module 302, an establishment module 303, a first training module 304, a second training module 305, and a determination module 306.
[0170] The control module 301 is used to control the forward movement of the magnetic flux leakage detector installed in the buried pipeline;
[0171] The generation module 302 is used to acquire the magnetic flux leakage axial signal and the magnetic flux leakage radial signal during the advancement of the magnetic flux leakage detector, and to generate an initial crack training sample set, an initial non-crack training sample set, and an initial test sample set based on the magnetic flux leakage axial signal and the magnetic flux leakage radial signal, respectively. The initial crack training sample set, the initial non-crack training sample set, and the initial test sample set are preprocessed to obtain the crack training sample set, the non-crack training sample set, and the test sample set.
[0172] The module 303 is used to establish a multi-sensor fusion feature mutual supervision neural network;
[0173] The first training module 304 is used to perform the first training of the multi-sensor fusion feature mutual supervision neural network based on the crack training sample set, update the network parameters so that the fused axial features and fused radial features at the crack are close to each other, and perform the second training of the multi-sensor fusion feature mutual supervision neural network after the first training based on the non-crack training sample set, update the network parameters so that the fused axial features at the non-crack location and the fused radial features at the non-crack location are far apart from each other, and obtain the multi-sensor fusion feature mutual supervision neural network after the second training as the training network for the next round.
[0174] The second training module 305 is used to determine the number of training rounds. In each training round, the multi-sensor fusion feature mutual supervision neural network obtained from the second training in the previous round is trained based on the crack training sample set. The network parameters are updated to make the fused axial features and fused radial features at the crack continue to approach each other. The multi-sensor fusion feature mutual supervision neural network obtained from the first training in the current round is trained based on the non-crack training sample set. The network parameters are updated to make the fused axial features and fused radial features at the non-crack continue to move away from each other. The training rounds are repeated until the number of training rounds is reached, thus obtaining the target multi-sensor fusion feature mutual supervision neural network.
[0175] The determination module 306 is used to determine crack samples in the test sample set based on a target multi-sensor fusion feature mutual supervision neural network.
[0176] In specific application scenarios, this generation module 302 is also used for:
[0177] Training and test signal sample sets are generated based on leakage magnetic axial and leakage magnetic radial signals.
[0178] The training signal sample set is divided into several parts to determine an initial crack training sample set including multiple axial crack training samples and corresponding multiple radial crack training samples, and an initial non-crack training sample set including multiple axial non-crack training samples and corresponding multiple radial non-crack training samples.
[0179] The initial crack training sample set is X d : This is the i-th axial crack training sample in the initial crack training sample set. Let N be the i-th radial crack training sample in the initial crack training sample set, and N be the number of axial crack training samples / radial crack training samples in the initial crack training sample set.
[0180] Initial non-crack training sample set X nd for: Let i be the i-th axially non-cracked training sample in the initial non-cracked training sample set. Let N be the i-th radial non-crack training sample in the initial non-crack training sample set, and N be the number of axial non-crack training samples / radial non-crack training samples in the initial non-crack training sample set.
[0181] The axial and radial magnetic flux leakage signals included in the test signal sample set are divided into multiple test samples according to preset rules to obtain the initial axial test sample set and the initial radial test sample set.
[0182] Initial axial test sample set for: Let N be the i-th initial axial test sample in the initial axial test sample set. T This represents the number of initial axial test samples in the initial axial test sample set.
[0183] Initial radial test sample set for: Let N be the i-th initial radial test sample in the initial radial test sample set. T This represents the number of initial radial test samples in the initial radial test sample set.
[0184] Initial axial test sample set and initial radial test sample set To form the initial test sample set.
[0185] In specific application scenarios, this generation module 302 is also used for:
[0186] Base value correction is performed on each sample in the initial crack training sample set, the initial non-crack training sample set, the initial axial test sample set, and the initial radial test sample set to ensure that the mean of each channel in the initial crack training sample set, the initial non-crack training sample set, the initial axial test sample set, and the initial radial test sample set is a constant value ε.
[0187] Two-dimensional cubic spline interpolation was used to interpolate each corrected sample in the initial crack training sample set, the initial non-crack training sample set, the initial axial test sample set, and the initial radial test sample set. Each positively corrected and interpolated sample in these sets was then converted into a three-channel image using rainbow encoding, resulting in the crack training sample set, the non-crack training sample set, the axial test sample set, and the radial test sample set.
[0188] Crack training sample set S d for: Let i be the i-th axial crack training sample in the crack training sample set. Let i be the i-th radial crack training sample in the crack training sample set.
[0189] Non-crack training sample set S nd for: This is the i-th axially non-crack training sample in the non-crack training sample set. Let i be the i-th radially non-crack training sample in the non-crack training sample set.
[0190] Axial test sample set for: Let i be the i-th axial test sample in the axial test sample set.
[0191] Radial test sample set for: This refers to the i-th radial test sample in the radial test sample set.
[0192] Axial test sample set and radial test sample set To form a test sample set.
[0193] In specific application scenarios, this module 303 is also used for:
[0194] Establish a multi-sensor fusion feature mutual supervision neural network comprising feature extraction, feature fusion, and feature mutual supervision components; wherein,
[0195] The feature extraction part includes a first pre-trained network pre-trained with fixed and fine-tuned layers for extracting axial depth adaptive features. a A second pre-trained network, pre-trained with fixed and fine-tuned layers, is used to extract radial depth adaptive features. r A third pre-trained model for extracting general features of axial depth. and a fourth pre-trained model for extracting radial depth general features
[0196] The feature fusion section is used to fuse the axial depth adaptive feature value with the axial depth general feature to obtain the fused axial feature vector, and to fuse the radial depth adaptive feature value with the radial depth general feature to obtain the fused radial feature vector;
[0197] The feature mutual supervision part is used to continuously supervise and fuse axial feature vectors and fused radial feature vectors, so that the fused axial features and fused radial features at cracks are close to each other, and the fused axial features and fused radial features at non-crack locations are far apart from each other.
[0198] In specific application scenarios, the first training module 304 is also used for:
[0199] From the crack training sample set S d Extracting the axial crack training dataset and radial crack training dataset
[0200] training dataset for axial cracks The inputs are respectively fed into the first pre-trained network pre a and the third pre-trained model In this process, adaptive features for axial crack depth are obtained. General characteristics of axial crack depth and the radial crack training dataset The inputs are respectively fed into the second pre-trained network pre r and four pre-trained models In this process, adaptive features of radial crack depth are obtained. General characteristics of radial crack depth
[0201] Adaptive feature for axial crack depth Common characteristics with axial crack depth By performing fusion, the fused axial feature vector at the crack is obtained. and adaptive features for radial crack depth Common features with radial crack depth The fusion process is performed to obtain the fused radial feature vector at the crack.
[0202] Fuse the axial feature vector at the crack As a label for the radial network, the second pre-trained network is updated using gradient descent by minimizing the first loss function. r The network parameters, and the radial crack training data The input is fed into the second pre-trained network after training. r In this process, the adaptive feature for updating radial crack depth is obtained. Update the radial crack depth adaptive feature Common features with radial crack depth Perform a second fusion to obtain the updated fused radial feature vector at the crack. The first loss function is:
[0203]
[0204] Where λ represents the weight;
[0205] Update the radial fusion feature vector at the crack. As labels for the axial network, the first pre-trained network pre is updated using gradient descent by minimizing the second loss function. a The network parameters, and the training dataset for axial cracks. Input into the first pre-trained network after training a In this process, the adaptive feature for updating the axial crack depth is obtained. Update the adaptive feature for axial crack depth Common characteristics with axial crack depth Perform a second fusion to obtain the updated axial fusion feature vector at the crack. The multi-sensor fusion feature mutual supervision neural network after the first training is obtained, wherein the second loss function is:
[0206]
[0207] In specific application scenarios, the first training module 304 is also used for:
[0208] From the non-slit training sample set S nd Extracting the axial non-crack training dataset and radial non-crack training dataset
[0209] Axial non-crack training dataset The inputs are respectively fed into the first pre-trained network pre after training. a 'and the third pre-trained model In this process, adaptive features for axial non-crack depth are obtained. General characteristics of axial non-crack depth and the radial non-crack training dataset The inputs are respectively fed into the second pre-trained network after training. r 'and the fourth pre-trained model In this process, the adaptive feature of radial non-crack depth is obtained. Radial non-crack depth general characteristics
[0210] Adaptive feature for axial non-crack depth Common features with axial non-crack depth By fusing the eigenvectors, we obtain the axial non-crack fusion feature vectors. and adaptive features for radial non-crack depth Common features with radial non-crack depth The fusion process is performed to obtain the fused radial feature vector at the non-crack locations.
[0211] Fuse radial feature vectors at non-crack locations As a label for the radial network, the second pre-trained network (pre) is further updated using gradient descent by minimizing the third loss function. r The network parameters, and the radial non-crack training dataset. The input is fed into the second pre-trained network after retraining. r In this process, the updated radial non-crack depth adaptive features are obtained. Update the radial non-crack depth adaptive feature Common features with radial non-crack depth Perform a second fusion to obtain the updated fused radial feature vector at the non-crack locations. The third loss function is:
[0212]
[0213] Where α is a constant;
[0214] Update the fused radial feature vector at non-crack locations. As the label for the axial network, the first pre-trained network (pre) is updated using gradient descent by minimizing the fourth loss function. a The network parameters, and the axial non-crack training dataset. The input is fed into the first pre-trained network after retraining. a In this process, the adaptive features for updating the axial non-crack depth are obtained. Update the axial non-crack depth adaptive feature Common features with axial non-crack depth Perform a second fusion to obtain the updated fused axial feature vector at non-crack locations. The multi-sensor fusion feature mutual supervision neural network obtained after the second training has the fourth loss function as follows:
[0215]
[0216] In specific application scenarios, this determining module 306 is also used for:
[0217] Axial test sample set and radial test sample set The inputs are respectively fed into the target multi-sensor fusion feature mutual supervision neural network to obtain axial depth adaptive features. Axial Depth General Features Radial Depth Adaptive Features Radial Depth General Features
[0218] Adaptive features for axial depth and axial depth general features The fusion process is performed to obtain the fused axial feature vector. and adaptive radial depth features and radial depth general features Perform fusion, fusing radial feature vectors
[0219] Calculate the fused axial eigenvector With fused radial eigenvectors The error E between them is expressed as:
[0220]
[0221] Set an anomaly threshold τ, and measure the error e of each test sample in the test sample set. i Compared with the abnormal threshold τ, if e i If ≥τ, then the test sample is determined to be a crack sample;
[0222] Obtain at least one crack sample.
[0223] The apparatus provided in this application first controls a magnetic flux leakage detector installed in a buried pipeline to move forward via a control module. Then, a generation module generates a crack training sample set, a non-crack training sample set, and a test sample set based on the magnetic flux leakage axial signal and the magnetic flux leakage radial signal. Next, a multi-sensor fusion feature mutual supervision neural network is established via a building module. A first training module performs a first training on the multi-sensor fusion feature mutual supervision neural network based on the crack training sample set, updating the network parameters. A second training is then performed on the multi-sensor fusion feature mutual supervision neural network after the first training, updating the network parameters again, based on the non-crack training sample set. The resulting multi-sensor fusion feature mutual supervision neural network after the second training is used as the training network for the next round. The second training module then determines the training parameters. The training iterations are repeated until the training epochs reach the required number of training iterations, resulting in a target multi-sensor fusion feature mutual supervision neural network. Finally, a determination module uses this target multi-sensor fusion feature mutual supervision neural network to determine at least one crack sample in the test sample set. This method achieves crack detection in buried pipelines through the mutual supervision of leakage magnetic field axial and radial fusion features. That is, through continuous training, the fused axial and radial features at crack locations continuously approach each other, while the fused axial and radial features at non-crack locations continuously move away from each other, updating the network parameters to obtain the target multi-sensor fusion feature mutual supervision neural network. This achieves high-precision crack detection and overcomes the current problem of low crack detection accuracy due to insufficient crack training samples and fluctuations in non-crack signals.
[0224] Example 3
[0225] This application also provides an electronic device, such as... Figure 4 As shown, the electronic device includes a bus, a processor, a memory, and a communication interface. It may also include an input / output interface and a display device. The various functional units can communicate with each other via the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the crack detection method described in the above embodiment.
[0226] Example 4
[0227] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of a crack detection method.
[0228] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented in hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0229] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.
Claims
1. A crack detection method, characterized in that, include: The magnetic flux leakage detector installed inside the buried pipeline is controlled to move forward. The magnetic flux leakage detector is used to release magnetic signals and receive magnetic flux leakage signals generated when the magnetic signals pass through the metal pipe wall of the buried pipeline. During the forward movement of the magnetic flux leakage detector, axial and radial magnetic flux leakage signals are acquired, and an initial crack training sample set, an initial non-crack training sample set, and an initial test sample set are generated based on the axial and radial magnetic flux leakage signals, respectively. The initial crack training sample set, the initial non-crack training sample set, and the initial test sample set are then preprocessed to obtain the crack training sample set, the non-crack training sample set, and the test sample set. Establish a multi-sensor fusion feature mutual supervision neural network; The multi-sensor fusion feature mutual supervision neural network is trained for the first time based on the crack training sample set, and the network parameters are updated so that the fused axial features and fused radial features at the crack are close to each other. Then, the multi-sensor fusion feature mutual supervision neural network after the first training is trained based on the non-crack training sample set, and the network parameters are updated so that the fused axial features at the non-crack location and the fused radial features at the non-crack location are far apart from each other. The multi-sensor fusion feature mutual supervision neural network after the second training is used as the training network for the next round. The number of training iterations is determined. In each training iteration, the multi-sensor fusion feature mutual supervision neural network obtained from the second training in the previous iteration is trained for the first time based on the crack training sample set. The network parameters are updated to make the fused axial features and fused radial features at the crack continue to approach each other. The multi-sensor fusion feature mutual supervision neural network obtained from the first training in the current iteration is trained for the second time based on the non-crack training sample set. The network parameters are updated to make the fused axial features and fused radial features at non-crack locations continue to move away from each other. This process continues until the number of training iterations reaches the specified number of training iterations, thus obtaining the target multi-sensor fusion feature mutual supervision neural network. The crack samples in the test sample set are determined based on the target multi-sensor fusion feature mutual supervision neural network.
2. The crack detection method according to claim 1, characterized in that, The process of generating an initial crack training sample set, an initial non-crack training sample set, and an initial test sample set based on the leakage magnetic axial signal and the leakage magnetic radial signal, respectively, includes: A training signal sample set and a test signal sample set are generated based on the leakage magnetic axial signal and the leakage magnetic radial signal; The training signal sample set is divided into several parts to determine an initial crack training sample set including multiple axial crack training samples and corresponding multiple radial crack training samples, and an initial non-crack training sample set including multiple axial non-crack training samples and corresponding multiple radial non-crack training samples. The initial crack training sample set is X. d : This refers to the i-th axial crack training sample in the initial crack training sample set. Let N be the i-th radial crack training sample in the initial crack training sample set, and N be the number of axial crack training samples / radial crack training samples in the initial crack training sample set. The initial non-crack training sample set X nd for: This refers to the i-th axially non-cracked training sample in the initial non-cracked training sample set. Let N be the i-th radial non-crack training sample in the initial non-crack training sample set, and N be the number of axial non-crack training samples / radial non-crack training samples in the initial non-crack training sample set. The axial and radial magnetic flux leakage signals included in the test signal sample set are divided into multiple test samples according to a preset rule to obtain an initial axial test sample set and an initial radial test sample set, wherein... The initial axial test sample set for: Let N be the i-th initial axial test sample in the initial axial test sample set. T The initial axial test sample set contains the number of initial axial test samples. The initial radial test sample set for: Let N be the i-th initial radial test sample in the initial radial test sample set. T The number of initial radial test samples in the initial radial test sample set; The initial axial test sample set and the initial radial test sample set The initial test sample set is thus formed.
3. The crack detection method according to claim 2, characterized in that, The preprocessing of the initial crack training sample set, the initial non-crack training sample set, and the initial test sample set to obtain the crack training sample set, the non-crack training sample set, and the test sample set includes: Base value correction is performed on each sample in the initial crack training sample set, the initial non-crack training sample set, the initial axial test sample set, and the initial radial test sample set to ensure that the mean value of each channel in the initial crack training sample set, the initial non-crack training sample set, the initial axial test sample set, and the initial radial test sample set is a constant value ε. Two-dimensional cubic spline interpolation is used to interpolate each corrected sample in the initial crack training sample set, the initial non-crack training sample set, the initial axial test sample set, and the initial radial test sample set. Each positively corrected and interpolated sample in these sets is then converted into a three-channel image using rainbow encoding, thus obtaining the crack training sample set, the non-crack training sample set, the axial test sample set, and the radial test sample set. The crack training sample set S d for: This refers to the i-th axial crack training sample in the crack training sample set. Let i be the i-th radial crack training sample in the crack training sample set. The non-crack training sample set S nd for: This refers to the i-th axially non-cracked training sample in the non-cracked training sample set. This refers to the i-th radially non-cracked training sample in the non-cracked training sample set. The axial test sample set for: For the i-th axial test sample in the axial test sample set, The radial test sample set for: This refers to the i-th radial test sample in the radial test sample set. The axial test sample set and the radial test sample set The test sample set is composed of these components.
4. The crack detection method according to claim 3, characterized in that, The establishment of a multi-sensor fusion feature mutual supervision neural network includes: Establish a multi-sensor fusion feature mutual supervision neural network comprising feature extraction, feature fusion, and feature mutual supervision components; wherein, The feature extraction part includes a first pre-trained network pre-trained with fixed and fine-tuning layers for extracting axial depth adaptive features. a A second pre-trained network, pre-trained with fixed and fine-tuned layers, is used to extract radial depth adaptive features. r A third pre-trained model for extracting general features of axial depth. and a fourth pre-trained model for extracting radial depth general features The feature fusion section is used to fuse the axial depth adaptive feature value with the axial depth general feature to obtain a fused axial feature vector, and to fuse the radial depth adaptive feature value with the radial depth general feature to obtain a fused radial feature vector; The feature mutual supervision part is used to continuously supervise the fused axial feature vector and the fused radial feature vector to make the fused axial feature at the crack and the fused radial feature at the crack approach each other, and the fused axial feature at the non-crack and the fused radial feature at the non-crack away from each other.
5. The crack detection method according to claim 4, characterized in that, The first training of the multi-sensor fusion feature mutual supervision neural network based on the crack training sample set, and the updating of the network parameters, includes: From the crack training sample set S d Extracting the axial crack training dataset and radial crack training dataset The axial crack training dataset The inputs are respectively fed into the first pre-trained network pre a and the third pre-trained model In this process, adaptive features for axial crack depth are obtained. General characteristics of axial crack depth and the radial crack training dataset The inputs are respectively fed into the second pre-trained network pre r and the four pre-trained models In this process, adaptive features of radial crack depth are obtained. General characteristics of radial crack depth The adaptive feature of the axial crack depth Common features with the axial crack depth By performing fusion, the fused axial feature vector at the crack is obtained. And the adaptive feature of the radial crack depth Common features with the radial crack depth The fusion process is performed to obtain the fused radial feature vector at the crack. The axial feature vector at the crack is fused. As labels for the radial network, the second pre-trained network pre is updated using gradient descent by minimizing the first loss function. r The network parameters, and the radial crack training data. The input is fed into the second pre-trained network after training. r In this process, the adaptive feature for updating radial crack depth is obtained. The updated radial crack depth adaptive feature Common features with the radial crack depth Perform a second fusion to obtain the updated fused radial feature vector at the crack. The first loss function is: Where λ represents the weight; Update the radial fusion feature vector at the crack. As labels for the axial network, the first pre-trained network pre is updated using gradient descent by minimizing the second loss function. a The network parameters, and the training dataset of the axial crack. Input into the first pre-trained network after training a In this process, the adaptive feature for updating the axial crack depth is obtained. The updated axial crack depth adaptive feature Common features with the axial crack depth Perform a second fusion to obtain the updated axial fusion feature vector at the crack. The multi-sensor fusion feature mutual supervision neural network after the first training is obtained, wherein the second loss function is:
6. The crack detection method according to claim 5, characterized in that, The second training of the multi-sensor fusion feature mutual supervision neural network based on the non-slit training sample set after the first training, and the updating of the network parameters, includes: From the non-crack training sample set S nd Extracting the axial non-crack training dataset and radial non-crack training dataset The axial non-crack training dataset The inputs are respectively fed into the first pre-trained network pre after training. a 'and the third pre-trained model In this process, adaptive features for axial non-crack depth are obtained. General characteristics of axial non-crack depth and the radial non-crack training dataset The inputs are respectively fed into the trained second pre-trained network pre r 'and the fourth pre-trained model In this process, the adaptive feature of radial non-crack depth is obtained. Radial non-crack depth general characteristics The adaptive feature of the axial non-crack depth Common features with the aforementioned axial non-crack depth The axial non-crack fusion feature vector is obtained by fusion. and the radial non-crack depth adaptive feature Common features with the radial non-crack depth The fusion process is performed to obtain the fused radial feature vector at the non-crack locations. The radial feature vector at the non-crack location is fused. As a label for the radial network, the second pre-trained network (pre) is further updated using gradient descent by minimizing the third loss function. r The network parameters, and the radial non-crack training dataset. The input is fed into the second pre-trained network after retraining. r In this process, the updated radial non-crack depth adaptive features are obtained. The updated radial non-crack depth adaptive feature Common features with the radial non-crack depth Perform a second fusion to obtain the updated fused radial feature vector at the non-crack locations. The third loss function is: Where α is a constant; Update the fused radial feature vector at the non-crack locations. As labels for the axial network, the first pre-trained network (pre) is updated using gradient descent by minimizing the fourth loss function. a The network parameters, and the axial non-crack training dataset. The input is fed into the first pre-trained network after retraining. a In this process, the adaptive features for updating the axial non-crack depth are obtained. The updated axial non-crack depth adaptive feature Common features with the aforementioned axial non-crack depth Perform a second fusion to obtain the updated fused axial feature vector at non-crack locations. The multi-sensor fusion feature mutual supervision neural network after the second training is obtained, wherein the fourth loss function is:
7. The crack detection method according to claim 6, characterized in that, The step of determining at least one crack sample in the axial test sample set and the radial test sample set based on the target multi-sensor fusion feature mutual supervision neural network includes: The axial test sample set and the radial test sample set The inputs are respectively fed into the target multi-sensor fusion feature mutual supervision neural network to obtain axial depth adaptive features. Axial Depth General Features Radial Depth Adaptive Features Radial Depth General Features The axial depth adaptive feature and the axial depth general feature The fusion process is performed to obtain the fused axial feature vector. and the radial depth adaptive feature and the radial depth general feature Perform fusion, fusing radial feature vectors Calculate the fused axial eigenvector With fused radial eigenvectors The error E between them is expressed as: Set an anomaly threshold τ, and measure the error e of each test sample in the test sample set. i Compared with the aforementioned abnormal threshold τ, if e i If ≥τ, then the test sample is determined to be a crack sample; Obtain at least one crack sample.
8. A crack detection device, characterized in that, include: A control module is used to control the forward movement of a magnetic flux leakage detector installed inside a buried pipeline. The magnetic flux leakage detector is used to release a magnetic signal and receive a magnetic flux leakage signal generated when the magnetic signal passes through the metal wall of the buried pipeline. The generation module is used to acquire magnetic flux leakage axial signal and magnetic flux leakage radial signal during the forward movement of the magnetic flux leakage detector, and to generate an initial crack training sample set, an initial non-crack training sample set, and an initial test sample set based on the magnetic flux leakage axial signal and the magnetic flux leakage radial signal, respectively. The initial crack training sample set, the initial non-crack training sample set, and the initial test sample set are preprocessed to obtain the crack training sample set, the non-crack training sample set, and the test sample set. Establish a module for building a multi-sensor fusion feature mutual supervision neural network; The first training module is used to perform a first training on the multi-sensor fusion feature mutual supervision neural network based on the crack training sample set, update the network parameters so that the fused axial features and fused radial features at the crack are close to each other, and perform a second training on the multi-sensor fusion feature mutual supervision neural network after the first training based on the non-crack training sample set, update the network parameters so that the fused axial features at the non-crack location and the fused radial features at the non-crack location are far apart from each other, and obtain the multi-sensor fusion feature mutual supervision neural network after the second training as the training network for the next round. The second training module is used to determine the number of training rounds. In each training round, the multi-sensor fusion feature mutual supervision neural network obtained from the second training in the previous round is trained based on the crack training sample set. The network parameters are updated to make the fused axial features and fused radial features at the crack continue to approach each other. The multi-sensor fusion feature mutual supervision neural network obtained from the first training in the current round is trained based on the non-crack training sample set. The network parameters are updated to make the fused axial features at non-crack locations and the fused radial features at non-crack locations continue to move away from each other. The training rounds are repeated until the number of training rounds is reached, thus obtaining the target multi-sensor fusion feature mutual supervision neural network. The determination module is used to determine the crack samples in the test sample set based on the target multi-sensor fusion feature mutual supervision neural network.
9. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Feature extracting method for pipeline defect leakage flux signals
CN106870957A
Method and device for generating three-dimensional contour for pipeline metal loss defect
CN113984880A