CN114330442A - Pipeline strain characteristic classification calculation method and system based on K-nearest neighbor method - Google Patents
Pipeline strain characteristic classification calculation method and system based on K-nearest neighbor method Download PDFInfo
- Publication number
- CN114330442A CN114330442A CN202111630940.5A CN202111630940A CN114330442A CN 114330442 A CN114330442 A CN 114330442A CN 202111630940 A CN202111630940 A CN 202111630940A CN 114330442 A CN114330442 A CN 114330442A
- Authority
- CN
- China
- Prior art keywords
- strain
- pipeline
- detection data
- classification
- vertical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application discloses a pipeline strain characteristic classification calculation method and system based on a K-nearest neighbor method, and relates to the technical field of pipeline systems, wherein the method comprises the following steps: acquiring a detection data set in an in-service pipeline by utilizing an IMU detection technology; denoising the data to obtain a reconstructed standard detection data set; then, vertical and horizontal component calculation of a computer algorithm is respectively carried out on the standard detection data set to obtain the vertical strain and the horizontal strain of the in-service pipeline; further, a pipeline strain characteristic matrix is created, data integration is carried out, and a bending strain set of each point in the in-service pipeline is obtained; based on the method, a strain characteristic classification confusion matrix of the in-service pipeline is constructed, so that prediction classification can be carried out, and a target classification result of the detection data in the pipeline is obtained.
Description
Technical Field
The application relates to the technical field of pipeline systems, in particular to a pipeline strain characteristic classification calculation method and system based on a K-nearest neighbor method.
Background
Due to the characteristics of long oil and gas pipelines, the pipelines often pass through unstable geological conditions or natural disaster areas, such as earthquake areas, frozen soil areas, quicksand areas and the like. In these areas, disasters such as settlement, landslide, fault creep, earthquake ground displacement, frost heaving, thaw collapse and the like often occur, so that the pipeline generates large transverse displacement and deformation, and large bending strain is generated at the local part of the pipe body, and the pipeline is unstable or the material is damaged in severe cases. The pipe body at the local bending strain position caused by natural disasters bears normal internal pressure load and bending stress load added by the bending strain, so the structural integrity and the operation safety of the pipeline are seriously influenced by the bending strain of the pipeline, and the pipeline is easy to fail particularly when the bending strain position has serious defects. When certain oil and gas pipelines which are easy to suffer from geological disasters run, excessive welding seam cracking accidents occur under the combined action of internal pressure and bending load due to the fact that the helical welding seam defects at the bending deformation position of the pipelines are caused by soil body settlement. Thus, the presence of pipe displacement and bending strain severely affects the structural integrity of the pipe, which makes the pipe more risky at the sea floor, mountainous areas, geological unstable areas, frozen earth areas, and the like. Therefore, how to acquire strain information of a long-distance pipeline by a detection means becomes a problem concerned by pipeline operators in recent years, and the method has great significance for preventing accidents and ensuring the safety of a pipeline body.
High precision tactical Inertial Measurement Unit (IMU) based in-pipe bending strain detection has become a common practice for oil and gas pipelines in recent years. The bending strain result obtained by IMU measurement can be analyzed to find a high strain pipe section caused by surface subsidence and the like. Compared with the existing displacement detection technology, the IMU internal detection can detect the bending strain and displacement of the pipeline point by point on the whole line, and the bending strain and displacement monitoring of the pipeline is more comprehensive and accurate. Repeated many times carries out detection in the IMU and can monitor pipeline displacement change and rate of change, in time reports the great defect point of pipeline displacement change and the very fast point of pipeline displacement change to carry out effectual monitoring and early warning to the pipeline meeting an emergency, be convenient for in time initiatively maintain the pipeline defect point and get rid of the environmental factor that leads to the pipeline displacement.
However, in the prior art, the high-risk section identification work of the possible geological disasters is carried out by using a manual identification method, and the technical problems of inconsistent judgment standards, low identification efficiency and high misjudgment rate exist.
Disclosure of Invention
The application aims to provide a pipeline strain characteristic classification calculation method and system based on a K-nearest neighbor method, and the method and system are used for solving the technical problems that in the prior art, a possible geological disaster high-risk section identification work is carried out by an artificial identification method, the judgment standards are inconsistent, the identification efficiency is low, and the misjudgment rate is high.
In view of the foregoing problems, the embodiments of the present application provide a pipeline strain feature classification calculation method and system based on a K-nearest neighbor method.
In a first aspect, the present application provides a pipeline strain feature classification calculation method based on a K-nearest neighbor method, where the method is implemented by a pipeline strain feature classification calculation system based on a K-nearest neighbor method, where the method includes: acquiring a detection data set in a pipeline of a target device; denoising the detection data set in the pipeline to obtain a reconstructed standard detection data set; respectively carrying out vertical component calculation and horizontal component calculation of a computer algorithm on the standard detection data set to obtain vertical strain and horizontal strain of the target equipment; establishing a pipeline strain characteristic matrix based on the vertical strain and the horizontal strain, and performing data integration to obtain a bending strain set of each point in the target equipment; constructing a feature classification confusion matrix of the target equipment based on the bending strain sets of the points; and performing prediction classification according to the feature classification confusion matrix to obtain a target classification result of the detection data in the pipeline.
In another aspect, the present application further provides a pipeline strain feature classification calculation system based on a K-nearest neighbor method, configured to execute the pipeline strain feature classification calculation method based on the K-nearest neighbor method according to the first aspect, where the system includes: a first obtaining unit, configured to obtain an in-pipeline detection data set of a target device; the first processing unit is used for carrying out noise reduction processing on the detection data set in the pipeline to obtain a reconstructed standard detection data set; the first calculation unit is used for respectively calculating the vertical component and the horizontal component of a computer algorithm of the standard detection data set to obtain the vertical strain and the horizontal strain of the target equipment; a first creating unit, configured to create a pipeline strain feature matrix based on the vertical strain and the horizontal strain, and perform data integration to obtain a bending strain set of each point in the target device; a first constructing unit, configured to construct a feature classification confusion matrix of the target device based on the point bending strain sets; and the first classification unit is used for carrying out prediction classification according to the characteristic classification confusion matrix to obtain a target classification result of the detection data in the pipeline.
In a third aspect, an embodiment of the present application further provides a pipeline strain feature classification computing system based on a K-nearest neighbor method, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect when executing the program.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
1. acquiring a detection data set in a pipeline of a target device; denoising the detection data set in the pipeline to obtain a reconstructed standard detection data set; respectively carrying out vertical component calculation and horizontal component calculation of a computer algorithm on the standard detection data set to obtain vertical strain and horizontal strain of the target equipment; establishing a pipeline strain characteristic matrix based on the vertical strain and the horizontal strain, and performing data integration to obtain a bending strain set of each point in the target equipment; constructing a feature classification confusion matrix of the target equipment based on the bending strain sets of the points; and performing prediction classification according to the feature classification confusion matrix to obtain a target classification result of the detection data in the pipeline. The technical effects of saving a large amount of manpower resources and time cost and realizing efficient and accurate classification of pipeline strain characteristics are achieved by carrying out noise reduction processing on the detection data in the in-service pipeline, further carrying out calculation of vertical components and horizontal components on the processed standard detection data, carrying out feature extraction on the detection data in the pipeline based on the feature extraction, and carrying out classification calculation on the pipeline strain characteristics based on a K-nearest neighbor method on the feature extraction set.
2. Before IMU data is identified, noise reduction processing is required, so that errors can be reduced, the identification accuracy of the model is improved, and the results can be changed at key positions due to slight errors, so that wrong conclusions are avoided, and the classification result is accurate.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only exemplary, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a pipeline strain feature classification calculation method based on a K-nearest neighbor method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of denoising processing performed on the intra-pipeline detection data set in a pipeline strain feature classification calculation method based on a K-nearest neighbor method according to an embodiment of the present application;
FIG. 3 is a schematic flowchart illustrating a model error rate at different K values in a pipeline strain feature classification calculation method based on a K-nearest neighbor method according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a pipeline strain feature classification calculation system based on a K-nearest neighbor method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an exemplary electronic device according to an embodiment of the present application.
Description of reference numerals:
a first obtaining unit 11, a first processing unit 12, a first calculating unit 13, a first creating unit 14, a first constructing unit 15, a first classifying unit 16, a bus 300, a receiver 301, a processor 302, a transmitter 303, a memory 304, a bus interface 305.
Detailed Description
The pipeline strain characteristic classification calculation method and system based on the K-nearest neighbor method solve the technical problems that in the prior art, a possible geological disaster high-risk section identification work is carried out by a manual identification method, the identification standard is inconsistent, the identification efficiency is low, and the misjudgment rate is high. The technical effects of saving a large amount of manpower resources and time cost and realizing efficient and accurate classification of pipeline strain characteristics are achieved by carrying out noise reduction processing on the detection data in the in-service pipeline, further carrying out calculation of vertical components and horizontal components on the processed standard detection data, carrying out feature extraction on the detection data in the pipeline based on the feature extraction processing, and carrying out classification calculation on the pipeline strain characteristics based on a K-nearest neighbor method on the feature extraction set.
In the following, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application. It should be further noted that, for the convenience of description, only some but not all of the elements relevant to the present application are shown in the drawings.
Summary of the application
Because the possible geological disaster high-risk section identification work is mainly carried out by the traditional manual identification method at present, the problems of inconsistent judgment standards, low identification efficiency and high misjudgment rate exist. The pipeline strain characteristic classification calculation method based on the K-nearest neighbor method can well solve the problems that discrimination standard difference exists in manual identification and automation is difficult to achieve, and saves a large amount of manpower resources and time cost.
In view of the above technical problems, the technical solution provided by the present application has the following general idea:
the application provides a pipeline strain feature classification calculation method based on a K-nearest neighbor method, which is applied to a pipeline strain feature classification calculation system based on the K-nearest neighbor method, wherein the method comprises the following steps: acquiring a detection data set in a pipeline of a target device; denoising the detection data set in the pipeline to obtain a reconstructed standard detection data set; respectively carrying out vertical component calculation and horizontal component calculation of a computer algorithm on the standard detection data set to obtain vertical strain and horizontal strain of the target equipment; establishing a pipeline strain characteristic matrix based on the vertical strain and the horizontal strain, and performing data integration to obtain a bending strain set of each point in the target equipment; constructing a feature classification confusion matrix of the target equipment based on the bending strain sets of the points; and performing prediction classification according to the feature classification confusion matrix to obtain a target classification result of the detection data in the pipeline.
Having thus described the general principles of the present application, various non-limiting embodiments thereof will now be described in detail with reference to the accompanying drawings.
Example one
Referring to fig. 1, an embodiment of the present application provides a pipeline strain feature classification calculation method based on a K-nearest neighbor method, where the method is applied to a pipeline strain feature classification calculation system based on the K-nearest neighbor method, and the method specifically includes the following steps:
step S100: acquiring a detection data set in a pipeline of target equipment;
in particular, high precision tactical Inertial Measurement Unit (IMU) based in-pipe bending strain detection has become a common practice for oil and gas pipelines in recent years. The bending strain result obtained by IMU measurement can be analyzed to find a high strain pipe section caused by surface subsidence and the like. Compared with the existing displacement detection technology, the IMU internal detection can detect the bending strain and displacement of the pipeline point by point on the whole line, and the bending strain and displacement monitoring of the pipeline is more comprehensive and accurate. Repeated many times carries out detection in the IMU and can monitor pipeline displacement change and rate of change, in time reports the great defect point of pipeline displacement change and the very fast point of pipeline displacement change to carry out effectual monitoring and early warning to the pipeline meeting an emergency, be convenient for in time initiatively maintain the pipeline defect point and get rid of the environmental factor that leads to the pipeline displacement.
Although a large amount of pipeline detection data is provided, corresponding data processing means and evaluation methods are still lacked. At present, possible geological disaster high-risk section identification work is mainly carried out by means of a traditional manual identification method, and the problems of inconsistent judgment standards, low identification efficiency and high misjudgment rate exist. In order to accurately judge the pipeline detection data, the pipeline strain characteristic classification calculation method based on the K-nearest neighbor method is provided, the problems that the manual identification has discrimination standard difference and the automation is difficult to realize can be well solved, and a large amount of manpower resources and time cost are saved.
More specifically, the target equipment can be characterized as an in-service long oil and gas pipeline, the bending strain of the whole pipeline can be detected by utilizing an IMU detection technology, the detection error is small, the IMU detector mainly comprises an IMU bin, a mileage wheel, a geometric detection system, a supporting wheel and the like, the principle is that the attitude information of the carrier can be obtained after the angular rates measured by three direction gyroscopes orthogonally installed on an inertial navigation system are subjected to integral operation for one time, the attitude information comprises pitch angle information, course direction information and transverse attitude information, similarly, the instant speed information of the carrier relative to the previous position can be obtained after the acceleration information measured by the three direction accelerometers orthogonally installed is subjected to integral operation for one time, and the position information of the carrier can be calculated after the integral operation for one time. After the position information and the angle of the carrier are continuously combined, the accurate track of the motion of the carrier in the space can be calculated, and the detection data set in the pipeline can be obtained.
Step S200: denoising the detection data set in the pipeline to obtain a reconstructed standard detection data set;
further, step S200 includes:
step S210: performing wavelet decomposition on the detection data set in the pipeline to obtain a first frequency component and a second frequency component;
step S220: performing threshold processing on the first frequency component to obtain a processed component set;
step S230: and performing wavelet reconstruction on the processed component set and the second frequency component to obtain the standard detection data set.
Specifically, when the internal detector is operated in a pipeline, the inertial detection unit mounted on the internal detector is easily interfered by factors such as the external environment of the pipeline, internal factors and artificial activities, and a large amount of noise signals are generated. Therefore, before the IMU data is identified, noise reduction processing is required, so that errors can be reduced, and the identification accuracy of the model can be improved, and the fine errors can change the result at a critical position, so as to draw a wrong conclusion.
The wavelet transform is a local analysis method of time domain and frequency domain, and can finally achieve time subdivision at high frequency and frequency subdivision at low frequency by carrying out multi-scale refinement on signals, has strong characterization capability on local characteristics of the signals, and can automatically adapt to the requirements of time-frequency signal analysis. The noisy IMU data model may be represented as: s (k (═ f (k)) + epsilon × e (k)) k is 0, 1, … n-1 where S (k) is noise-containing data, f (k) is low-frequency strain data, e (k) is medium-high frequency noise, and epsilon is the standard deviation of the noise figure.
As shown in fig. 2, in the IMU data denoising, wavelet decomposition is performed on an original signal to obtain a first frequency component and a second frequency component, where the first frequency component corresponds to a detail component of a high frequency portion, and the second frequency component corresponds to an approximation component of a low frequency portion, and then the first frequency component is subjected to thresholding to obtain a processed component set, that is, the detail component of the high frequency portion is subjected to thresholding, and then wavelet reconstruction is performed on the processed components, that is, the processed component set and the second frequency component, to obtain the standard detection data set, thereby implementing IMU data denoising. The simplest way to denoise using wavelet transform is to zero out the high frequency coefficients (HH, HL, LH) of each layer, preserve the low frequency coefficients, and then reconstruct the signal using the wavelet coefficients.
Step S300: respectively carrying out vertical component calculation and horizontal component calculation of a computer algorithm on the standard detection data set to obtain vertical strain and horizontal strain of the target equipment;
further, step S300 includes:
step S310: according to the formula one:calculating to obtain the total curvature k, the vertical component curvature kv and the horizontal component curvature kh of the target equipment;
in the formula, delta P is pitch angle variation, delta A is course angle variation, delta s is pipeline central line absolute mileage variation, and P is pitch angle;
step S320: according to the formula two:calculating to obtain the total bending strain E and the vertical strain E of the target equipmentvAnd said horizontal strain ∈h;
Wherein D is the radial length of the target device.
Specifically, after the noise reduction processing is performed on the operation data, further, the vertical component calculation and the horizontal component calculation of the computer algorithm may be performed on the standard detection data set, that is, according to the formula one:and calculating to obtain the total curvature k, the vertical component curvature kv and the horizontal component curvature kh of the target equipment, wherein Δ P is the pitch angle variation, Δ a is the course angle variation, Δ s is the absolute mileage variation of the pipeline center line, and P is the pitch angle.
Further, assuming the central line of the pipeline as a neutral axis, the total bending strain E and the vertical strain E of the target equipment can be obtained by calculation according to a formula IIvAnd said horizontal strain ∈hI.e. byD is the radial length of the target equipment, and the vertical strain and the horizontal strain can be calculated and analyzed according to attitude data recorded by an IMU inertia detection unit, wherein the vertical strain isThe horizontal strain isIn obtaining the vertical strain and the waterAfter strain is leveled, deep feature extraction is convenient for the data.
Step S400: establishing a pipeline strain characteristic matrix based on the vertical strain and the horizontal strain, and performing data integration to obtain a bending strain set of each point in the target equipment;
further, step S400 includes:
step S410: creating a first matrix according to the vertical strain and the horizontal strain: wherein T is a matrix of strain values,is the horizontal strain at the nth point,vertical strain at nth point;
according to the formula three:integrating the data of the horizontal strain and the vertical strain to obtain the bending strain epsilon of the nth pointn。
Specifically, when constructing a training sample using existing IMU data, since the solved IMU strain data has components in both the horizontal and vertical directions, a matrix one may be created from the vertical strain and the horizontal strain:i.e., a "2 x n" pipe section strain characterization matrix, where T is a matrix of strain values,is the horizontal strain at the nth point,is the vertical strain at the nth point.
For convenience of calculation, the horizontal strain and the vertical strain may be integrated into the bending strain, i.e. according to formula three:and integrating the data of the horizontal strain and the vertical strain to obtain the bending strain set of each point.
More specifically, in the IMU sensing bending strain data, positive values of horizontal strain indicate that the flow direction of the fluid in the pipe is to the right in the horizontal plane, while negative values indicate that this direction is to the left; a positive value for the vertical strain indicates that the flow direction of the fluid in the pipe is downward in the vertical plane, while a negative value indicates that this direction is upward. For a curved deformed pipe section, the deformation direction characteristics of the pipe contribute less to the identification of the pipe section. Therefore, although the bending strain is adopted as the identification data, the characteristics of the horizontal component and the vertical component in the direction are lost to a certain extent, the influence on the identification effect is not great, the dimension reduction can be carried out on the sample data, and the calculation process is greatly simplified.
The data-driven pipe segment identification is actually the analysis of a section of data, and a machine learning model with good effect can be obtained only by extracting effective features from each section of data and extracting the features. Feature extraction is not kick-on and requires stepwise attempts of analysis. The first step of the characteristic engineering is to obtain some attributes of bending strain data, and 11 attributes are extracted according to the physical significance of IMU data and by combining the analysis, wherein the attributes are amplitude, peak-to-peak value, minimum value, mean value, skewness, kurtosis, standard deviation, peak factor, pulse factor, margin factor and length.
Step S500: constructing a feature classification confusion matrix of the target equipment based on the bending strain sets of the points;
further, step S500 includes:
step S510: carrying out data division on the bending strain sets of the points to obtain a training example point set and an input example point set;
step S520: constructing a feature classification confusion matrix of the target equipment based on the input instance point set;
step S530: and inputting the training example point set into the feature classification confusion matrix, and performing prediction classification to obtain the target classification result.
Specifically, after the bending strain sets of the points are obtained, specifically, the pipeline strain features may be classified and calculated based on a K-nearest neighbor method, where the K-nearest neighbor method basically performs: for a given training instance point and input instance point, first determine the K nearest neighbor training instance points of the input instance point, i.e., construct the feature classification confusion matrix of the target device based on the input instance point set. The majority of the class of K training instance points is then used to predict the class of input instance points. Obviously, K is an important parameter, and when K takes different values, the classification results may be significantly different, and on the other hand, if different distance calculation methods are adopted, the found 'neighbors' may be significantly different, which may result in significantly different classification results. The K-nearest neighbor model corresponds to a partition of the feature space based on the training dataset.
The main advantages of the K-nearest neighbor method include: the algorithm is simple and intuitive and is easy to realize; extra data is not required to be generated to describe the rule, the rule is the training data (sample) per se, the problem of data consistency is not required, and noise can exist; the problem of unbalance of the number of samples can be well avoided; from the aspect of the classification process, the KNN method most directly utilizes the relation between samples, reduces the adverse effect on the classification result caused by improper selection of the class characteristics, and can reduce the error term in the classification process to the greatest extent. But also has some disadvantages, such as slow sorting speed; the sample library capacity dependence is strong; the characteristic functions are the same; the classification accuracy cannot be guaranteed when the K value is improperly selected. In the K-nearest neighbor method, after a training set, distance measurement, a K value and a classification decision rule are determined, the result is uniquely determined.
A common distance metric is Euclidean distance, and there are other measurement methods, in n-dimensional real number vector spaceThe distance between two points is defined as:in the formula: manhattan distance when P is 1; when P is 2, the Euclidean distance is obtained; when P ∞ is the chebyshev distance. The selection of the K value reflects a trade-off between approximation error and estimation error, and in order to determine the actual error of the model under different K values, the model error rates under different K values are tested between 1 and 31, and the sample data is divided into 10 parts for cross-validation. It can be seen that the error rate of the K-neighbor model is relatively low when the K value is before 5 to 20, and the error rate of the K-neighbor model is the lowest when the K value is 10, as shown in fig. 3. The classification decision rule in the K-nearest neighbor method is often a majority vote, i.e., the class of an input instance is determined by the majority class in the K adjacent training instances of the input instance.
Step S600: and performing prediction classification according to the feature classification confusion matrix to obtain a target classification result of the detection data in the pipeline.
Specifically, when the confusion matrix is classified according to the features and prediction classification is performed, for example, IMU detection data with a station spacing of 246km is selected as a test data set, and the IMU detection data comprises 204 concave samples, 526 elbow samples, 976 bending deformation samples and a training data set, which are processed in the same way, and then the IMU detection data is classified by putting a K neighbor model, and a confusion matrix is drawn by comparing a training data set label with a test set prediction point label, wherein 0 represents a concave section, 1 represents an elbow section, 2 represents a bending deformation section, 167 concave sections are identified as concave sections, 3 concave sections are identified as elbow sections, and 35 concave sections are identified as bending deformation sections; 444 elbow samples are identified as elbow sections, 66 elbow samples are identified as concave sections, and 16 elbow deformation sections are identified; of 975 bending deformation samples, 864 were identified as bending deformation sections, 111 as depression sections, and 0 as elbow sections, and it can be seen that the identification of the depression sections and the elbow sections is substantially correct, the identification error of the bending deformation sections is large, and more than 10% of the bending deformation sections are identified as depression sections.
As shown in table 1 below:
TABLE 1k neighbor model evaluation index
And (3) calculating a derived classification model evaluation index according to the confusion matrix, wherein the classification accuracy rate by using the method of the invention is 85.46%. The problems that the manual identification has discrimination standard difference and the automation is difficult to realize are solved well, and a large amount of human resources and time cost are saved.
In summary, the pipeline strain feature classification calculation method based on the K-nearest neighbor method provided by the embodiment of the present application has the following technical effects:
1. acquiring a detection data set in a pipeline of a target device; denoising the detection data set in the pipeline to obtain a reconstructed standard detection data set; respectively carrying out vertical component calculation and horizontal component calculation of a computer algorithm on the standard detection data set to obtain vertical strain and horizontal strain of the target equipment; establishing a pipeline strain characteristic matrix based on the vertical strain and the horizontal strain, and performing data integration to obtain a bending strain set of each point in the target equipment; constructing a feature classification confusion matrix of the target equipment based on the bending strain sets of the points; and performing prediction classification according to the feature classification confusion matrix to obtain a target classification result of the detection data in the pipeline. The technical effects of saving a large amount of manpower resources and time cost and realizing efficient and accurate classification of pipeline strain characteristics are achieved by carrying out noise reduction processing on the detection data in the in-service pipeline, further carrying out calculation of vertical components and horizontal components on the processed standard detection data, carrying out feature extraction on the detection data in the pipeline based on the feature extraction, and carrying out classification calculation on the pipeline strain characteristics based on a K-nearest neighbor method on the feature extraction set.
2. Before IMU data is identified, noise reduction processing is required, so that errors can be reduced, the identification accuracy of the model is improved, and the results can be changed at key positions due to slight errors, so that wrong conclusions are avoided, and the classification result is accurate.
Example two
Based on the same inventive concept as the method for calculating the pipeline strain characteristic classification based on the K-nearest neighbor method in the foregoing embodiment, the present invention further provides a system for calculating the pipeline strain characteristic classification based on the K-nearest neighbor method, please refer to fig. 4, where the system includes:
a first obtaining unit 11, where the first obtaining unit 11 is configured to obtain an in-pipeline detection data set of a target device;
a first processing unit 12, where the first processing unit 12 is configured to perform noise reduction processing on the detection data set in the pipeline to obtain a reconstructed standard detection data set;
the first calculating unit 13 is configured to perform vertical and horizontal component calculation of a computer algorithm on the standard detection data set respectively to obtain a vertical strain and a horizontal strain of the target device;
a first creating unit 14, where the first creating unit 14 is configured to create a pipeline strain feature matrix based on the vertical strain and the horizontal strain, and perform data integration to obtain a set of bending strains of each point in the target device;
a first constructing unit 15, where the first constructing unit 15 is configured to construct a feature classification confusion matrix of the target device based on the point bending strain sets;
a first classification unit 16, where the first classification unit 16 is configured to perform prediction classification according to the feature classification confusion matrix, so as to obtain a target classification result of the detection data in the pipeline.
Further, the system further comprises:
the first decomposition unit is used for performing wavelet decomposition on the detection data set in the pipeline to obtain a first frequency component and a second frequency component;
a second processing unit, configured to perform threshold processing on the first frequency component to obtain a processed component set;
a first reconstruction unit; the first reconstruction unit is configured to perform wavelet reconstruction on the processed component set and the second frequency component to obtain the standard detection data set.
Further, the system further comprises:
a second calculation unit to:and calculating to obtain the total curvature k, the vertical component curvature kv and the horizontal component curvature kh of the target equipment, wherein in the formula, Δ P is the pitch angle variation, Δ a is the course angle variation, Δ s is the absolute mileage variation of the central line of the pipeline, and P is the pitch angle.
Further, the system further comprises:
a third computing unit to:calculating to obtain the total bending strain E and the vertical strain E of the target equipmentvAnd said horizontal strain ∈hWhere D is the radial length of the target device.
Further, the system further comprises:
a second creating unit configured to create a first matrix according to the vertical strain and the horizontal strain:wherein T is a matrix of strain values,is the horizontal strain at the nth point,vertical strain at nth point;
a first integration unit to, according to formula three: integrating the data of the horizontal strain and the vertical strain to obtain the bending strain epsilon of the nth pointn。
Further, the system further comprises:
the first dividing unit is used for carrying out data division on the bending strain sets of the points to obtain a training example point set and an input example point set;
a second construction unit, configured to construct a feature classification confusion matrix of the target device based on the input instance point set;
and the first input unit is used for inputting the training example point set into the feature classification confusion matrix to carry out prediction classification so as to obtain the target classification result.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, the foregoing pipeline strain feature classification calculation method based on the K-nearest neighbor method in the first embodiment of fig. 1 and the specific example are also applicable to a pipeline strain feature classification calculation system based on the K-nearest neighbor method in this embodiment, and through the foregoing detailed description of the pipeline strain feature classification calculation method based on the K-nearest neighbor method, those skilled in the art can clearly know a pipeline strain feature classification calculation system based on the K-nearest neighbor method in this embodiment, so for brevity of the description, detailed description is omitted here. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Exemplary electronic device
The electronic device of the embodiment of the present application is described below with reference to fig. 5.
Fig. 5 illustrates a schematic structural diagram of an electronic device according to an embodiment of the present application.
Based on the inventive concept of the pipeline strain feature classification calculation method based on the K-nearest neighbor method in the foregoing embodiments, the present invention further provides a pipeline strain feature classification calculation system based on the K-nearest neighbor method, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of any one of the foregoing pipeline strain feature classification calculation methods based on the K-nearest neighbor method.
Where in fig. 5 a bus architecture (represented by bus 300), bus 300 may include any number of interconnected buses and bridges, bus 300 linking together various circuits including one or more processors, represented by processor 302, and memory, represented by memory 304. The bus 300 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 305 provides an interface between the bus 300 and the receiver 301 and transmitter 303. The receiver 301 and the transmitter 303 may be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over a transmission medium.
The processor 302 is responsible for managing the bus 300 and general processing, and the memory 304 may be used for storing data used by the processor 302 in performing operations.
The application provides a pipeline strain feature classification calculation method based on a K-nearest neighbor method, which is applied to a pipeline strain feature classification calculation system based on the K-nearest neighbor method, wherein the method comprises the following steps: acquiring a detection data set in a pipeline of a target device; denoising the detection data set in the pipeline to obtain a reconstructed standard detection data set; respectively carrying out vertical component calculation and horizontal component calculation of a computer algorithm on the standard detection data set to obtain vertical strain and horizontal strain of the target equipment; establishing a pipeline strain characteristic matrix based on the vertical strain and the horizontal strain, and performing data integration to obtain a bending strain set of each point in the target equipment; constructing a feature classification confusion matrix of the target equipment based on the bending strain sets of the points; and performing prediction classification according to the feature classification confusion matrix to obtain a target classification result of the detection data in the pipeline. The technical effects of saving a large amount of manpower resources and time cost and realizing efficient and accurate classification of pipeline strain characteristics are achieved by carrying out noise reduction processing on the detection data in the in-service pipeline, further carrying out calculation of vertical components and horizontal components on the processed standard detection data, carrying out feature extraction on the detection data in the pipeline based on the feature extraction, and carrying out classification calculation on the pipeline strain characteristics based on a K-nearest neighbor method on the feature extraction set.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely software embodiment, an entirely hardware embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application is in the form of a computer program product that may be embodied on one or more computer-usable storage media having computer-usable program code embodied therewith. And such computer-usable storage media include, but are not limited to: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk Memory, a Compact Disc Read-Only Memory (CD-ROM), and an optical Memory.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a system for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (8)
1. A pipeline strain feature classification calculation method based on a K-nearest neighbor method is characterized by comprising the following steps:
acquiring a detection data set in a pipeline of target equipment;
denoising the detection data set in the pipeline to obtain a reconstructed standard detection data set;
respectively carrying out vertical component calculation and horizontal component calculation of a computer algorithm on the standard detection data set to obtain vertical strain and horizontal strain of the target equipment;
establishing a pipeline strain characteristic matrix based on the vertical strain and the horizontal strain, and performing data integration to obtain a bending strain set of each point in the target equipment;
constructing a feature classification confusion matrix of the target equipment based on the bending strain sets of the points;
and performing prediction classification according to the feature classification confusion matrix to obtain a target classification result of the detection data in the pipeline.
2. The method of claim 1, wherein the de-noising the set of in-pipe detection data comprises:
performing wavelet decomposition on the detection data set in the pipeline to obtain a first frequency component and a second frequency component;
performing threshold processing on the first frequency component to obtain a processed component set;
and performing wavelet reconstruction on the processed component set and the second frequency component to obtain the standard detection data set.
3. The method of claim 1, wherein said performing a vertical and a horizontal component calculation of a computer algorithm on said standard test data set, respectively, comprises:
according to the formula one:calculating to obtain the total curvature k, the vertical component curvature kv and the horizontal component curvature kh of the target equipment;
in the formula, Δ P is pitch angle variation, Δ a is course angle variation, Δ s is absolute mileage variation of the pipeline center line, and P is pitch angle.
5. The method of claim 1, wherein the creating a pipeline strain signature matrix comprises:
creating a first matrix according to the vertical strain and the horizontal strain: wherein T is a matrix of strain values,is the horizontal strain at the nth point,vertical strain at nth point;
6. The method of claim 1, wherein the constructing the feature classification confusion matrix for the target device comprises:
carrying out data division on the bending strain sets of the points to obtain a training example point set and an input example point set;
constructing a feature classification confusion matrix of the target equipment based on the input instance point set;
and inputting the training example point set into the feature classification confusion matrix, and performing prediction classification to obtain the target classification result.
7. A pipeline strain feature classification and calculation system based on a K-nearest neighbor method is characterized by comprising the following steps:
a first obtaining unit, configured to obtain an in-pipeline detection data set of a target device;
the first processing unit is used for carrying out noise reduction processing on the detection data set in the pipeline to obtain a reconstructed standard detection data set;
the first calculation unit is used for respectively calculating the vertical component and the horizontal component of a computer algorithm of the standard detection data set to obtain the vertical strain and the horizontal strain of the target equipment;
a first creating unit, configured to create a pipeline strain feature matrix based on the vertical strain and the horizontal strain, and perform data integration to obtain a bending strain set of each point in the target device;
a first constructing unit, configured to construct a feature classification confusion matrix of the target device based on the point bending strain sets;
and the first classification unit is used for carrying out prediction classification according to the characteristic classification confusion matrix to obtain a target classification result of the detection data in the pipeline.
8. A pipeline strain feature classification calculation system based on a K-nearest neighbor method, comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of the method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111630940.5A CN114330442A (en) | 2021-12-28 | 2021-12-28 | Pipeline strain characteristic classification calculation method and system based on K-nearest neighbor method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111630940.5A CN114330442A (en) | 2021-12-28 | 2021-12-28 | Pipeline strain characteristic classification calculation method and system based on K-nearest neighbor method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114330442A true CN114330442A (en) | 2022-04-12 |
Family
ID=81014066
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111630940.5A Pending CN114330442A (en) | 2021-12-28 | 2021-12-28 | Pipeline strain characteristic classification calculation method and system based on K-nearest neighbor method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114330442A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117195664A (en) * | 2023-11-07 | 2023-12-08 | 北京市科学技术研究院 | Underground pipeline monitoring and early warning method and system |
-
2021
- 2021-12-28 CN CN202111630940.5A patent/CN114330442A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117195664A (en) * | 2023-11-07 | 2023-12-08 | 北京市科学技术研究院 | Underground pipeline monitoring and early warning method and system |
CN117195664B (en) * | 2023-11-07 | 2024-01-12 | 北京市科学技术研究院 | Underground pipeline monitoring and early warning method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108387933B (en) | Method, device and system for determining formation quality factor | |
CN113297272B (en) | Bridge monitoring data association rule mining and health early warning method and system | |
Zhihong et al. | Evaluation of granular particle roundness using digital image processing and computational geometry | |
CN103792576A (en) | Reservoir heterogeneous detection method and device based on gradient structure tensor | |
CN106053066A (en) | Antifriction bearing performance degradation assessment method based on empirical mode decomposition and logistic regression | |
CN109492775B (en) | Geological structure interpretation detection method, geological structure interpretation detection device and readable storage medium | |
CN114912789B (en) | Downhole risk early warning method, downhole risk early warning equipment and storage medium | |
CN112950771B (en) | Detection method and system for surrounding rock structure and related components | |
Son et al. | Deep learning-based anomaly detection to classify inaccurate data and damaged condition of a cable-stayed bridge | |
CN103853144B (en) | Spot sensor fault detection method based on oil recovery creation data | |
Ye et al. | A deep learning-based method for automatic abnormal data detection: Case study for bridge structural health monitoring | |
CN114330442A (en) | Pipeline strain characteristic classification calculation method and system based on K-nearest neighbor method | |
CN112766301A (en) | Similarity judgment method for indicator diagram of oil extraction machine | |
CN114492555A (en) | Method and device for identifying reasons of abnormal operation of conveying pipeline | |
CN108734392A (en) | A kind of Grey Incidence Analysis of evaluation geological disaster influence degree | |
Yuan et al. | A novel method for pavement transverse crack detection based on 2D reconstruction of vehicle vibration signal | |
CN114662977A (en) | Method and system for detecting abnormity of motion state of offshore drilling platform and electronic equipment | |
Bach et al. | Automatic case capturing for problematic drilling situations | |
CN112198552B (en) | Width determination method and device for pleat breaking system | |
Feizi et al. | Identifying damage location under statistical pattern recognition by new feature extraction and feature analysis methods | |
Nuhn et al. | Preparation of complex landslide simulation results with clustering approaches for decision support and early warning | |
Colace et al. | Unsupervised Learning Techniques for Vibration-Based Structural Health Monitoring Systems Driven by Data: A General Overview | |
CN114329963A (en) | Small-caliber pipeline strain calculation optimization method and system based on internal detection | |
Liu et al. | Landslide displacement prediction model based on multisource monitoring data fusion | |
Gietz et al. | Machine Learning for Automated Sand Transport Monitoring in a Pipeline Using Distributed Acoustic Sensor Data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |