A method for detecting metal defects
By emitting ultrasonic waves at both ends of the hardware and using a multi-feature extraction prediction model to process abnormal echo signals, the problem of being unable to identify abnormal echo signals in ultrasonic detection is solved, and the precision and positioning accuracy of hardware defect detection are improved.
Patent Information
- Application Number
- CN202410775997.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-08-20
- Estimated Expiration
- 2044-06-17
AI Technical Summary
When ultrasonic testing of hardware, abnormal echo signals cannot be identified, resulting in low defect detection accuracy.
Ultrasonic waves are emitted at both ends of the hardware to obtain the first echo signal set and the second echo signal set. Through a multi-feature extraction prediction model, based on the feature matrix of abnormal echo signals, the degree of defects in the hardware is predicted.
It improves the accuracy and positioning accuracy of hardware defect detection, and can identify internal defects and evaluate the degree of defects.
Smart Images

Figure CN118348126B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of ultrasonic defect detection, and in particular to a hardware defect detection method. Background Art
[0002] In the power system, hardware is an important connection and fixing element used to connect conductors, insulator strings, crossarms, etc. The quality of hardware directly affects the safe operation of the power system. Therefore, defect detection of hardware is of great practical significance. Traditional hardware defect detection methods mainly include manual visual inspection, images, etc. These methods have problems such as low detection efficiency and poor accuracy. At the same time, they can only detect surface defects and cannot detect internal defects. In recent years, with the development of non-destructive testing technology, ultrasonic testing technology has been widely used in hardware defect detection.
[0003] Ultrasonic testing technology is a non-destructive testing method based on the principle of ultrasonic propagation. It has the advantages of non-contact, non-destructive, and high sensitivity. By emitting ultrasonic waves and receiving their echo signals, the internal structure information of the object being tested can be obtained. However, the hardware structure itself is curved. Therefore, the use of ultrasonic testing hardware has the disadvantage of being unable to identify abnormal echo signals, resulting in low defect detection accuracy. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, a hardware defect detection method provided by the present invention solves the problem of low defect detection accuracy caused by the inability to identify abnormal echo signals when using ultrasonic detection of hardware.
[0005] In order to achieve the above-mentioned purpose of the invention, the technical solution adopted by the present invention is: a method for detecting defects in hardware, comprising the following steps:
[0006] S1. Transmit ultrasonic waves to each hardware fitting at one end of the hardware fitting to obtain the first echo signal set of each hardware fitting;
[0007] S2, transmitting ultrasonic waves to each hardware fitting at the other end of the hardware fitting to obtain a second echo signal set of each hardware fitting;
[0008] S3, extracting abnormal echo signals in the first echo signal set and abnormal echo signals in the second echo signal set corresponding to the abnormal hardware according to the first echo signal set and the second echo signal set of the plurality of hardware;
[0009] S4. Predict the defect degree of the hardware fitting based on the multi-feature extraction prediction model according to the abnormal feature matrix of the abnormal echo signals in the first echo signal set and the abnormal echo signals in the second echo signal set of the same hardware fitting.
[0010] The beneficial effects of the present invention are:
[0011] 1. The present invention transmits ultrasonic waves at both ends of the same section area respectively, detects the same section area, obtains a first echo signal set and a second echo signal set, screens out abnormal echo signals from the first echo signal set and the second echo signal set respectively, locates the same hardware through the abnormal echo signals in the two echo signal sets, predicts the degree of hardware defects based on the multi-feature extraction prediction model according to the abnormal feature matrix of the abnormal echo signals in the first echo signal set and the abnormal echo signals in the second echo signal set of the same hardware, and improves the prediction accuracy of the hardware.
[0012] 2. When producing hardware, when the surface of the hardware is intact, its internal defects are difficult to detect. However, if there are defects inside, the strength of the hardware will be seriously affected. Therefore, the present invention detects the produced hardware, identifies abnormal echo signals, and then locates the corresponding hardware. When abnormal echo signals are present in the detection at both ends of the hardware, there are defects in the detection area, which improves the defect positioning accuracy. Based on the abnormal echo signals at both ends, the defect degree of the hardware is evaluated to improve the defect detection accuracy.
[0013] Furthermore, S3 includes the following sub-steps:
[0014] S31, collecting the echo signals according to the first echo signals of the plurality of hardware fittings, and finding the first abnormal echo signal;
[0015] S32, collecting the echo signals according to the second echo signals of the plurality of hardware fittings, and finding the second abnormal echo signal;
[0016] S33, corresponding each first abnormal echo signal to hardware, and constructing a first hardware set;
[0017] S34, corresponding each second abnormal echo signal to hardware, and constructing a second hardware set;
[0018] S35, taking the intersection of the first hardware set and the second hardware set to obtain abnormal hardware;
[0019] S36, taking the first abnormal echo signal of the abnormal hardware as the abnormal echo signal in the first echo signal set corresponding to the abnormal hardware;
[0020] S37. Use the second abnormal echo signal of the abnormal hardware as the abnormal echo signal in the second echo signal set corresponding to the abnormal hardware.
[0021] The beneficial effect of the above further scheme is: the present invention finds abnormal echo signals from the first echo signal set and the second echo signal set respectively, and then locates the corresponding hardware through the abnormal echo signals. The present invention takes the intersection of the first hardware set and the second hardware set in order to find the hardware with abnormal echo signals at both ends of the detection, proving that the hardware has defects in the detection area, thereby improving the accuracy of locating the defective area.
[0022] Furthermore, the S31 includes the following sub-steps:
[0023] S311, constructing a feature vector of each echo signal in the first echo signal set of each hardware, wherein the feature vector of the echo signal includes: echo arrival time, echo time length and energy;
[0024] S312, randomly select a feature vector as a comparison feature vector;
[0025] S313, calculating a first distance coefficient between the comparison feature vector and the feature vector of the unclassified echo signal in the first echo signal set of other hardware;
[0026] S314, determining whether there is a first distance coefficient less than the distance threshold, if so, classifying the echo signal of the feature vector corresponding to the distance threshold less than the distance threshold as a normal class, if not, classifying the echo signal of the comparison feature vector as an abnormal class;
[0027] S315, judging whether there is a feature vector of an unclassified echo signal in all first echo signal sets, if yes, selecting the feature vector of the unclassified echo signal as the comparison feature vector and jumping to step S313, if no, jumping to step S316;
[0028] S316. The echo signal in the abnormal class is a first abnormal echo signal.
[0029] Further, the S32 includes the following sub-steps:
[0030] S321, extracting a feature vector of each echo signal in the second echo signal set of each hardware, wherein the echo signal feature vector includes: echo time, echo length and energy;
[0031] S322, randomly select a feature vector as a comparison feature vector;
[0032] S323, calculating a second distance coefficient between the comparison feature vector and the feature vector of the unclassified echo signal in the second echo signal set of other hardware;
[0033] S324, determining whether there is a second distance coefficient less than the distance threshold, if so, classifying the echo signal of the feature vector corresponding to the distance threshold less than the distance threshold as a normal class, if not, classifying the echo signal of the comparison feature vector as an abnormal class;
[0034] S325, judging whether there is a feature vector of an unclassified echo signal in all the second echo signal sets, if so, selecting the feature vector of the unclassified echo signal as the comparison feature vector and jumping to step S323, if not, jumping to step S326;
[0035] S326. The echo signal in the abnormal class is a second abnormal echo signal.
[0036] The beneficial effect of the above further scheme is: the present invention constructs a feature vector for each echo signal, compares the comparison feature vector with the feature vectors of other hardware, calculates the distance coefficient, measures the similarity between the two by the distance coefficient, classifies the similar ones into normal classes, and classifies those without similar feature vectors into abnormal classes, thereby realizing the classification of the echo signals corresponding to each feature vector.
[0037] The characteristic vectors of the echo signals at one end of each hardware are compared to find the abnormal echo signal at one end, and then the defective hardware is located by combining the abnormal echo signals at both ends.
[0038] Furthermore, the distance coefficient is calculated as follows:
[0039] ,
[0040] Where d is the distance coefficient, T rea,1 To compare the echo arrival time in the feature vector, T rea,2 is the echo arrival time in the feature vector of the unclassified echo signal, T len,1 To compare the echo time length in the feature vector, T len,2 is the echo time length in the feature vector of the unclassified echo signal, E1 is the energy in the comparison feature vector, and E2 is the energy in the feature vector of the unclassified echo signal.
[0041] The beneficial effects of the above further scheme are as follows: the present invention selects the echo arrival time to help determine the exact location of the defect, the echo time length and energy can preliminarily determine the defect size and shape characteristics, and comprehensively calculates the distance coefficient by combining the echo time, echo length and energy to determine the similarity of the two feature vectors.
[0042] Furthermore, the S4 comprises the following sub-steps:
[0043] S41, constructing a first abnormal feature matrix for each abnormal echo signal in the first echo signal set of the hardware;
[0044] S42, constructing a second abnormal feature matrix for each abnormal echo signal in the second echo signal set of the hardware;
[0045] S43, predicting a first defect value based on a multi-feature extraction prediction model according to all first abnormal feature matrices corresponding to the first echo signal set;
[0046] S44, predicting a second defect value based on a multi-feature extraction prediction model according to all second abnormal feature matrices corresponding to the second echo signal set;
[0047] S45. Calculate the defect degree of the hardware according to the first defect value and the second defect value.
[0048] The beneficial effect of the above further scheme is: the present invention constructs an abnormal feature matrix for each abnormal echo signal, reduces the amount of data, and highlights the signal characteristics. When there is a defect inside the hardware, the defect will generate multiple echo signals. Therefore, the present invention adopts a multi-feature extraction prediction model to predict the defect value, combines the first defect value and the second defect value, calculates the degree of hardware defects, and improves the defect prediction accuracy.
[0049] Furthermore, the construction of the first abnormal feature matrix in S41 and the construction of the second abnormal feature matrix in S42 both include the following sub-steps:
[0050] B1. Divide each abnormal echo signal into multiple segments to obtain multiple abnormal echo sub-signals;
[0051] B2, extracting the amplitude mean, amplitude variance and amplitude kurtosis of each abnormal echo sub-signal and constructing them into an amplitude feature sequence;
[0052] B3. Combine all amplitude feature sequences to obtain an abnormal feature matrix.
[0053] The beneficial effect of the above further scheme is: the present invention segments each abnormal echo signal, extracts the mean, variance and kurtosis of the segments, reflects the shape characteristics of each abnormal echo sub-signal, combines all amplitude feature sequences to obtain an abnormal feature matrix, and characterizes the characteristics of each abnormal echo signal through the abnormal feature matrix.
[0054] Further, the multi-feature extraction prediction model in S43 and S44 includes: a plurality of abnormal feature extraction units, a plurality of local fully connected layers and a global fully connected layer;
[0055] The input end of each of the abnormal feature extraction units is used to input an abnormal feature matrix, and the output end thereof is connected to the input end of a local fully connected layer;
[0056] The input end of the global fully connected layer is connected to the output ends of multiple local fully connected layers respectively, and the output ends thereof serve as the output ends of the multi-feature extraction prediction model;
[0057] The local fully connected layer is used to calculate the local value of the defect according to the feature value output by the abnormal feature extraction unit;
[0058] The global fully connected layer is used to calculate the defect value according to each local value of the defect.
[0059] The beneficial effect of the above further scheme is: the abnormal feature extraction unit of the present invention is used to process the abnormal feature matrix of the abnormal echo signal at one end, the local fully connected layer integrates the output eigenvalues of each abnormal feature extraction unit to obtain the local value of the defect, and integrates the local values of each defect to obtain the defect value, thereby realizing the integration of the abnormal feature matrix of each abnormal echo signal at one end and evaluating the defect situation at one end.
[0060] Further, the structures of the multiple abnormal feature extraction units are the same, and all include: a first convolutional layer, a second convolutional layer, a third convolutional layer, a first softmax layer, a second softmax layer, a third softmax layer, a first multiplier M1, a second multiplier M2, a third multiplier M3, an average pooling layer, a maximum pooling layer, a first adder A1 and a second adder A2;
[0061] The input end of the first convolutional layer is respectively connected to the input end of the second convolutional layer and the input end of the third convolutional layer, and serves as the input end of each abnormal feature extraction unit; the first input end of the first multiplier M1 is respectively connected to the input end of the first softmax layer and the output end of the first convolutional layer, and the second input end is connected to the output end of the first softmax layer; the first input end of the second multiplier M2 is respectively connected to the input end of the second softmax layer and the output end of the second convolutional layer, and the second input end is connected to the output end of the second softmax layer; the third multiplier M3 The first input end of is respectively connected to the input end of the third softmax layer and the output end of the third convolutional layer, and the second input end thereof is connected to the output end of the third softmax layer; the input end of the first adder A1 is respectively connected to the output end of the first multiplier M1, the output end of the second multiplier M2 and the output end of the third multiplier M3, and the output end thereof is respectively connected to the input end of the average pooling layer and the input end of the maximum pooling layer; the input end of the second adder A2 is respectively connected to the output end of the average pooling layer and the output end of the maximum pooling layer, and the output end thereof serves as the output end of each abnormal feature extraction unit.
[0062] The beneficial effect of the above further scheme is: in the present invention, the convolution kernel sizes of the first convolution layer, the second convolution layer and the third convolution layer are different, different features are extracted, and the softmax layer is used to enhance the features of each channel. The enhanced feature fusion is realized by the first adder A1, and the effective features of each channel are screened out and feature expansion is performed. The average pooling layer and the maximum pooling layer are then used for processing to further screen the effective features and improve the prediction accuracy.
[0063] Furthermore, the formula for calculating the degree of hardware defects in S45 is:
[0064] ,
[0065] Among them, y is the degree of hardware defects, h1 is the first defect value, and h2 is the second defect value. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 It is a flow chart of a hardware defect detection method;
[0067] Figure 2 It is a detection schematic diagram;
[0068] Figure 3 It is a schematic diagram of the structure of the multi-feature extraction prediction model;
[0069] Figure 4 Schematic diagram of the structure of the abnormal feature extraction unit. DETAILED DESCRIPTION
[0070] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0071] like Figure 1 As shown, a method for detecting defects in hardware includes the following steps:
[0072] S1. Transmit ultrasonic waves to each hardware fitting at one end of the hardware fitting to obtain the first echo signal set of each hardware fitting;
[0073] S2, transmitting ultrasonic waves to each hardware fitting at the other end of the hardware fitting to obtain a second echo signal set of each hardware fitting;
[0074] S3, extracting abnormal echo signals in the first echo signal set and abnormal echo signals in the second echo signal set corresponding to the abnormal hardware according to the first echo signal set and the second echo signal set of the plurality of hardware;
[0075] S4. Predict the defect degree of the hardware fitting based on the multi-feature extraction prediction model according to the abnormal feature matrix of the abnormal echo signals in the first echo signal set and the abnormal echo signals in the second echo signal set of the same hardware fitting.
[0076] In the present invention, one end of the hardware and the other end of the hardware are directed to different directions of the same detection area. For example, the method of the present invention is applied to a U-shaped hardware, and the positions of one end of the hardware and the other end of the hardware are as follows: Figure 2 shown.
[0077] The S3 comprises the following sub-steps:
[0078] S31, collecting the echo signals according to the first echo signals of the plurality of hardware fittings, and finding the first abnormal echo signal;
[0079] S32, collecting the echo signals according to the second echo signals of the plurality of hardware fittings, and finding the second abnormal echo signal;
[0080] S33, corresponding each first abnormal echo signal to hardware, and constructing a first hardware set;
[0081] S34, corresponding each second abnormal echo signal to hardware, and constructing a second hardware set;
[0082] S35, taking the intersection of the first hardware set and the second hardware set to obtain abnormal hardware;
[0083] S36, taking the first abnormal echo signal of the abnormal hardware as the abnormal echo signal in the first echo signal set corresponding to the abnormal hardware;
[0084] S37. Use the second abnormal echo signal of the abnormal hardware as the abnormal echo signal in the second echo signal set corresponding to the abnormal hardware.
[0085] In this embodiment, each hardware to be tested in production is numbered, and each first abnormal echo signal corresponds to the number of the hardware to construct a first hardware set. Each second abnormal echo signal corresponds to the number of the hardware to construct a second hardware set. By taking the intersection of the two, the hardware with abnormalities detected at both ends can be found.
[0086] The present invention finds abnormal echo signals from the first echo signal set and the second echo signal set respectively, and then locates the corresponding hardware through the abnormal echo signals. The present invention takes the intersection of the first hardware set and the second hardware set in order to find the hardware with abnormal echo signals at both ends, proving that the hardware has defects in the detection area, thereby improving the accuracy of locating the defective area.
[0087] The S31 comprises the following sub-steps:
[0088] S311, constructing a feature vector of each echo signal in the first echo signal set of each hardware, wherein the feature vector of the echo signal includes: echo arrival time, echo time length and energy;
[0089] S312, randomly select a feature vector as a comparison feature vector;
[0090] S313, calculating a first distance coefficient between the comparison feature vector and the feature vector of the unclassified echo signal in the first echo signal set of other hardware;
[0091] S314, determining whether there is a first distance coefficient less than the distance threshold, if so, classifying the echo signal of the feature vector corresponding to the distance threshold less than the distance threshold as a normal class, if not, classifying the echo signal of the comparison feature vector as an abnormal class;
[0092] S315, judging whether there is a feature vector of an unclassified echo signal in all first echo signal sets, if yes, selecting the feature vector of the unclassified echo signal as the comparison feature vector and jumping to step S313, if no, jumping to step S316;
[0093] S316. The echo signal in the abnormal class is a first abnormal echo signal.
[0094] The S32 comprises the following sub-steps:
[0095] S321, extracting a feature vector of each echo signal in the second echo signal set of each hardware, wherein the echo signal feature vector includes: echo time, echo length and energy;
[0096] S322, randomly select a feature vector as a comparison feature vector;
[0097] S323, calculating a second distance coefficient between the comparison feature vector and the feature vector of the unclassified echo signal in the second echo signal set of other hardware;
[0098] S324, determining whether there is a second distance coefficient less than the distance threshold, if so, classifying the echo signal of the feature vector corresponding to the distance threshold less than the distance threshold as a normal class, if not, classifying the echo signal of the comparison feature vector as an abnormal class;
[0099] S325, judging whether there is a feature vector of an unclassified echo signal in all the second echo signal sets, if so, selecting the feature vector of the unclassified echo signal as the comparison feature vector and jumping to step S323, if not, jumping to step S326;
[0100] S326. The echo signal in the abnormal class is a second abnormal echo signal.
[0101] The present invention constructs a feature vector for each echo signal, compares the comparison feature vector with the feature vectors of other hardware, calculates the distance coefficient, measures the similarity between the two by the distance coefficient, classifies the similar ones into normal classes, and classifies those without similar feature vectors into abnormal classes, thereby realizing the classification of the echo signals corresponding to each feature vector.
[0102] In this embodiment, the distance threshold is set based on experience or experiments.
[0103] In steps S313 and S323, the present invention compares the characteristic vector of a hardware with the characteristic vectors of other hardware. If they are similar, it means that the hardware structures are similar and there is no abnormality.
[0104] The characteristic vectors of the echo signals at one end of each hardware are compared to find the abnormal echo signal at one end, and then the defective hardware is located by combining the abnormal echo signals at both ends.
[0105] In steps S313 and S323, the formula for calculating the distance coefficient is:
[0106] ,
[0107] Where d is the distance coefficient, T rea,1 To compare the echo arrival time in the feature vector, T rea,2 is the echo arrival time in the feature vector of the unclassified echo signal, T len,1 To compare the echo time length in the feature vector, T len,2 is the echo time length in the feature vector of the unclassified echo signal, E1 is the energy in the comparison feature vector, and E2 is the energy in the feature vector of the unclassified echo signal.
[0108] In the present invention, energy is the integration of the square of the amplitude of an echo signal over time.
[0109] The present invention selects the echo arrival time to help determine the exact location of the defect, and the echo time length and energy can preliminarily determine the defect size and shape characteristics. The echo time, echo length and energy are combined to calculate the distance coefficient and determine the similarity of the two feature vectors.
[0110] The S4 comprises the following sub-steps:
[0111] S41, constructing a first abnormal feature matrix for each abnormal echo signal in the first echo signal set of the hardware;
[0112] S42, constructing a second abnormal feature matrix for each abnormal echo signal in the second echo signal set of the hardware;
[0113] S43, predicting a first defect value based on a multi-feature extraction prediction model according to all first abnormal feature matrices corresponding to the first echo signal set;
[0114] S44, predicting a second defect value based on a multi-feature extraction prediction model according to all second abnormal feature matrices corresponding to the second echo signal set;
[0115] S45. Calculate the defect degree of the hardware according to the first defect value and the second defect value.
[0116] The present invention constructs an abnormal feature matrix for each abnormal echo signal, reduces the amount of data, and highlights the signal characteristics. When there is a defect inside the hardware, the defect will generate multiple echo signals. Therefore, the present invention adopts a multi-feature extraction prediction model to predict the defect value, combines the first defect value and the second defect value, calculates the defect degree of the hardware, and improves the defect prediction accuracy.
[0117] The construction of the first abnormal feature matrix in S41 and the construction of the second abnormal feature matrix in S42 both include the following sub-steps:
[0118] B1. Divide each abnormal echo signal into multiple segments to obtain multiple abnormal echo sub-signals;
[0119] B2, extracting the amplitude mean, amplitude variance and amplitude kurtosis of each abnormal echo sub-signal and constructing them into an amplitude feature sequence;
[0120] B3. Combine all amplitude feature sequences to obtain an abnormal feature matrix.
[0121] In this embodiment, each amplitude feature sequence can be used as a row vector composed of row elements of the abnormal feature matrix.
[0122] The present invention segments each abnormal echo signal, extracts the mean, variance and kurtosis of the segments, reflects the shape characteristics of each abnormal echo sub-signal, combines all amplitude feature sequences to obtain an abnormal feature matrix, and characterizes the characteristics of each abnormal echo signal through the abnormal feature matrix.
[0123] like Figure 3 As shown, the multi-feature extraction prediction model in S43 and S44 includes: multiple abnormal feature extraction units, multiple local fully connected layers and a global fully connected layer;
[0124] The input end of each abnormal feature extraction unit is used to input an abnormal feature matrix, and its output end is connected to the input end of a local fully connected layer; the input end of the global fully connected layer is respectively connected to the output ends of multiple local fully connected layers, and its output end serves as the output end of the multi-feature extraction prediction model; the local fully connected layer is used to calculate the local value of the defect according to the feature value output by the abnormal feature extraction unit; the global fully connected layer is used to calculate the defect value according to each local value of the defect.
[0125] In this embodiment, the number of the multiple abnormal feature extraction units is equal to the number of the multiple local fully connected layers, and the number of the multiple abnormal feature extraction units is equal to the number of abnormal echo signals at one end.
[0126] The abnormal feature extraction unit of the present invention is used to process the abnormal feature matrix of the abnormal echo signal at one end. The local fully connected layer integrates the output eigenvalues of each abnormal feature extraction unit to obtain the local value of the defect, and integrates the local values of each defect to obtain the defect value, thereby realizing the integration of the abnormal feature matrix of each abnormal echo signal at one end and evaluating the defect situation at one end.
[0127] The local fully connected layer assigns different weights and biases to each feature value output by the abnormal feature extraction unit, and the global fully connected layer assigns different weights and biases to the local values of defects output by each local fully connected layer.
[0128] like Figure 4 As shown, the structures of the multiple abnormal feature extraction units are the same, and all include: a first convolution layer, a second convolution layer, a third convolution layer, a first softmax layer, a second softmax layer, a third softmax layer, a first multiplier M1, a second multiplier M2, a third multiplier M3, an average pooling layer, a maximum pooling layer, a first adder A1 and a second adder A2;
[0129] The input end of the first convolutional layer is respectively connected to the input end of the second convolutional layer and the input end of the third convolutional layer, and serves as the input end of each abnormal feature extraction unit; the first input end of the first multiplier M1 is respectively connected to the input end of the first softmax layer and the output end of the first convolutional layer, and the second input end is connected to the output end of the first softmax layer; the first input end of the second multiplier M2 is respectively connected to the input end of the second softmax layer and the output end of the second convolutional layer, and the second input end is connected to the output end of the second softmax layer; the third multiplier M3 The first input end of is respectively connected to the input end of the third softmax layer and the output end of the third convolutional layer, and the second input end thereof is connected to the output end of the third softmax layer; the input end of the first adder A1 is respectively connected to the output end of the first multiplier M1, the output end of the second multiplier M2 and the output end of the third multiplier M3, and the output end thereof is respectively connected to the input end of the average pooling layer and the input end of the maximum pooling layer; the input end of the second adder A2 is respectively connected to the output end of the average pooling layer and the output end of the maximum pooling layer, and the output end thereof serves as the output end of each abnormal feature extraction unit.
[0130] In the present invention, the convolution kernel sizes of the first convolution layer, the second convolution layer and the third convolution layer are different, different features are extracted, and the softmax layer is used to enhance the features of each channel. The enhanced feature fusion is realized by the first adder A1, and the effective features of each channel are screened out and feature expansion is performed. The average pooling layer and the maximum pooling layer are then used for processing to further screen the effective features and improve the prediction accuracy.
[0131] In this embodiment, the multi-feature extraction prediction model is trained by the gradient descent method.
[0132] In this embodiment, the convolution kernel size of the first convolutional layer is , the convolution kernel size of the second convolutional layer is , the convolution kernel size of the third convolutional layer is .
[0133] The formula for calculating the degree of hardware defects in S45 is:
[0134] ,
[0135] Among them, y is the degree of hardware defects, h1 is the first defect value, and h2 is the second defect value.
[0136] The present invention transmits ultrasonic waves at both ends of the same section of the area respectively, detects the same section of the area, obtains a first echo signal set and a second echo signal set, screens out abnormal echo signals from the first echo signal set and the second echo signal set respectively, locates the same hardware through the abnormal echo signals in the two echo signal sets, predicts the degree of hardware defects based on a multi-feature extraction prediction model according to the abnormal feature matrix of the abnormal echo signals in the first echo signal set and the abnormal echo signals in the second echo signal set of the same hardware, and improves the prediction accuracy of the hardware.
[0137] When producing hardware, when the surface of the hardware is intact, its internal defects are difficult to detect. However, if there are defects inside, the strength of the hardware will be seriously affected. Therefore, the present invention detects the produced hardware, identifies abnormal echo signals, and then locates the corresponding hardware. When abnormal echo signals are present in the detection at both ends of the hardware, there is a defect in the detection area, which improves the defect positioning accuracy. Based on the abnormal echo signals at both ends, the defect degree of the hardware is evaluated to improve the defect detection accuracy.
[0138] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting defects in hardware, characterized in that: The following steps are involved: S1. Transmit ultrasonic waves to each hardware fitting at one end of the hardware fitting to obtain the first echo signal set of each hardware fitting; S2, transmitting ultrasonic waves to each hardware fitting at the other end of the hardware fitting to obtain a second echo signal set of each hardware fitting; S3, extracting abnormal echo signals in the first echo signal set and abnormal echo signals in the second echo signal set corresponding to the abnormal hardware according to the first echo signal set and the second echo signal set of the plurality of hardware; S4, predicting the defect degree of the hardware fitting based on the multi-feature extraction prediction model according to the abnormal feature matrix of the abnormal echo signals in the first echo signal set and the abnormal echo signals in the second echo signal set of the same hardware fitting; The S3 comprises the following sub-steps: S31, collecting the echo signals according to the first echo signals of the plurality of hardware fittings, and finding the first abnormal echo signal; S32, collecting the echo signals according to the second echo signals of the plurality of hardware fittings, and finding the second abnormal echo signal; S33, corresponding each first abnormal echo signal to hardware, and constructing a first hardware set; S34, corresponding each second abnormal echo signal to hardware, and constructing a second hardware set; S35, taking the intersection of the first hardware set and the second hardware set to obtain abnormal hardware; S36, taking the first abnormal echo signal of the abnormal hardware as the abnormal echo signal in the first echo signal set corresponding to the abnormal hardware; S37, taking the second abnormal echo signal of the abnormal hardware as the abnormal echo signal in the second echo signal set corresponding to the abnormal hardware; The S31 The following steps are included: S311, constructing a feature vector of each echo signal in the first echo signal set of each hardware, wherein the feature vector of the echo signal includes: echo arrival time, echo time length and energy; S312, randomly select a feature vector as a comparison feature vector; S313, calculating a first distance coefficient between the comparison feature vector and the feature vector of the unclassified echo signal in the first echo signal set of other hardware; S314, determining whether there is a first distance coefficient less than the distance threshold, if so, classifying the echo signal of the feature vector corresponding to the distance threshold less than the distance threshold as a normal class, if not, classifying the echo signal of the comparison feature vector as an abnormal class; S315, judging whether there is a feature vector of an unclassified echo signal in all first echo signal sets, if yes, selecting the feature vector of the unclassified echo signal as the comparison feature vector and jumping to step S313, if no, jumping to step S316; S316. The echo signal in the abnormal class is a first abnormal echo signal.
2. The method for detecting hardware defects according to claim 1, characterized in that: The S32 comprises the following sub-steps: S321, extracting a feature vector of each echo signal in the second echo signal set of each hardware, wherein the echo signal feature vector includes: echo time, echo length and energy; S322, randomly select a feature vector as a comparison feature vector; S323, calculating a second distance coefficient between the comparison feature vector and the feature vector of the unclassified echo signal in the second echo signal set of other hardware; S324, determining whether there is a second distance coefficient less than the distance threshold, if so, classifying the echo signal of the feature vector corresponding to the distance threshold less than the distance threshold as a normal class, if not, classifying the echo signal of the comparison feature vector as an abnormal class; S325, judging whether there is a feature vector of an unclassified echo signal in all the second echo signal sets, if so, selecting the feature vector of the unclassified echo signal as the comparison feature vector and jumping to step S323, if not, jumping to step S326; S326. The echo signal in the abnormal class is a second abnormal echo signal.
3. The method for detecting hardware defects according to claim 2, characterized in that: The calculation formula of the distance coefficient is: , Where d is the distance coefficient, T rea,1 To compare the echo arrival time in the feature vector, T rea,2 is the echo arrival time in the feature vector of the unclassified echo signal, T len,1 To compare the echo time length in the feature vector, T len,2 is the echo time length in the feature vector of the unclassified echo signal, E1 is the energy in the comparison feature vector, and E2 is the energy in the feature vector of the unclassified echo signal.
4. The method for detecting hardware defects according to claim 1, characterized in that: The S4 comprises the following sub-steps: S41, constructing a first abnormal feature matrix for each abnormal echo signal in the first echo signal set of the hardware; S42, constructing a second abnormal feature matrix for each abnormal echo signal in the second echo signal set of the hardware; S43, predicting a first defect value based on a multi-feature extraction prediction model according to all first abnormal feature matrices corresponding to the first echo signal set; S44, predicting a second defect value based on a multi-feature extraction prediction model according to all second abnormal feature matrices corresponding to the second echo signal set; S45. Calculate the defect degree of the hardware according to the first defect value and the second defect value.
5. The method for detecting hardware defects according to claim 4, characterized in that: The construction of the first abnormal feature matrix in S41 and the construction of the second abnormal feature matrix in S42 both include the following sub-steps: B1. Divide each abnormal echo signal into multiple segments to obtain multiple abnormal echo sub-signals; B2, extracting the amplitude mean, amplitude variance and amplitude kurtosis of each abnormal echo sub-signal and constructing them into an amplitude feature sequence; B3. Combine all amplitude feature sequences to obtain an abnormal feature matrix.
6. The method for detecting hardware defects according to claim 4, characterized in that: The multi-feature extraction prediction model in S43 and S44 includes: multiple abnormal feature extraction units, multiple local fully connected layers and a global fully connected layer; The input end of each abnormal feature extraction unit is used to input an abnormal feature matrix, and its output end is connected to the input end of a local fully connected layer; the input end of the global fully connected layer is respectively connected to the output ends of multiple local fully connected layers, and its output end serves as the output end of the multi-feature extraction prediction model; the local fully connected layer is used to calculate the local value of the defect according to the feature value output by the abnormal feature extraction unit; the global fully connected layer is used to calculate the defect value according to each local value of the defect.
7. The method for detecting hardware defects according to claim 6, characterized in that: The structures of the multiple abnormal feature extraction units are the same, and all include: a first convolution layer, a second convolution layer, a third convolution layer, a first softmax layer, a second softmax layer, a third softmax layer, a first multiplier M1, a second multiplier M2, a third multiplier M3, an average pooling layer, a maximum pooling layer, a first adder A1 and a second adder A2; The input end of the first convolutional layer is respectively connected to the input end of the second convolutional layer and the input end of the third convolutional layer, and serves as the input end of each abnormal feature extraction unit; the first input end of the first multiplier M1 is respectively connected to the input end of the first softmax layer and the output end of the first convolutional layer, and the second input end is connected to the output end of the first softmax layer; the first input end of the second multiplier M2 is respectively connected to the input end of the second softmax layer and the output end of the second convolutional layer, and the second input end is connected to the output end of the second softmax layer; the third multiplier M3 The first input end of is respectively connected to the input end of the third softmax layer and the output end of the third convolutional layer, and the second input end thereof is connected to the output end of the third softmax layer; the input end of the first adder A1 is respectively connected to the output end of the first multiplier M1, the output end of the second multiplier M2 and the output end of the third multiplier M3, and the output end thereof is respectively connected to the input end of the average pooling layer and the input end of the maximum pooling layer; the input end of the second adder A2 is respectively connected to the output end of the average pooling layer and the output end of the maximum pooling layer, and the output end thereof serves as the output end of each abnormal feature extraction unit.
8. The method for detecting hardware defects according to claim 4, characterized in that: The formula for calculating the degree of hardware defects in S45 is: , Among them, y is the degree of hardware defects, h1 is the first defect value, and h2 is the second defect value.
