Pipeline defect three-dimensional contour inversion method and device, electronic equipment and storage medium

By improving the Secretary-Bird optimization algorithm, combining differential evolution, continuity correction and local perturbation strategies, the problem of insufficient solution rationality in three-dimensional inversion of pipeline defects is solved, and the accuracy and accuracy of the inversion results are significantly improved.

CN119780213AActive Publication Date: 2025-04-08NORTHEASTERN UNIV CHINA

Patent Information

Application Number
CN202510287269.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-04-08
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

The existing methods fail to effectively consider the rationality of the corresponding defect profile of the solution during the three-dimensional inversion of pipeline defects, resulting in a local optimal solution with a large deviation from the actual defect.

Method used

The differential evolution strategy, continuity correction strategy and local perturbation strategy are used to improve the Secretary-Bird optimization algorithm. By preset parameters such as cosine parameters, random perturbation terms and nonlinear convergence factors, the search range of the algorithm, the diversity of solutions and the convergence ability are improved, and the unreliable depth values ​​are corrected through the continuity correction strategy.

Benefits of technology

Effectively avoid the solution from falling into local optimization, improve the accuracy and accuracy of the inversion result, and improve the accuracy of the three-dimensional contour of pipeline defect inversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119780213A_ABST
    Figure CN119780213A_ABST
Patent Text Reader

Abstract

The invention discloses a pipeline defect three-dimensional contour inversion method and device, electronic equipment and a storage medium, relates to the field of pipeline internal detection, and aims to improve a formula in an exploration stage of a secretary bird optimization algorithm through preset parameters so as to improve the precision of a pipeline defect inversion result. The preset parameter is any one of a sine and cosine parameter, a random disturbance term and a nonlinear convergence factor, the sine and cosine parameter is added in the initial stage of iteration, and the search range of the algorithm is expanded; random item disturbance is added in the middle stage of iteration, and the diversity of solutions is increased; and a nonlinear convergence factor is added in the later stage of iteration, so that the convergence capability of the algorithm is enhanced. And meanwhile, a differential evolution strategy and a local perturbation strategy are adopted to enhance the searching capability and the fitting capability of the secretary bird optimization algorithm, and the precision of the inversion profile is improved. In addition, the invention further provides a continuity correction strategy to correct an untrusted depth value and help the inversion process to be far away from local optimum, so that the precision of three-dimensional inversion is improved, and the accuracy of an inversion result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of pipeline in-line detection, and in particular to a pipeline defect three-dimensional contour inversion method, device, electronic equipment and storage medium. Background Art

[0002] Pipelines are important carriers of energy transportation. Pipeline nondestructive testing provides an important guarantee for the safe and stable operation of pipelines. Pipeline nondestructive testing is an effective method to evaluate the condition and damage of pipelines without destroying samples. Common nondestructive testing methods include leakage flux testing, eddy current testing, ultrasonic testing, etc. Among them, leakage flux testing is widely used due to its simple operation, strong real-time detection capability, and high degree of automation. Therefore, defect contour construction based on leakage flux detection plays an important role in detecting pipeline conditions and damage.

[0003] In the related art, CN119005025A discloses an irregular pipeline defect inversion method based on genetic algorithm and improved taboo search, which simulates the magnetic leakage signal through a three-dimensional magnetic dipole model, constructs a depth matrix of pipeline defects, and then uses a genetic algorithm for preliminary inversion. The fitness of the population is optimized through cross-matching and mutation, and the taboo search mechanism is further adopted to generate neighborhood solutions through a sliding window strategy and update the taboo table to find the global optimal solution. However, the applicant recognizes that although this method adopts an innovative optimization algorithm to solve the three-dimensional defect inversion problem, it does not consider the rationality of the solution corresponding to the defect contour during the iterative inversion process, lacks a suitable method to test and correct the generated solution, and the result may still be a local optimal solution with a large deviation from the actual defect. Summary of the invention

[0004] In view of this, the present application provides a pipeline defect three-dimensional contour inversion method, device, electronic device and storage medium, the main purpose of which is to solve the problem that the existing method does not consider the rationality of the defect contour corresponding to the solution during the iterative inversion process, lacks a suitable method to check and correct the generated solution, and the result may still be a local optimal solution that deviates greatly from the actual defect.

[0005] According to the first aspect of the present application, a pipeline defect three-dimensional contour inversion method is provided, the method comprising: Collecting magnetic flux leakage signals of the target pipeline based on sensors, obtaining magnetic induction intensities of multiple sampling points, and constructing a three-dimensional forward model of the target pipeline; Initialize N feasible solutions, and use the N feasible solutions to construct an initial population matrix, each of the feasible solutions has Dim dimensions, each of the dimensions corresponds to a parameter value, the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, and the parameter value corresponding to the dimension is used to characterize the depth value of a region; Iteratively updating the initial population matrix, and selecting preset parameters to calculate the initial population matrix according to the current number of iterations to obtain N first target solutions, wherein the preset parameters are any one of sine and cosine parameters, random disturbance terms, and nonlinear convergence factors; The N feasible solutions are updated to obtain an exploration phase update matrix, and differential evolution calculation is performed on the exploration phase update matrix to obtain a differential evolution phase update matrix; The update matrix in the differential evolution stage is subjected to continuity correction and update operations to obtain a continuity correction matrix, and the continuity correction matrix is ​​subjected to local perturbation calculation to obtain a defect inversion result of the target pipeline.

[0006] According to a second aspect of the present application, a pipeline defect three-dimensional contour inversion device is provided, the device comprising: A data acquisition module is used to collect the magnetic leakage signal of the target pipeline based on the sensor, obtain the magnetic induction intensity of multiple sampling points, and construct a three-dimensional forward model of the target pipeline; An initialization module is used to initialize N feasible solutions, and use the N feasible solutions to construct an initial population matrix, each of the feasible solutions has Dim dimensions, each of the dimensions corresponds to a parameter value, the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, and the parameter value corresponding to the dimension is used to characterize the depth value of a region; An iterative update module, used for iteratively updating the initial population matrix, and selecting preset parameters to calculate the initial population matrix according to the current number of iterations to obtain N first target solutions, wherein the preset parameters are any one of sine and cosine parameters, random disturbance terms, and nonlinear convergence factors; A first calculation module is used to update the N feasible solutions to obtain an exploration phase update matrix, and perform differential evolution calculation on the exploration phase update matrix to obtain a differential evolution phase update matrix; The second calculation module is used to perform continuity correction and update operations on the update matrix in the differential evolution stage to obtain a continuity correction matrix, and to perform local perturbation calculation on the continuity correction matrix to obtain a defect inversion result of the target pipeline.

[0007] According to a third aspect of the present application, an electronic device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0008] According to a fourth aspect of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0009] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages: The present application provides a pipeline defect three-dimensional contour inversion method, device, electronic device and storage medium. The present application collects the magnetic leakage signal of the target pipeline based on the sensor, obtains the magnetic induction intensity of multiple sampling points, and constructs a three-dimensional forward model of the target pipeline, initializes N feasible solutions, uses the N feasible solutions to construct an initial population matrix, iteratively updates the initial population matrix, and selects preset parameters according to the current number of iterations to calculate the initial population matrix to obtain N first target solutions, updates the N feasible solutions to obtain an exploration phase update matrix, and performs differential evolution calculation on the exploration phase update matrix to obtain a differential evolution phase update matrix, performs continuity correction and update operations on the differential evolution phase update matrix to obtain a continuity correction matrix, and performs local perturbation calculation on the continuity correction matrix to obtain a defect inversion result of the target pipeline. Among them, each feasible solution has Dim dimensions, each dimension corresponds to a parameter value, the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, the parameter value corresponding to the dimension is used to characterize the depth value of an area, and the preset parameter is any one of the sine and cosine parameters, random perturbation terms, and nonlinear convergence factors. The formula of the exploration phase of the secretary bird optimization algorithm is improved by preset parameters, thereby improving the accuracy of the pipeline defect inversion results, wherein the preset parameter is any one of the sine and cosine parameters, random perturbation terms, and nonlinear convergence factors. Sine and cosine parameters are added in the initial stage of iteration to expand the search range of the algorithm; random term perturbations are added in the middle stage of iteration to increase the diversity of solutions; nonlinear convergence factors are added in the late stage of iteration to enhance the convergence ability of the algorithm. At the same time, differential evolution strategies and local perturbation strategies are adopted to enhance the search ability and fitting ability of the secretary bird optimization algorithm and improve the accuracy of the inversion profile. In addition, the present application also proposes a continuity correction strategy to correct unreliable depth values, help the inversion process stay away from the local optimum, and thus improve the accuracy of three-dimensional inversion and the accuracy of the inversion results.

[0010] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 A schematic diagram of a method flow for inverting a three-dimensional profile of a pipeline defect provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of another method flow for inverting three-dimensional contours of pipeline defects provided in an embodiment of the present application is shown; Figure 3 A schematic diagram of the architecture of a pipeline defect three-dimensional contour inversion based on a continuity correction strategy provided in an embodiment of the present application is shown; Figure 4 A schematic diagram of the structure of a pipeline defect three-dimensional contour inversion provided by an embodiment of the present application is shown; Figure 5 A schematic diagram of another structure of pipeline defect three-dimensional contour inversion provided by an embodiment of the present application is shown; Figure 6 A schematic diagram of the device structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0012] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0013] Defect inversion is the process of reversely solving the defect geometric contour based on the measured magnetic leakage signal. This method is mainly divided into a direct inversion method based on machine learning and an iterative inversion method based on optimization algorithm.

[0014] The direct inversion method uses machine learning to directly establish the mathematical relationship between the leakage magnetic signal and the geometric characteristics of the defect, and does not consider the physical process of signal generation. Therefore, although the direct inversion based on machine learning is simple and fast, it requires a large amount of data to train the mathematical model. Moreover, when the measurement conditions are different from the training conditions, the inversion results may be poor.

[0015] Iterative inversion based on magnetic leakage signals uses an optimization algorithm to reversely solve the defect contour. It has the characteristics of high accuracy and wide application range. The method includes a forward process and an inversion process. Forward modeling simulates the magnetic field distribution of the defect according to the geometric characteristics of the defect. There are relatively mature research results in this area. The inversion algorithm is the key to iterative inversion. For two-dimensional defect inversion, there are currently many methods, such as the improved cuckoo optimization algorithm, the improved particle swarm algorithm, etc. For three-dimensional defect inversion, there is currently an improved beetle optimization algorithm. However, when directly applied to three-dimensional inversion with higher degrees of freedom, the applicant found that these algorithms still produce local optimal solutions of poor quality.

[0016] In general, current 3D inversion methods have problems such as local optimum, weak convergence, low accuracy and poor robustness. In particular, during the iteration process, current methods only focus on reducing the degree of fitness and ignore the geometric continuity of the inversion profile, which exacerbates the above problems.

[0017] To solve this problem, this application proposes a pipeline defect three-dimensional contour inversion method, which adopts differential evolution strategy, continuity correction strategy and local perturbation strategy to improve the secretary bird optimization algorithm, effectively avoid the solution from falling into the local optimum continuously, and improve the accuracy and precision of the inversion result. The execution subject of this application can be a pipeline defect detection system, which relies on the computing power of the server to provide services to users. The server can be an independent server, or it can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and servers of basic cloud computing such as big data and artificial intelligence platforms, so that the pipeline defect detection system can fully consider the rationality of the defect contour corresponding to the solution, and use the improved secretary bird optimization algorithm to test and correct the generated solution, so as to improve the accuracy of the local optimal solution.

[0018] The present application embodiment provides a pipeline defect three-dimensional contour inversion method, such as Figure 1 As shown, the method includes: 101. The magnetic flux leakage signal of the target pipeline is collected based on the sensor, the magnetic induction intensity of multiple sampling points is obtained, and a three-dimensional forward model of the target pipeline is constructed.

[0019] In the embodiment of the present application, the pipeline defect detection system adopts a uniform magnetic charge model as a three-dimensional forward model, the core of which is to obtain the theoretical magnetic leakage signal distribution based on the shape of the defect. In the pipeline defect three-dimensional contour inversion method, the magnetic field distribution obtained by the three-dimensional forward model is compared with the actual signal through the fitness function. The smaller the deviation between the two, the closer the defect contour obtained by inversion is to the actual defect contour, and the higher the inversion accuracy.

[0020] 102. Initialize N feasible solutions and use the N feasible solutions to construct an initial population matrix.

[0021] In the embodiment of the present application, the pipeline defect detection system uses feasible solutions and parameter values ​​to reasonably describe and estimate the shape of pipeline defects, wherein each feasible solution has Dim dimensions, each dimension corresponds to a parameter value, and the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, and the parameter value corresponding to the dimension is used to characterize the depth value of a region. Moreover, N solutions are used to form a population matrix. This structured representation method facilitates the subsequent algorithm to operate and process the solution. In the improved secretary bird optimization algorithm, whether it is differential evolution, continuity correction, or local perturbation operations, each solution and its dimensional elements can be efficiently calculated and updated based on this population matrix, which is conducive to the implementation and execution of the algorithm.

[0022] 103. Iteratively update the initial population matrix, and select preset parameters to calculate the initial population matrix according to the current number of iterations to obtain N first target solutions.

[0023] In the embodiment of the present application, the pipeline defect detection system is updated through iteration, and the solution in the population matrix can be continuously adjusted and optimized according to the algorithm rules and fitness evaluation, thereby increasing the possibility of finding the global optimal solution and accurately detecting pipeline defects. Furthermore, in order to accurately detect pipeline defects, the formula of the exploration phase of the secretary bird optimization algorithm is improved. Specifically, sine and cosine parameters are added in the initial stage of the iteration to expand the search range of the algorithm; random term perturbations are added in the middle stage of the iteration to increase the diversity of solutions; nonlinear convergence factors are added in the late stage of the iteration to enhance the convergence ability of the algorithm, which can improve the accuracy of the results overall.

[0024] 104. Update N feasible solutions to obtain an exploration phase update matrix, and perform differential evolution calculation on the exploration phase update matrix to obtain a differential evolution phase update matrix.

[0025] In an embodiment of the present application, the pipeline defect detection system uses magnetic induction intensity at multiple sampling points and a three-dimensional forward model to determine the fitness of feasible solutions and the first target solution, and then updates the N feasible solutions based on the fitness to obtain an updated matrix in the exploration phase. The differential evolution calculation is performed on the basis of the updated matrix in the exploration phase, and can further explore better solutions in the local area by operating on the differences between individuals. Differential evolution operations such as mutation and crossover can enable the algorithm to perform more detailed searches near the current solution, which helps to find local optimal solutions that may be overlooked in the exploration phase, and further optimize the better solutions that have been found to improve the quality of the solution.

[0026] 105. Perform continuity correction and update operations on the update matrix in the differential evolution stage to obtain a continuity correction matrix, and perform local perturbation calculation on the continuity correction matrix to obtain a defect inversion result of the target pipeline.

[0027] In the embodiment of the present application, the pipeline defect detection system further adopts the continuity correction strategy and the local perturbation strategy to update the solution, and finally obtains the defect inversion result of the target pipeline. The addition of the differential evolution strategy and the local perturbation strategy to the secretary bird optimization algorithm can accurately analyze and judge the location, shape, size and other characteristics of pipeline defects, and can also adapt to various complex defect shapes. Moreover, the pipeline defect detection system can correct unreliable depth values ​​based on the continuity correction strategy, effectively avoid the solution from continuously falling into the local optimum, and improve the accuracy of the inversion results.

[0028] The embodiment of the present application provides a three-dimensional contour inversion method for pipeline defects. Compared with the prior art, the embodiment of the present invention obtains the magnetic induction intensity of multiple sampling points by collecting the leakage magnetic signal of the target pipeline based on the sensor, and constructs a three-dimensional forward model of the target pipeline, initializes N feasible solutions, uses the N feasible solutions to construct an initial population matrix, iteratively updates the initial population matrix, and selects preset parameters according to the current number of iterations to calculate the initial population matrix to obtain N first target solutions, updates the N feasible solutions to obtain an exploration phase update matrix, and performs differential evolution calculation on the exploration phase update matrix to obtain a differential evolution phase update matrix, performs continuity correction and update operations on the differential evolution phase update matrix to obtain a continuity correction matrix, and performs local perturbation calculation on the continuity correction matrix to obtain a defect inversion result of the target pipeline. Among them, each feasible solution has Dim dimensions, each dimension corresponds to a parameter value, the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, the parameter value corresponding to the dimension is used to characterize the depth value of an area, and the preset parameter is any one of the sine and cosine parameters, random perturbation terms, and nonlinear convergence factors. The formula of the exploration phase of the secretary bird optimization algorithm is improved by preset parameters, thereby improving the accuracy of the pipeline defect inversion results, wherein the preset parameter is any one of the sine and cosine parameters, random perturbation terms, and nonlinear convergence factors. Sine and cosine parameters are added in the initial stage of iteration to expand the search range of the algorithm; random term perturbations are added in the middle stage of iteration to increase the diversity of solutions; nonlinear convergence factors are added in the late stage of iteration to enhance the convergence ability of the algorithm. At the same time, differential evolution strategies and local perturbation strategies are adopted to enhance the search ability and fitting ability of the secretary bird optimization algorithm and improve the accuracy of the inversion profile. In addition, the present application also proposes a continuity correction strategy to correct unreliable depth values, help the inversion process stay away from the local optimum, and thus improve the accuracy of three-dimensional inversion and the accuracy of the inversion results.

[0029] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, the embodiment of the present application provides another pipeline defect three-dimensional contour inversion method, such as Figure 2 As shown, the method includes: 201. The magnetic flux leakage signal of the target pipeline is collected based on the sensor, the magnetic induction intensity of multiple sampling points is obtained, and a three-dimensional forward model of the target pipeline is constructed.

[0030] In an embodiment of the present application, a pipeline defect detection system uses a sensor to collect leakage magnetic signals of a defective section of a pipeline, obtains magnetic induction intensities at multiple sampling points, and simultaneously establishes a three-dimensional forward model of the section of the pipeline.

[0031] The construction process of the three-dimensional forward model can be as follows: Segmentation of pipeline defects into Depth Points The depth at , The depth matrix is ​​composed of , used to describe the three-dimensional contour of pipeline defects, depth matrix As shown in the following formula 1: Formula 1:

[0032] Next, in order to solve the three-dimensional defect contour, the three-dimensional magnetic field distribution within the detection range of each depth point is calculated. Superposition is performed to obtain the total spatial magnetic field distribution , as shown in the following formula 2: Formula 2:

[0033] It should be noted that the solution The actual signal measured The closer they are, the higher the accuracy of the calculated inversion contour.

[0034] 202. Initialize N feasible solutions, and use the N feasible solutions to construct an initial population matrix.

[0035] In the embodiment of the present application, for each feasible solution, Dim dimensions corresponding to the feasible solution are determined, and the parameter value corresponding to each dimension is calculated according to the dimension upper limit value and the dimension lower limit value of each dimension. The calculation formula is as shown in the following formula 3: Formula 3:

[0036] in, is the parameter value corresponding to the jth dimension of the i-th feasible solution, is the upper limit of the dimension of the jth dimension of the i-th feasible solution, is the lower limit of the dimension of the jth dimension of the i-th feasible solution, N is the number of feasible solutions, for example, N=100, and the parameter value is generated uniformly within the range between the upper and lower limits of each dimension. The feasible solution is used to characterize a defect shape of the target pipeline, indicating a possible description of the pipeline defect shape. The parameter value is used to characterize a depth value of the defect shape, and the pipeline defect is divided into Dim regions, each region corresponding to a depth value, so that the general shape of the pipeline defect can be depicted by the parameter value.

[0037] Next, the initial population matrix is ​​generated using the Dim parameter values ​​corresponding to each of the N feasible solutions, as shown in the following formula 4: Formula 4:

[0038] in, is the initial population matrix, is the i-th feasible solution, is the parameter value corresponding to the jth dimension of the i-th feasible solution, N is the number of feasible solutions, and Dim is the number of parameter values ​​corresponding to each feasible solution.

[0039] 203. According to the current number of iterations, the preset parameters are selected to calculate the initial population matrix to obtain N first target solutions, and the N feasible solutions are updated to obtain the exploration phase update matrix.

[0040] In the embodiment of the present application, in the current iteration number, the pipeline defect detection system obtains the Lyman flight distribution function in the secretary bird optimization algorithm, and uses the Lyman flight distribution function to calculate the Lyman flight step length. The calculation formula is as follows: Formula 5: Formula 5:

[0041]

[0042] in, is the Lyman flight step length, is the Lyman flight distribution function, is the first parameter, is the second parameter, and For interval A random number, is the gamma function. For example, , .

[0043] Next, the exploration phase update formula is obtained in the secretary bird optimization algorithm. Based on the preset parameters and the exploration phase update formula, the N feasible solutions included in the initial population matrix are calculated to obtain N first target solutions. The calculation formula is as follows: Formula 6:

[0044]

[0045] in, is the i-th first objective solution, is the i-th feasible solution of the initial population matrix, is the first random solution of the initial population matrix, is the second random solution of the initial population matrix, is the maximum number of iterations, is the current iteration number, For interval A random number, is the third random solution of the initial population matrix, is the random disturbance term, , is the optimal solution of the initial population matrix, , , is the Lyman flight step length. For example, This application uses the formula of the exploration phase of the secretary bird optimization algorithm using sine and cosine parameters, random disturbance terms, and nonlinear convergence factors, namely, Formula 6. and are the sine and cosine parameters, is the random disturbance term, is a nonlinear convergence factor. Therefore, sine and cosine are added in the initial stage of iteration to expand the search range of the algorithm; random term perturbation method is adopted in the middle stage of iteration to increase the diversity of solutions in the population; nonlinear convergence factor is added in the later stage of iteration to enhance the convergence ability of the algorithm, thereby improving the accuracy of the results overall.

[0046] Then, the magnetic induction intensity of multiple sampling points and the three-dimensional forward model are used to determine the fitness of N feasible solutions and the fitness of N first target solutions. Based on the fitness of N feasible solutions and the fitness of N first target solutions, each feasible solution is compared to obtain N exploration stage target solutions. The specific process is as follows: First, N feasible solutions are input into the three-dimensional forward model to obtain multiple first predicted magnetic induction intensities, and the suitability of the N feasible solutions is determined by calculating the magnetic induction intensities of multiple sampling points and the multiple first predicted magnetic induction intensities. N first target solutions are input into the three-dimensional forward model to obtain multiple second predicted magnetic induction intensities, and the suitability of the N first target solutions is determined by calculating the magnetic induction intensities of multiple sampling points and the multiple second predicted magnetic induction intensities.

[0047] Next, for each feasible solution, a first target solution associated with the feasible solution is extracted from the N first target solutions, and the fitness of the first target solution is compared with the fitness of the feasible solution.

[0048] If the fitness of the first target solution is determined to be less than the fitness of the feasible solution, the first target solution is used as the target solution of the exploration phase; If the fitness of the first target solution is determined to be greater than or equal to the fitness of the feasible solution, the feasible solution will be used as the target solution in the exploration phase.

[0049] In this way, each feasible solution is updated based on the above process to obtain N exploration phase target solutions, and finally the N exploration phase target solutions are used to generate the exploration phase update matrix.

[0050] 204. Perform differential evolution calculation on the exploration phase update matrix to obtain the differential evolution phase update matrix.

[0051] In an embodiment of the present application, the pipeline defect detection system adds a differential evolution strategy after the exploration phase of the secretary bird optimization algorithm to simulate the information exchange between individual secretary birds, which can enhance the information exchange between individuals in the population, thereby enhancing the algorithm's search capability. Since the secretary bird optimization algorithm mainly simulates the foraging behavior of secretary birds to conduct extensive searches in the solution space in the exploration phase to find potential optimal areas. However, as the complexity of the problem increases, a single search method may not be able to fully explore the entire solution space. Therefore, the differential evolution strategy can bring new solutions to the population by introducing mutation and crossover operations, increase the diversity of the population, further expand the search range, help the algorithm jump out of the local optimal solution, and search the entire solution space more comprehensively.

[0052] For each exploration phase target solution, the adaptive mutation factor calculation formula is obtained in the differential evolution strategy, and the adaptive mutation factor corresponding to the exploration phase target solution is determined using the adaptive mutation factor calculation formula. The calculation formula is as follows: Formula 7:

[0053] in, is an adaptive mutation factor, and For interval A random number, is the fourth parameter, is the first variation parameter, is the second variation parameter, is the third variation parameter. For example, , , , .

[0054] Next, the variation solution calculation formula is obtained in the differential evolution strategy, and the variation solution corresponding to the target solution in the exploration phase is determined by using the adaptive mutation factor and variation solution calculation formula corresponding to the target solution in the exploration phase. The calculation formula is as follows: Formula 8:

[0055] in, is the variation solution corresponding to the target solution of the i-th exploration stage, For interval A random number, is the fifth parameter, The first random solution to update the matrix in the exploration phase, The second random solution for updating the matrix during the exploration phase, The third random solution to update the matrix for the exploration phase. For example, It should be noted that the variation solution is limited to the upper and lower bounds and between.

[0056] Then a crossover operation is performed to obtain Dim target parameter values ​​corresponding to the target solution in the exploration phase.

[0057] For each target parameter value, an adaptive crossover rate calculation formula is obtained in the differential evolution strategy, and the adaptive crossover rate calculation formula is used to determine the adaptive crossover rate of the target parameter value. The calculation formula is as follows: Formula 9:

[0058] in, is the adaptive crossover rate of the target parameter value, and For interval A random number, is the preset parameter, is the reference crossover rate. For example, , .

[0059] Then, the specified parameter value is determined based on the variation solution, the adaptive crossover rate of the target parameter value, and the target parameter value. The calculation formula is as follows: Formula 10:

[0060] in, is the specified parameter value corresponding to the jth dimension of the ith experimental solution, is the value corresponding to the jth dimension of the ith variation solution, is the target parameter value corresponding to the jth dimension of the target solution in the i-th exploration stage, is the adaptive crossover rate of the target parameter value, For interval A random number.

[0061] In this way, each target parameter value of the exploration phase target solution is calculated respectively to obtain Dim specified parameter values ​​corresponding to the exploration phase target solution.

[0062] Based on the above process, the differential evolution strategy is used to process the target solution of each exploration stage, and N experimental solutions and Dim specified parameter values ​​corresponding to each of the N experimental solutions are obtained. By adopting the differential evolution strategy, the search ability of the secretary bird optimization algorithm can be enhanced, thereby improving the accuracy of the inversion profile.

[0063] N experimental solutions are input into the three-dimensional forward model to obtain multiple third predicted magnetic induction intensities, and the fitness of the N experimental solutions is determined by calculating the magnetic induction intensities of multiple sampling points and multiple third predicted magnetic induction intensities. Then, the fitness of the N exploration stage target solutions is obtained, and based on the fitness of the N experimental solutions and the fitness of the N exploration stage target solutions, each exploration stage target solution is compared and processed to obtain N differential evolution stage target solutions, and the N differential evolution stage target solutions are used to generate a differential evolution stage update matrix. It should be noted that the process of updating the solution based on fitness in the differential evolution stage is the same as the process of updating the solution based on fitness in the exploration stage, and will not be elaborated here.

[0064] 205. Based on the secretary bird optimization algorithm, the update matrix of the differential evolution stage is updated to obtain the update matrix of the development stage.

[0065] In the embodiment of the present application, the pipeline defect detection system obtains the development phase update formula in the secretary bird optimization algorithm, and uses the development phase update formula to calculate the differential evolution phase update matrix to obtain N second objective solutions. The calculation formula is as follows: Formula 11:

[0066] in, is the i-th second objective solution, is the target solution of the ith differential evolution stage for the differential evolution stage update matrix, is the optimal solution for updating the matrix in the differential evolution stage, For interval A random number, is the random solution of the update matrix in the differential evolution stage, is the maximum number of iterations, is the current iteration number, is the third parameter, , , .For example, .

[0067] Next, the N second target solutions are input into the three-dimensional forward model to obtain multiple fourth predicted magnetic induction intensities, and the fitness of the N second target solutions is determined by calculating the magnetic induction intensities of multiple sampling points and multiple fourth predicted magnetic induction intensities. Then, the fitness of the N differential evolution stage target solutions is obtained, and based on the fitness of the N second target solutions and the fitness of the N differential evolution stage target solutions, each differential evolution stage target solution is compared to obtain N development stage target solutions, and the development stage update matrix is ​​generated using the N development stage target solutions. It should be noted that the process of updating the solution based on fitness in the development stage is the same as the process of updating the solution based on fitness in the exploration stage, and will not be elaborated here.

[0068] 206. The continuity correction strategy is used to correct the update matrix in the development phase to obtain the continuity correction matrix.

[0069] In an embodiment of the present application, a pipeline defect detection system proposes a new continuity correction strategy for use after the development stage of the secretary bird optimization algorithm. In actual measurements, the material composition and structural design of the same pipe segment show obvious similarities, and most defects in the pipeline are caused by corrosion, wear and local deformation. These defects are usually gradual, so they will cause relatively continuous changes in depth. Therefore, the depth value of a defect cannot deviate too much from the surrounding depth points. Based on the relative continuity of the depth value within the defect, this application proposes a continuity correction strategy to correct unreliable depth values ​​and optimize the inversion process. The specific process is as follows: Get the development phase update matrix including N Dim depth points, and N Dim depth values ​​of depth points, where N The depth values ​​of the Dim depth points are the Dim parameter values ​​corresponding to the target solutions of the N development stages.

[0070] To ensure the effectiveness of the continuous correction strategy, the deviation detection threshold It needs to be dynamically adjusted according to the pipe thickness d of the target pipe and the number of iterations t. The pipeline defect detection system uses the pipe thickness and the current number of iterations to determine the deviation detection threshold, and the calculation formula is as follows: Formula 12:

[0071] in, is the deviation detection threshold, is the number of segments of the defect along the length or width direction, that is, the total defects are divided into There are small defects with the same length and width, and each small defect corresponds to a depth value. is the pipe thickness, is the maximum number of iterations, is the current iteration number, for The maximum change in is the reference value, is the constraint change. In the early iteration process, Take a smaller value to improve convergence; in the later stage of iteration, Taking a larger value can improve the inversion accuracy of deeper points. This can effectively avoid the local optimum that persists in the process and improve the inversion accuracy.

[0072] For each depth point, determine N adjacent depth points adjacent to the depth point, and use the N adjacent depth points to generate a set of adjacent depth points , calculate the deviation detection result of the depth point, the calculation formula is as follows: Formula 13:

[0073] in, is the deviation detection result of the depth point, is the depth value of the depth point, is the sth adjacent depth point, is a set of adjacent depth points. It should be noted that being adjacent to a depth point refers to being adjacent in a geometric sense in the actual defect space.

[0074] Next, the deviation detection result of the depth point is compared with the deviation detection threshold; If the deviation detection result of the depth point is greater than the deviation detection threshold, it means that there is an unreasonable deviation between the depth value of the depth point and the surrounding area. The depth point needs to be corrected to obtain the corrected depth value of the depth point. The calculation formula is as follows: Formula 14:

[0075] in, is the corrected depth value of the depth point, is the sth adjacent depth point, is a set of adjacent depth points. Continuity correction can make the algorithm escape from the local optimum and make the inversion contour more consistent with the actual defect.

[0076] Based on the above process, each depth point is processed separately using the deviation detection threshold to obtain N Dim depth point correction depth value, using N The corrected depth values ​​of Dim depth points generate N continuity correction stage target solutions, and the continuity correction matrix is ​​constructed using the N continuity correction stage target solutions. By checking whether the depth value of each point deviates too much from the surrounding area, the unreasonable depth value can be corrected, thereby helping the inversion process to get rid of the local optimal state and improve the accuracy of 3D inversion, especially when estimating the value of deeper points.

[0077] 207. The local perturbation strategy is used to calculate the continuity correction matrix and obtain the optimized matrix.

[0078] In the embodiment of the present application, after the continuity correction is performed, the pipeline defect detection system performs local perturbation on the population and further optimizes the solution. Specifically, the optimal solution of the continuity correction matrix is ​​obtained, the local perturbation strategy is obtained, the local perturbation stage update formula is obtained in the local perturbation strategy, and the local perturbation stage update formula is used to calculate the optimal solution of the continuity correction matrix to obtain the target optimal solution. The calculation formula is as follows: Formula 15: Formula 15:

[0079] in, is the optimal solution for the target, is the optimal solution of the continuity correction matrix, is the disturbance rate, , is the upper limit value, is the lower limit. For example, .

[0080] Then, the magnetic induction intensity of multiple sampling points and the three-dimensional forward model are used to calculate and determine the fitness of the optimal solution of the continuity correction matrix and the fitness of the target optimal solution; if the fitness of the target optimal solution is less than the fitness of the optimal solution of the continuity correction matrix, the optimal solution of the continuity correction matrix is ​​replaced by the target optimal solution to obtain the optimization matrix, thus completing this round of iterative calculations. The pipeline defect detection system adopts a local perturbation strategy to enhance the search and fitting capabilities of the secretary bird optimization algorithm, thereby improving the accuracy of the inversion profile.

[0081] 208. Check the current number of iterations. When the maximum number of iterations is greater than the current number of iterations, execute the following step 203. When the maximum number of iterations is equal to the current number of iterations, use the optimization matrix as the defect inversion result of the target pipeline.

[0082] In the embodiment of the present application, the pipeline defect detection system detects the current number of iterations; if the current number of iterations is less than the maximum number of iterations, the optimization matrix is ​​used for the next round of iterative calculation; if the current number of iterations is equal to the maximum number of iterations, the iteration is stopped and the optimization matrix is ​​used as the defect inversion result of the target pipeline. Optionally, if the optimal fitness is less than the set value ( ), the iteration is stopped, and the final generated optimization matrix is ​​used as the defect inversion result of the target pipeline. For example, .

[0083] Optionally, at each stage, the updated solution is subject to upper and lower limits. Specifically, for any specified solution, a specified upper limit value and a specified lower limit value of the specified solution are obtained, wherein the specified solution is one of the N exploration stage target solutions, the N differential evolution stage target solutions, the N development stage target solutions, the N continuity correction stage target solutions included in the continuity correction matrix, and the N local perturbation stage target solutions included in the optimization matrix.

[0084] If there is a parameter value greater than the specified upper limit value among the Dim parameter values ​​included in the specified solution, the parameter value in the specified solution will be changed to the specified upper limit value; if there is a parameter value less than the specified lower limit value among the Dim parameter values ​​included in the specified solution, the parameter value in the specified solution will be changed to the specified lower limit value.

[0085] Based on the above process, the schematic diagram of the architecture of a pipeline defect three-dimensional contour inversion based on a continuity correction strategy proposed in an embodiment of the present application is as follows: like Figure 3 As shown, the population is initialized, the solution is updated using the search phase of the Secretary Bird optimization algorithm, and then the solution is updated using the differential evolution strategy. Then the solution is updated using the development phase of the Secretary Bird optimization algorithm, the solution is corrected using the continuity correction strategy, and then the solution is further optimized using the perturbation strategy. If the number of iterations reaches the maximum number of iterations (t=T) or the optimal fitness is less than the set value ( ), the generated solution is considered to be the final result and the iteration stops.

[0086] The embodiment of the present application provides a three-dimensional contour inversion method for pipeline defects. Compared with the prior art, the embodiment of the present invention obtains the magnetic induction intensity of multiple sampling points by collecting the leakage magnetic signal of the target pipeline based on the sensor, and constructs a three-dimensional forward model of the target pipeline, initializes N feasible solutions, uses the N feasible solutions to construct an initial population matrix, iteratively updates the initial population matrix, and selects preset parameters according to the current number of iterations to calculate the initial population matrix to obtain N first target solutions, updates the N feasible solutions to obtain an exploration phase update matrix, and performs differential evolution calculation on the exploration phase update matrix to obtain a differential evolution phase update matrix, performs continuity correction and update operations on the differential evolution phase update matrix to obtain a continuity correction matrix, and performs local perturbation calculation on the continuity correction matrix to obtain a defect inversion result of the target pipeline. Among them, each feasible solution has Dim dimensions, each dimension corresponds to a parameter value, the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, the parameter value corresponding to the dimension is used to characterize the depth value of an area, and the preset parameter is any one of the sine and cosine parameters, random perturbation terms, and nonlinear convergence factors. The formula of the exploration phase of the secretary bird optimization algorithm is improved by preset parameters, thereby improving the accuracy of the pipeline defect inversion results, wherein the preset parameter is any one of the sine and cosine parameters, random perturbation terms, and nonlinear convergence factors. Sine and cosine parameters are added in the initial stage of iteration to expand the search range of the algorithm; random term perturbations are added in the middle stage of iteration to increase the diversity of solutions; nonlinear convergence factors are added in the late stage of iteration to enhance the convergence ability of the algorithm. At the same time, differential evolution strategies and local perturbation strategies are adopted to enhance the search ability and fitting ability of the secretary bird optimization algorithm and improve the accuracy of the inversion profile. In addition, the present application also proposes a continuity correction strategy to correct unreliable depth values, help the inversion process stay away from the local optimum, and thus improve the accuracy of three-dimensional inversion and the accuracy of the inversion results.

[0087] Further, as Figure 1 In the specific implementation of the method, the present application embodiment provides a pipeline defect three-dimensional contour inversion device, such as Figure 4 As shown, the device includes: a data acquisition module 301, an initialization module 302, an iterative update module 303, a first calculation module 304 and a second calculation module 305.

[0088] The data acquisition module 301 is used to collect the magnetic leakage signal of the target pipeline based on the sensor, obtain the magnetic induction intensity of multiple sampling points, and construct a three-dimensional forward model of the target pipeline; Initialization module 302, used to initialize N feasible solutions, use the N feasible solutions to construct an initial population matrix, each of the feasible solutions has Dim dimensions, each dimension corresponds to a parameter value, the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, and the parameter value corresponding to the dimension is used to characterize the depth value of a region; An iterative update module 303 is used to iteratively update the initial population matrix, and select preset parameters to calculate the initial population matrix according to the current number of iterations to obtain N first target solutions, wherein the preset parameters are any one of sine and cosine parameters, random disturbance terms, and nonlinear convergence factors; A first calculation module 304 is used to update the N feasible solutions to obtain an exploration phase update matrix, and perform differential evolution calculation on the exploration phase update matrix to obtain a differential evolution phase update matrix; The second calculation module 305 is used to perform continuity correction and update operations on the update matrix in the differential evolution stage to obtain a continuity correction matrix, and to perform local perturbation calculation on the continuity correction matrix to obtain a defect inversion result of the target pipeline.

[0089] In a specific application scenario, the initialization module 302 is used to determine the Dim dimensions corresponding to each feasible solution; obtain the dimension upper limit value and the dimension lower limit value of each dimension, and calculate the parameter value corresponding to each dimension according to the dimension upper limit value and the dimension lower limit value of each dimension.

[0090] in, is the parameter value corresponding to the jth dimension of the i-th feasible solution, is the upper limit of the dimension of the jth dimension of the i-th feasible solution, is the dimension lower limit of the jth dimension of the i-th feasible solution, N is the number of feasible solutions; the initial population matrix is ​​generated using the Dim parameter values ​​corresponding to each of the N feasible solutions,

[0091] in, is the initial population matrix, is the i-th feasible solution, is the parameter value corresponding to the jth dimension of the ith feasible solution, N is the number of feasible solutions, and Dim is the number of parameter values ​​corresponding to each of the feasible solutions.

[0092] In a specific application scenario, the iterative update module 303 is used to obtain a secretary bird optimization algorithm, obtain a Lyman flight distribution function in the secretary bird optimization algorithm, and use the Lyman flight distribution function to calculate the Lyman flight step length.

[0093]

[0094] in, is the Lyman flight step length, is the Lyman flight distribution function, is the first parameter, is the second parameter, and For interval A random number, is a gamma function; obtaining an exploration phase update formula in the secretary bird optimization algorithm, and calculating the N feasible solutions included in the initial population matrix according to the preset parameters and the exploration phase update formula to obtain N first target solutions,

[0095]

[0096] in, is the i-th first objective solution, is the i-th feasible solution of the initial population matrix, is the first random solution of the initial population matrix, is the second random solution of the initial population matrix, is the maximum number of iterations, is the current iteration number, and are the sine and cosine parameters, For interval A random number, is the third random solution of the initial population matrix, is the random disturbance term, , is the optimal solution of the initial population matrix, , , is the Lyman flight step length, is the nonlinear convergence factor.

[0097] In a specific application scenario, the first calculation module 304 is used to input the N feasible solutions into the three-dimensional forward model to obtain multiple first predicted magnetic induction intensities, and use the multiple sampling point magnetic induction intensities and the multiple first predicted magnetic induction intensities to calculate and determine the fitness of the N feasible solutions; input the N first target solutions into the three-dimensional forward model to obtain multiple second predicted magnetic induction intensities, and use the multiple sampling point magnetic induction intensities and the multiple second predicted magnetic induction intensities to calculate and determine the fitness of the N first target solutions; based on the fitness of the N feasible solutions and the fitness of the N first target solutions, compare each of the feasible solutions to obtain N exploration stage target solutions, and use the N exploration stage target solutions to generate an exploration stage update matrix; obtain a differential evolution strategy, and for each of the exploration stage target solutions, obtain an adaptive mutation factor calculation formula in the differential evolution strategy, and use the adaptive mutation factor calculation formula to determine the adaptive mutation factor corresponding to the exploration stage target solution.

[0098] in, is the adaptive mutation factor, and For interval A random number, is the fourth parameter, is the first variation parameter, is the second variation parameter, is the third mutation parameter; obtaining a mutation solution calculation formula in the differential evolution strategy, and using the adaptive mutation factor corresponding to the target solution of the exploration stage and the mutation solution calculation formula to determine the mutation solution corresponding to the target solution of the exploration stage,

[0099] in, is the variation solution corresponding to the target solution of the i-th exploration stage, For interval A random number, is the fifth parameter, is the first random solution of the exploration phase update matrix, A second random solution for the exploration phase update matrix, A third random solution for the exploration phase update matrix; obtaining Dim target parameter values ​​corresponding to the exploration phase target solution; for each of the target parameter values, obtaining an adaptive crossover rate calculation formula in the differential evolution strategy, and using the adaptive crossover rate calculation formula to determine the adaptive crossover rate of the target parameter value,

[0100] in, is the adaptive crossover rate of the target parameter value, and For interval A random number, is the preset parameter, is a reference crossover rate; determining a specified parameter value based on the variation solution, the adaptive crossover rate of the target parameter value, and the target parameter value,

[0101] in, is the specified parameter value corresponding to the jth dimension of the ith experimental solution, is the value corresponding to the jth dimension of the ith variation solution, is the target parameter value corresponding to the jth dimension of the target solution in the i-th exploration stage, is the adaptive crossover rate of the target parameter value, For interval random number; calculating each target parameter value of the exploration stage target solution respectively to obtain Dim specified parameter values ​​corresponding to the exploration stage target solution; using the differential evolution strategy to process each exploration stage target solution respectively to obtain N experimental solutions and Dim specified parameter values ​​corresponding to each of the N experimental solutions; inputting the N experimental solutions into the three-dimensional forward model to obtain a plurality of third predicted magnetic induction intensities, using the magnetic induction intensities of the plurality of sampling points and the plurality of third predicted magnetic induction intensities to calculate and determine the fitness of the N experimental solutions; obtaining the fitness of the N exploration stage target solutions, and based on the fitness of the N experimental solutions and the fitness of the N exploration stage target solutions, performing comparison processing on each exploration stage target solution to obtain N differential evolution stage target solutions, and using the N differential evolution stage target solutions to generate the differential evolution stage update matrix.

[0102] In a specific application scenario, the first calculation module 304 is used to extract the first target solution associated with the feasible solution from the N first target solutions for each feasible solution, and compare the fitness of the first target solution with the fitness of the feasible solution; if the comparison determines that the fitness of the first target solution is less than the fitness of the feasible solution, then the first target solution is used as the exploration stage target solution; if the comparison determines that the fitness of the first target solution is greater than or equal to the fitness of the feasible solution, then the feasible solution is used as the exploration stage target solution.

[0103] In a specific application scenario, the second calculation module 305 is used to obtain the secretary bird optimization algorithm, obtain the development phase update formula in the secretary bird optimization algorithm, and calculate the differential evolution phase update matrix based on the current number of iterations using the development phase update formula to obtain N second objective solutions.

[0104] in, is the i-th second objective solution, is the target solution of the ith differential evolution stage of the differential evolution stage update matrix, is the optimal solution for updating the matrix in the differential evolution stage, For interval A random number, is a random solution of the update matrix in the differential evolution stage, is the maximum number of iterations, is the current iteration number, is the third parameter, , , ; Input the N second target solutions into the three-dimensional forward model to obtain a plurality of fourth predicted magnetic induction intensities, and use the magnetic induction intensities of the multiple sampling points and the plurality of fourth predicted magnetic induction intensities to calculate and determine the fitness of the N second target solutions; obtain the fitness of N differential evolution stage target solutions, and based on the fitness of the N second target solutions and the fitness of the N differential evolution stage target solutions, perform a comparison process on each of the differential evolution stage target solutions to obtain N development stage target solutions, and use the N development stage target solutions to generate the development stage update matrix; obtain the N development stage update matrix included in the N Dim depth points, and the N Dim the depth value of the depth point, the N The depth values ​​of Dim depth points are Dim parameter values ​​corresponding to the target solutions of the N development stages; the pipe thickness of the target pipe is obtained, and the deviation detection threshold is determined by using the pipe thickness and the current number of iterations.

[0105] in, is the deviation detection threshold, is the number of segments of the defect along the length or width direction, is the pipe thickness, is the maximum number of iterations, is the current iteration number, is the maximum change of the deviation detection threshold, is the benchmark reference value, To constrain the change; for each of the depth points, determine N adjacent depth points adjacent to the depth point, use the N adjacent depth points to generate an adjacent depth point set, and calculate the deviation detection result of the depth point,

[0106] in, is the deviation detection result of the depth point, is the depth value of the depth point, is the sth adjacent depth point, is the set of adjacent depth points; comparing the deviation detection result of the depth point with the deviation detection threshold; if the deviation detection result of the depth point is greater than the deviation detection threshold, correcting the depth point to obtain a corrected depth value of the depth point,

[0107] in, is the corrected depth value of the depth point, is the sth adjacent depth point, is the set of adjacent depth points; each of the depth points is processed using the deviation detection threshold to obtain the N Dim depth points have a corrected depth value, using the N The corrected depth values ​​of Dim depth points are used to generate N continuity correction stage target solutions, and the continuity correction matrix is ​​constructed by using the N continuity correction stage target solutions; a local perturbation strategy and an optimal solution of the continuity correction matrix are obtained, a local perturbation stage update formula is obtained in the local perturbation strategy, and the optimal solution of the continuity correction matrix is ​​calculated by using the local perturbation stage update formula to obtain the target optimal solution.

[0108] in, is the optimal solution for the target, is the optimal solution of the continuity correction matrix, is the disturbance rate, , is the upper limit value, is a lower limit value; the fitness of the optimal solution of the continuity correction matrix and the fitness of the target optimal solution are determined by using the magnetic induction intensities of the multiple sampling points and the three-dimensional forward model; if the fitness of the target optimal solution is less than the fitness of the optimal solution of the continuity correction matrix, the optimal solution of the continuity correction matrix is ​​replaced by the target optimal solution to obtain an optimization matrix; the current number of iterations is detected; when the current number of iterations is less than the maximum number of iterations, the optimization matrix is ​​used for the next round of iterative calculation; when the current number of iterations is equal to the maximum number of iterations, the optimization matrix is ​​used as the defect inversion result of the target pipeline.

[0109] In specific application scenarios, such as Figure 5 As shown, the device further includes: an adjustment module 306.

[0110] The adjustment module 306 is used to obtain the specified upper limit value and the specified lower limit value of any specified solution, where the specified solution is one of the N exploration stage target solutions, the N differential evolution stage target solutions, the N development stage target solutions, the N continuity correction stage target solutions included in the continuity correction matrix, and the N local perturbation stage target solutions included in the optimization matrix; if there is a parameter value greater than the specified upper limit value among the Dim parameter values ​​included in the specified solution, the parameter value in the specified solution is changed to the specified upper limit value; if there is a parameter value less than the specified lower limit value among the Dim parameter values ​​included in the specified solution, the parameter value in the specified solution is changed to the specified lower limit value.

[0111] The embodiment of the present application provides a device. Compared with the prior art, the embodiment of the present invention collects the magnetic flux leakage signal of the target pipeline based on the sensor, obtains the magnetic induction intensity of multiple sampling points, and constructs a three-dimensional forward model of the target pipeline, initializes N feasible solutions, uses N feasible solutions to construct an initial population matrix, iteratively updates the initial population matrix, and selects preset parameters to calculate the initial population matrix according to the current number of iterations to obtain N first target solutions, updates the N feasible solutions to obtain the exploration phase update matrix, and performs differential evolution calculation on the exploration phase update matrix to obtain the differential evolution phase update matrix, performs continuity correction and update operations on the differential evolution phase update matrix to obtain the continuity correction matrix, and performs local perturbation calculation on the continuity correction matrix to obtain the defect inversion result of the target pipeline. Among them, each feasible solution has Dim dimensions, each dimension corresponds to a parameter value, the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, the parameter value corresponding to the dimension is used to characterize the depth value of a region, and the preset parameter is any one of the sine and cosine parameters, the random perturbation term, and the nonlinear convergence factor. The formula of the exploration phase of the secretary bird optimization algorithm is improved by preset parameters, thereby improving the accuracy of the pipeline defect inversion results, wherein the preset parameters are any one of the sine and cosine parameters, random perturbation terms, and nonlinear convergence factors. Sine and cosine parameters are added in the initial stage of iteration to expand the search range of the algorithm; random term perturbations are added in the middle stage of iteration to increase the diversity of solutions; nonlinear convergence factors are added in the late stage of iteration to enhance the convergence ability of the algorithm. At the same time, differential evolution strategies and local perturbation strategies are adopted to enhance the search and fitting capabilities of the secretary bird optimization algorithm and improve the accuracy of the inversion profile. In addition, the present application also proposes a continuity correction strategy to correct unreliable depth values, help the inversion process stay away from the local optimum, and thereby improve the accuracy of three-dimensional inversion and the accuracy of the inversion results.

[0112] It should be noted that for other corresponding descriptions of the functional units involved in the pipeline defect three-dimensional contour inversion device provided in the embodiment of the present application, reference can be made to Figure 1 and Figures 2 to 5 The corresponding description in will not be repeated here.

[0113] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0114] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0115] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

[0116] In an exemplary embodiment, see Figure 6 , and also provides an electronic device, which includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the pipeline defect three-dimensional contour inversion method in the above embodiment.

[0117] A storage medium stores a computer program, which, when executed by a processor, implements the steps of the pipeline defect three-dimensional contour inversion method.

[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by hardware, or by means of software plus necessary general hardware platforms. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0119] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present application.

[0120] Those skilled in the art will appreciate that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple sub-modules.

[0121] The above application serial numbers are for description only and do not represent the advantages or disadvantages of the implementation scenarios.

[0122] The above disclosure only discloses several specific implementation scenarios of the present application. However, the present application is not limited thereto, and any changes that can be conceived by technicians in this field should fall within the scope of protection of the present application.

Claims

1. A pipeline defect three-dimensional contour inversion method, characterized in that: include: Collecting magnetic flux leakage signals of the target pipeline based on sensors, obtaining magnetic induction intensities of multiple sampling points, and constructing a three-dimensional forward model of the target pipeline; Initialize N feasible solutions, and use the N feasible solutions to construct an initial population matrix, each of the feasible solutions has Dim dimensions, each of the dimensions corresponds to a parameter value, the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, and the parameter value corresponding to the dimension is used to characterize the depth value of a region; Iteratively updating the initial population matrix, and selecting preset parameters to calculate the initial population matrix according to the current number of iterations to obtain N first target solutions, wherein the preset parameters are any one of sine and cosine parameters, random disturbance terms, and nonlinear convergence factors; The N feasible solutions are updated to obtain an exploration phase update matrix, and differential evolution calculation is performed on the exploration phase update matrix to obtain a differential evolution phase update matrix; The update matrix in the differential evolution stage is subjected to continuity correction and update operations to obtain a continuity correction matrix, and the continuity correction matrix is ​​subjected to local perturbation calculation to obtain a defect inversion result of the target pipeline.

2. The method according to claim 1, characterized in that Initializing N feasible solutions and using the N feasible solutions to construct an initial population matrix includes: For each of the feasible solutions, determine Dim dimensions corresponding to the feasible solution; Obtain the dimension upper limit value and the dimension lower limit value of each dimension, and calculate the parameter value corresponding to each dimension according to the dimension upper limit value and the dimension lower limit value of each dimension, in, is the parameter value corresponding to the jth dimension of the i-th feasible solution, is the upper limit of the dimension of the jth dimension of the i-th feasible solution, is the lower limit of the dimension of the jth dimension of the i-th feasible solution, and N is the number of feasible solutions; The initial population matrix is ​​generated by using Dim parameter values ​​corresponding to each of the N feasible solutions, in, is the initial population matrix, is the i-th feasible solution, is the parameter value corresponding to the jth dimension of the ith feasible solution, N is the number of feasible solutions, and Dim is the number of parameter values ​​corresponding to each of the feasible solutions.

3. The method according to claim 1, characterized in that The method of selecting preset parameters according to the current number of iterations to calculate the initial population matrix to obtain N first target solutions includes: Obtaining a secretary bird optimization algorithm, obtaining a Lyman flight distribution function in the secretary bird optimization algorithm, and using the Lyman flight distribution function to calculate a Lyman flight step length, in, is the Lyman flight step length, is the Lyman flight distribution function, is the first parameter, is the second parameter, and For interval A random number, is the gamma function; In the secretary bird optimization algorithm, an exploration phase update formula is obtained, and according to the preset parameters and the exploration phase update formula, the N feasible solutions included in the initial population matrix are calculated respectively to obtain N first target solutions. in, is the i-th first objective solution, is the i-th feasible solution of the initial population matrix, is the first random solution of the initial population matrix, is the second random solution of the initial population matrix, is the maximum number of iterations, is the current iteration number, and are the sine and cosine parameters, For interval A random number, is the third random solution of the initial population matrix, is the random disturbance term, , is the optimal solution of the initial population matrix, , , is the Lyman flight step length, is the nonlinear convergence factor.

4. The method according to claim 1, characterized in that: The updating of the N feasible solutions to obtain an exploration phase update matrix, and performing differential evolution calculation on the exploration phase update matrix to obtain a differential evolution phase update matrix, include: Inputting the N feasible solutions into the three-dimensional forward model to obtain a plurality of first predicted magnetic induction intensities, and calculating and determining the fitness of the N feasible solutions using the magnetic induction intensities of the plurality of sampling points and the plurality of first predicted magnetic induction intensities; Inputting the N first target solutions into the three-dimensional forward model to obtain a plurality of second predicted magnetic induction intensities, and calculating and determining the fitness of the N first target solutions using the magnetic induction intensities of the plurality of sampling points and the plurality of second predicted magnetic induction intensities; Based on the fitness of the N feasible solutions and the fitness of the N first target solutions, each of the feasible solutions is compared to obtain N exploration phase target solutions, and the exploration phase update matrix is ​​generated using the N exploration phase target solutions; Obtain a differential evolution strategy, for each of the exploration phase target solutions, obtain an adaptive mutation factor calculation formula in the differential evolution strategy, and use the adaptive mutation factor calculation formula to determine the adaptive mutation factor corresponding to the exploration phase target solution, in, is the adaptive mutation factor, and For interval A random number, is the fourth parameter, is the first variation parameter, is the second variation parameter, is the third variation parameter; Obtaining a variation solution calculation formula in the differential evolution strategy, and using the adaptive mutation factor corresponding to the exploration phase target solution and the variation solution calculation formula to determine the variation solution corresponding to the exploration phase target solution, in, is the variation solution corresponding to the target solution of the i-th exploration stage, For interval A random number, is the fifth parameter, is the first random solution of the exploration phase update matrix, A second random solution for the exploration phase update matrix, a third random solution for the exploration phase update matrix; Obtain Dim target parameter values ​​corresponding to the target solution of the exploration phase; For each of the target parameter values, an adaptive crossover rate calculation formula is obtained in the differential evolution strategy, and the adaptive crossover rate of the target parameter value is determined by using the adaptive crossover rate calculation formula. in, is the adaptive crossover rate of the target parameter value, and For interval A random number, is the preset parameter, is the reference crossover rate; Determine a specified parameter value based on the variation solution, the adaptive crossover rate of the target parameter value, and the target parameter value; in, is the specified parameter value corresponding to the jth dimension of the ith experimental solution, is the value corresponding to the jth dimension of the ith variation solution, is the target parameter value corresponding to the jth dimension of the target solution in the i-th exploration stage, is the adaptive crossover rate of the target parameter value, For interval A random number; Calculate each target parameter value of the exploration phase target solution respectively to obtain Dim specified parameter values ​​corresponding to the exploration phase target solution; The differential evolution strategy is used to process each of the exploration phase target solutions respectively to obtain N experimental solutions and Dim specified parameter values ​​corresponding to each of the N experimental solutions; Inputting the N experimental solutions into the three-dimensional forward model to obtain a plurality of third predicted magnetic induction intensities, and calculating and determining the fitness of the N experimental solutions using the magnetic induction intensities of the plurality of sampling points and the plurality of third predicted magnetic induction intensities; Obtain the fitness of the N exploration stage target solutions, compare each of the exploration stage target solutions based on the fitness of the N experimental solutions and the fitness of the N exploration stage target solutions, obtain N differential evolution stage target solutions, and use the N differential evolution stage target solutions to generate the differential evolution stage update matrix.

5. The method according to claim 4, characterized in that The step of comparing each of the feasible solutions based on the fitness of the N feasible solutions and the fitness of the N first target solutions to obtain N exploration phase target solutions includes: For each of the feasible solutions, extracting a first target solution associated with the feasible solution from the N first target solutions, and comparing the fitness of the first target solution with the fitness of the feasible solution; If the comparison determines that the fitness of the first target solution is less than the fitness of the feasible solution, the first target solution is used as the target solution of the exploration phase; If the comparison determines that the fitness of the first target solution is greater than or equal to the fitness of the feasible solution, the feasible solution is used as the target solution of the exploration phase.

6. The method according to claim 1, characterized in that The step of performing continuity correction and updating operations on the update matrix in the differential evolution stage to obtain a continuity correction matrix, and performing local perturbation calculation on the continuity correction matrix to obtain a defect inversion result of the target pipeline includes: Obtaining a secretary bird optimization algorithm, obtaining a development phase update formula in the secretary bird optimization algorithm, and calculating the differential evolution phase update matrix using the development phase update formula based on the current number of iterations to obtain N second objective solutions. in, is the ith second objective solution, is the target solution of the ith differential evolution stage of the differential evolution stage update matrix, is the optimal solution for updating the matrix in the differential evolution stage, For interval A random number, is a random solution of the update matrix in the differential evolution stage, is the maximum number of iterations, is the current iteration number, is the third parameter, , , ; Inputting the N second target solutions into the three-dimensional forward model to obtain a plurality of fourth predicted magnetic induction intensities, and calculating and determining the fitness of the N second target solutions using the plurality of sampling point magnetic induction intensities and the plurality of fourth predicted magnetic induction intensities; Obtaining the fitness of N differential evolution stage target solutions, and based on the fitness of the N second target solutions and the fitness of the N differential evolution stage target solutions, performing a comparison process on each of the differential evolution stage target solutions to obtain N development stage target solutions, and using the N development stage target solutions to generate the development stage update matrix; Get the development phase update matrix including N Dim depth points, and the N Dim depth value of the depth point, the N The depth values ​​of Dim depth points are the Dim parameter values ​​corresponding to the target solutions of the N development stages respectively; Obtaining the pipe thickness of the target pipe, and determining a deviation detection threshold using the pipe thickness and the current number of iterations, in, is the deviation detection threshold, is the number of segments of the defect along the length or width direction, is the pipe thickness, is the maximum number of iterations, is the current iteration number, is the maximum change of the deviation detection threshold, is the reference value, To constrain changes; For each of the depth points, determine N adjacent depth points adjacent to the depth point, use the N adjacent depth points to generate an adjacent depth point set, and calculate a deviation detection result of the depth point. in, is the deviation detection result of the depth point, is the depth value of the depth point, is the sth adjacent depth point, is the adjacent depth point set; comparing the deviation detection result of the depth point with the deviation detection threshold; If the deviation detection result of the depth point is greater than the deviation detection threshold, the depth point is corrected to obtain a corrected depth value of the depth point. in, is the corrected depth value of the depth point, is the sth adjacent depth point, is the adjacent depth point set; Each of the depth points is processed using the deviation detection threshold to obtain the N Dim depth points have a corrected depth value, using the N Generating N continuity correction stage target solutions based on the corrected depth values ​​of Dim depth points, and constructing the continuity correction matrix using the N continuity correction stage target solutions; Obtaining a local perturbation strategy and an optimal solution of the continuity correction matrix, obtaining a local perturbation phase update formula in the local perturbation strategy, using the local perturbation phase update formula to calculate the optimal solution of the continuity correction matrix to obtain a target optimal solution, in, is the optimal solution for the target, is the optimal solution of the continuity correction matrix, is the disturbance rate, , is the upper limit value, is the lower limit; The magnetic induction intensities of the multiple sampling points and the three-dimensional forward model are used to calculate and determine the fitness of the optimal solution of the continuity correction matrix and the fitness of the target optimal solution; If the fitness of the target optimal solution is less than the fitness of the optimal solution of the continuity correction matrix, the optimal solution of the continuity correction matrix is ​​replaced by the target optimal solution to obtain an optimization matrix; Detecting the current number of iterations; When the current number of iterations is less than the maximum number of iterations, the optimization matrix is ​​used to perform the next round of iterative calculations; When the current number of iterations is equal to the maximum number of iterations, the optimization matrix is ​​used as the defect inversion result of the target pipeline.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: For any specified solution, obtaining a specified upper limit value and a specified lower limit value of the specified solution, wherein the specified solution is one of the N exploration phase target solutions, the N differential evolution phase target solutions, the N development phase target solutions, the N continuity correction phase target solutions included in the continuity correction matrix, and the N local perturbation phase target solutions included in the optimization matrix; If there is a parameter value greater than the specified upper limit value among the Dim parameter values ​​included in the specified solution, then the parameter value in the specified solution is changed to the specified upper limit value; If there is a parameter value smaller than the specified lower limit value among the Dim parameter values ​​included in the specified solution, the parameter value in the specified solution is changed to the specified lower limit value.

8. A pipeline defect three-dimensional contour inversion device, characterized in that: include: A data acquisition module is used to collect the magnetic leakage signal of the target pipeline based on the sensor, obtain the magnetic induction intensity of multiple sampling points, and construct a three-dimensional forward model of the target pipeline; An initialization module is used to initialize N feasible solutions, and use the N feasible solutions to construct an initial population matrix, each of the feasible solutions has Dim dimensions, each of the dimensions corresponds to a parameter value, the feasible solution is used to characterize a defect shape of the target pipeline, the defect shape is divided into Dim regions, and the parameter value corresponding to the dimension is used to characterize the depth value of a region; An iterative update module, used for iteratively updating the initial population matrix, and selecting preset parameters to calculate the initial population matrix according to the current number of iterations to obtain N first target solutions, wherein the preset parameters are any one of sine and cosine parameters, random disturbance terms, and nonlinear convergence factors; A first calculation module is used to update the N feasible solutions to obtain an exploration phase update matrix, and perform differential evolution calculation on the exploration phase update matrix to obtain a differential evolution phase update matrix; The second calculation module is used to perform continuity correction and update operations on the update matrix in the differential evolution stage to obtain a continuity correction matrix, and to perform local perturbation calculation on the continuity correction matrix to obtain a defect inversion result of the target pipeline.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Differential evolution algorithm-based modularity optimization method

    CN108171331A

  • Improved sparrow search method based on penalty function constraint optimization

    CN115204052A

  • Three-dimensional irregular defect reconstruction method based on adaptive regularization Gaussian Newton method

    CN116124877A

  • Gravity and magnetic potential field imaging inversion method and system based on improved differential evolution algorithm

    CN117270072A

  • Track planning method capable of sensing thunderstorm situation

    CN117537826A

Cited By

  • Natural gas pipeline time-varying reliability prediction method considering corrosion correlation

    CN121480071A