A deep learning-based bolt defect real-time intelligent detection system and method

CN117893505BActive Publication Date: 2026-10-20DALIAN POLYTECHNIC UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410064702.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-17
Publication Date
2026-10-20
Estimated Expiration
2044-01-17

AI Technical Summary

Technical Problem

[0003]本发明主要解决人为分析超声探头探测到的螺栓缺陷A扫脉冲信号数据做出判断导致检测速度慢、精度低、受到人为主观影响因素较大,并且数据零散,无法进行后续统计分析及可视化等技术问题,提出一种基于深度学习的螺栓缺陷实时智能检测系统及方法

Benefits of technology

[0020]进一步的,进一步包括用于显示结果的检测界面,具体过程如下:检测结果显示:检测完成后,在数据预处理模块中描述的可视化图表下面显示对应的检测结果,包含缺陷深度、强度、是否检测出缺陷,并显示含有标记缺陷位置的二维螺栓平面图,以及在检测到缺陷的通道图中标记缺陷峰;基于Solidworks三维建模软件构建螺栓的三维模型并通过QT中的Opengl模块实现了在检测系统弹窗上显示标记缺陷位置的三维模拟工件,显示三维工件信息;数据库连接:基于Mysql数据库创建了用于存储历史检测数据的数据库,当实时检测数据检测完成之后可以对该数据进行规则命名,并在创建的数据库中选择对应的子库完成存储;利用数据库可视化统计界面,通过选择需要统计的内容、范围、可视化图表类型来统计数据库中数据得各类情况;生成报告:检测完成后导出报告,所述报告内容为:检测文字结果、缺陷对应的通道脉冲图像、在螺栓上的位置图像、缺陷对应峰的位置信息、信噪比。本发明有以下优点:(1)在检测系统中,基于迭代、拟合分析算法能够自适应的分析不同的缺陷脉冲序列噪音水平、含有缺陷的峰位置信息并计算相应的信噪比。并基于脉冲序列提取的特征构建深度学习分类网络,有效的识别螺栓缺陷的损失大小。(2)采用TCP实时通信技术、迭代分析算法、BP神经网络、UI界面等技术能够对超声探测到的数据进行实时的检测并生成报告。检测系统基于TCP通信技术能够实时将超声探测软件探测到的数据传回处理端。TCP通信技术为检测端提供了可靠的数据传输保障,高效的传输速率是检测结果更加实时更新。(3)在检测系统中,对分析结果可视化,将检测结果在3D螺栓工件上标记出对应的位置,检测结果更加直观的展现给检测人员,并且输出对应的文字信息以及检测过程中的相关参数,使检测结果更具说服力。(4)通过连接数据库,能够将历史检测数据信息悉数存储在数据库中,确保信息的保留,并可以对数据库中的数据进行统计并可视化确保了历史数据的可用性。(5)对于实时检测的工件结果,可以导出为PDF、WORD格式的检测报告,且可以人为添加报告中需要同时输出的其他信息,极大的为检测人员提供便利。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117893505B_ABST
    Figure CN117893505B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on deep learning's bolt defect real-time intelligent detection system and method.In the detection system, based on iteration, fitting analysis algorithm can be self-adaptingly analyzed different defect pulse sequence noise level, contain defect peak position information and calculate corresponding signal-to-noise ratio.Based on the feature of pulse sequence extraction, deep learning classification network is constructed, and the loss size of bolt defect is effectively identified.TCP real-time communication technology, iterative analysis algorithm, BP neural network, UI interface and other technologies can detect the data detected by ultrasonic detection in real time and generate report.Analysis result is visualized, corresponding position is marked on 3D bolt workpiece by detection result, detection result is more intuitively presented to detection personnel, and corresponding text information and related parameters in detection process are output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of detection technology, and in particular to a real-time intelligent detection system and method for bolt defects based on deep learning. Background Technology

[0002] Bolts play a vital role in industrial development; however, prolonged neglect of bolt replacement can lead to safety hazards. Therefore, bolt defect detection is crucial in industry. It ensures safe operation, prevents damage, improves efficiency and reliability, and ultimately enhances cost-effectiveness. Currently, determining whether bolt cross-sectional damage necessitates replacement relies on manual analysis of A-scan pulse signal data detected by ultrasonic probes. This manual method is slow, inaccurate, heavily influenced by subjective factors, and produces fragmented data unsuitable for subsequent statistical analysis and visualization. With advancements in computer science and technology, big data and artificial intelligence methods are increasingly being applied to industrial inspection with remarkable performance. Intelligent analysis algorithms can effectively identify bolt defects by analyzing ultrasonically detected defect data. Summary of the Invention

[0003] This invention addresses the technical problems of slow detection speed, low accuracy, and significant subjective influence caused by manually analyzing the A-scan pulse signal data of bolt defects detected by ultrasonic probes, as well as the fragmented data that makes subsequent statistical analysis and visualization impossible. It proposes a real-time intelligent bolt defect detection system and method based on deep learning.

[0004] This invention provides a real-time intelligent detection method for bolt defects based on deep learning, comprising the following steps: Step 100, real-time data acquisition and processing: ultrasonic flaw detection software connects to the data acquisition module via TCP communication technology to acquire the current sampling data; Step 200, data preprocessing: the data preprocessing module divides the pulse signal from start to end into five regions, namely: nut region, transition region, bolt region, thread region, and bottom wave region; Step 300, detecting the cross-sectional loss of bolt defects through the detection algorithm module, further comprising the following sub-steps: Step S301, determining the first peak: by calculating the monotonically decreasing zero point of the first derivative of the pulse sequence, all peaks in the sequence are determined. The formula for calculating the first derivative is: Where f(x) represents the x-th sampling point in the discrete sequence, and h represents the step size between sampling points; the peaks in the sequence are merged, and a cluster of peaks is merged to form one peak. The first derivative is used to determine all the peaks of the new curve; the nut area is deleted, and the peak with the highest intensity is used as the detection standard. The corresponding channel is marked as the channel where the defect was detected; Step S302: Calculate the noise level: calculate the standard deviation and mean of the pulse sequence. The formula for calculating the mean is: in Let X1 be the mean of the pulse sequence, and X2 be the mean of the pulse sequence. n This represents the value of the nth sampling point in the pulse sequence; n represents the sampling length; the formula for calculating the standard deviation is: Among them, S x x represents the standard deviation calculated from the pulse sequence. i This represents the value of the i-th sampling point in the pulse sequence. Let represent the mean of the pulse sequence, and n represent the sampling length. The final result can be obtained by iterative calculation based on these two indicators. The specific steps are: first, calculate the mean and standard deviation of the pulse sequence, and then, through screening conditions... These sampling points are not noise, among which S represents the mean of the pulse sequence. x X represents the standard deviation of the pulse sequence. del This indicates sampling points that meet the deletion criteria. The pulse sequence is iterated through, and sampling points meeting the criteria are deleted. This filtering process is repeated iteratively until the standard deviation and mean of the sequence tend to stabilize. The iteration process ends, and the final mean and standard deviation are calculated. The noise level is then set to... It meets the noise level standards for all sampled samples, among which S represents the mean of the pulse sequence. x S represents the standard deviation of the pulse sequence. noiseThe noise level is indicated in step S303. The signal-to-noise ratio (SNR) is determined as follows: When the SNR of the first peak of the pulse sequence is greater than 12, the pulse sequence is considered to contain a defect signal. The SNR calculation formula is: Δ = 20log(H1 / H2), where H1 represents the peak intensity of the first peak and H2 represents the noise level. The result is determined in step S304: The cross-sectional loss of the bolt defect is determined to be greater than 15%. The main steps are as follows: Several pulse sequences are collected as training samples, and the first peak of the defect and the corresponding location information of the defect in the pulse sequence are extracted as features. The transition area, screw area, and threaded area to be detected are quantized into numerical features 0, 1, and 2, respectively, as feature values ​​of the training samples. It is determined whether there is a bottom wave requantization; if there is a bottom wave, it is quantized as 0; if there is no bottom wave, it is quantized as 1. The quantized data is also used as features of the training samples. Four items are extracted in each pulse sequence sample, and a BP neural network with feedforward error backpropagation is selected as the recognition network. The four extracted features are used as input to the neural network, and the output is two results: cross-sectional loss greater than 15% and less than 15%.

[0005] Furthermore, step 100 further includes the step of setting the sampling length through the data acquisition module. Each time, a total of 4 sets of sampling data from 4 channels are acquired, namely TR12, TR34, TR14 and TR32. The defect information is contained in one or more sets of data from the above four channels.

[0006] Furthermore, in step 200, the sampling length percentages of the five regions are 18.2%, 10.1%, 36.3%, 25.3%, and 10.1%, respectively.

[0007] Furthermore, in step S304, during the construction of the BP neural network, the number of nodes in each layer is determined according to a commonly used neural network node determination method, and the calculation formula is as follows: Where m and n represent the number of hidden layer nodes, and I and O represent the number of input and output layers, respectively; during the forward propagation of the model, the calculation formula between the current node and the previous layer node is: Where w ij b represents the weight between nodes i and j. j Let x be the threshold for node j. j =f(S) j ) is the output of each node, where f is the activation function, which is ReLU, and its calculation formula is as follows:

[0008]

[0009] BPNN networks have backpropagation capabilities. During backpropagation, the calculation method is as follows, with all output layer results represented by d. j Then the error function is:

[0010] Where y j The true result is represented by n, where n is the number of samples.

[0011] After the neural network is trained, in subsequent real-time detection, the trained model can directly detect whether the cross-sectional loss of bolt defects is greater than 15%.

[0012] Furthermore, the real-time intelligent detection method further includes step 400, displaying the results using the detection interface, specifically including the following sub-steps: Step S401, displaying the detection results: After the detection is completed, the corresponding detection results are displayed below the visualization chart described in the data preprocessing module, including defect depth, strength, whether a defect was detected, and a two-dimensional bolt planar diagram with marked defect locations is displayed, as well as defect peaks marked in the channel diagram where defects were detected; a three-dimensional model of the bolt is constructed based on Solidworks three-dimensional modeling software, and the three-dimensional simulated workpiece with marked defect locations is displayed on the detection system pop-up window through the OpenGL module in QT. Step S402: Database connection: A database for storing historical inspection data is created based on a MySQL database. After the real-time inspection data is completed, the data can be named according to rules, and the corresponding sub-database can be selected in the created database to complete the storage. Using the database visualization statistics interface, the various situations of the data in the database can be statistically analyzed by selecting the content, range, and visualization chart type to be statistically analyzed. Step S403: Report generation: After the inspection is completed, the report is exported. The report content includes: inspection text results, channel pulse image corresponding to the defect, position image on the bolt, position information of the peak corresponding to the defect, and signal-to-noise ratio.

[0013] This invention also provides a real-time intelligent detection system for bolt defects based on deep learning. The real-time intelligent detection system includes: a data acquisition module connected to ultrasonic flaw detection software via TCP communication technology, used to acquire current sampling data; a data preprocessing module connected to the data acquisition module, used to divide the pulse signal from start to end into five regions: nut region, transition region, screw region, threaded region, and bottom wave region; and a detection algorithm module connected to the data preprocessing module, used to detect the cross-sectional loss of bolt defects. The specific process is as follows: Determining the first peak: By calculating the monotonically decreasing zero point of the first derivative of the pulse sequence, all peaks in the sequence are determined. The formula for calculating the first derivative is: Where f(x) represents the x-th sampling point in the discrete sequence, and h represents the step size between sampling points; the peaks in the sequence are merged, and a cluster of peaks is fused to form a single peak. The first derivative is used to determine all peaks of the new curve; the nut area is deleted, and the peak with the highest intensity is used as the detection standard, and the corresponding channel is marked as the channel where the defect was detected; the noise level is calculated: the standard deviation and mean of the pulse sequence are calculated, and the formula for calculating the mean is: in Let X1 be the mean of the pulse sequence, and X2 be the mean of the pulse sequence. n This represents the value of the nth sampling point in the pulse sequence; n represents the sampling length; the formula for calculating the standard deviation is: Among them, S x x represents the standard deviation calculated from the pulse sequence. i This represents the value of the i-th sampling point in the pulse sequence. Let represent the mean of the pulse sequence, and n represent the sampling length. The final result can be obtained by iterative calculation based on these two indicators. The specific steps are: first, calculate the mean and standard deviation of the pulse sequence, and then, through screening conditions... These sampling points are not noise, among which S represents the mean of the pulse sequence. x X represents the standard deviation of the pulse sequence. del This indicates sampling points that meet the deletion criteria. The pulse sequence is iterated through, and sampling points meeting the criteria are deleted. This filtering process is repeated iteratively until the standard deviation and mean of the sequence tend to stabilize. The iteration process ends, and the final mean and standard deviation are calculated. The noise level is then set to... It meets the noise level standards for all sampled samples, among which S represents the mean of the pulse sequence. x S represents the standard deviation of the pulse sequence. noiseThe noise level is indicated; the signal-to-noise ratio (SNR) is determined: when the SNR of the first peak of the pulse sequence is greater than 12, the pulse sequence is considered to contain a defect signal. The formula for calculating the SNR is: Δ = 20log(H1 / H2), where H1 represents the peak intensity of the first peak and H2 represents the noise level value; the result is determined: whether the cross-sectional loss of the bolt defect is greater than 15% is determined. The main steps are as follows: several pulse sequences are collected as training samples, and the first peak of the defect and the corresponding position information of the defect in the pulse sequence are extracted as features; the transition area, screw area, and thread area to be detected are quantized into numerical features 0, 1, and 2 as feature values ​​of the training samples; it is determined whether there is a bottom wave and then requantized. If there is a bottom wave, it is quantized as 0, and if there is no bottom wave, it is quantized as 1. The quantized data is also used as the feature of the training samples; four items are extracted in each pulse sequence sample, and a BP neural network with feedforward error backpropagation is selected as the recognition network; the four extracted features are used as the input of the neural network, and the output is two results: cross-sectional loss greater than 15% and less than 15%.

[0014] Furthermore, by setting the sampling length through the data acquisition module, a total of 4 sets of sampling data from 4 channels are acquired each time. The channels are TR12, TR34, TR14, and TR32. The defect information is contained in one or more sets of data from the above four channels.

[0015] Furthermore, the sampling length percentages for the five regions were 18.2%, 10.1%, 36.3%, 25.3%, and 10.1%, respectively.

[0016] Furthermore, in the process of constructing the BP neural network, the number of nodes in each layer is determined according to the commonly used neural network node determination method, and the calculation formula is as follows: Where m and n represent the number of hidden layer nodes, and I and O represent the number of input and output layers, respectively; during the forward propagation of the model, the calculation formula between the current node and the previous layer node is: Where w ij b represents the weight between nodes i and j. j Let x be the threshold for node j. j =f(S) j ) is the output of each node, where f is the activation function, which is ReLU, and its calculation formula is as follows:

[0017]

[0018] BPNN networks have backpropagation capabilities. During backpropagation, the calculation method is as follows, with all output layer results represented by d. j Then the error function is:

[0019] Where yj For the actual results, n is the number of samples; after the neural network is trained, in subsequent real-time detection, the trained model can directly detect whether the cross-sectional loss of bolt defects is greater than 15%.

[0020] Furthermore, the system includes a detection interface for displaying results, with the following specific steps: Detection result display: After detection, the corresponding detection results are displayed below the visualization charts described in the data preprocessing module. These results include defect depth, strength, and whether a defect was detected. A two-dimensional bolt planar diagram with marked defect locations is also displayed, along with defect peaks marked in the channel diagram where defects were detected. A three-dimensional model of the bolt is constructed using Solidworks 3D modeling software, and the three-dimensional simulated workpiece with marked defect locations is displayed on the detection system pop-up window using the OpenGL module in QT, displaying the three-dimensional workpiece information. Database connection: A database for storing historical detection data is created based on a MySQL database. After real-time detection data is completed, the data can be named according to rules, and the corresponding sub-database can be selected in the created database for storage. The database visualization statistics interface is used to statistically analyze various aspects of the data in the database by selecting the content, range, and visualization chart type to be statistically analyzed. Report generation: After detection, a report is exported. The report content includes: detection text results, channel pulse images corresponding to the defect, position images on the bolt, position information of the peaks corresponding to the defect, and signal-to-noise ratio. The present invention has the following advantages: (1) In the detection system, the iterative and fitting analysis algorithm can adaptively analyze different defect pulse sequence noise levels, peak position information containing defects, and calculate the corresponding signal-to-noise ratio. Based on the features extracted from the pulse sequence, a deep learning classification network is constructed to effectively identify the loss magnitude of bolt defects. (2) Using TCP real-time communication technology, iterative analysis algorithm, BP neural network, UI interface and other technologies, the data detected by ultrasonic testing can be detected in real time and a report can be generated. The detection system can transmit the data detected by the ultrasonic testing software back to the processing end in real time based on TCP communication technology. TCP communication technology provides reliable data transmission guarantee for the detection end, and the efficient transmission rate makes the detection results more real-time updated. (3) In the detection system, the analysis results are visualized, and the corresponding positions of the detection results are marked on the 3D bolt workpiece. The detection results are presented to the testing personnel more intuitively, and the corresponding text information and relevant parameters in the detection process are output, making the detection results more convincing. (4) By connecting to the database, all historical detection data information can be stored in the database to ensure the preservation of information. The data in the database can be statistically analyzed and visualized to ensure the availability of historical data. (5) The results of real-time inspection of workpieces can be exported as inspection reports in PDF and WORD formats. Other information that needs to be output at the same time can be added manually, which greatly facilitates the inspection personnel. Attached Figure Description

[0021] Figure 1 This invention provides a real-time intelligent detection system for bolt defects based on deep learning, along with its flowchart. Detailed Implementation

[0022] To make the technical problems solved by this invention, the technical solutions adopted, and the technical effects achieved clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings, not all of them.

[0023] like Figure 1 This invention provides a real-time intelligent bolt defect detection system based on deep learning, along with its flowchart. The specific implementation is as follows:

[0024] 1. Real-time data acquisition and processing

[0025] Taking bolt defect detection in the core casing of a nuclear power plant as an example, when a user needs to use the detection system, they first need to connect the detection system of this invention to the flaw detection software based on TCP communication technology. The system receives bolt defect sampling data collected by the flaw detection software in real time. Due to the real-time transmission of data, the values ​​at each sampling point are constantly changing. When the data stabilizes, the current sampling data is obtained by clicking the stop button in the detection system. Furthermore, considering the different sampling lengths under different conditions, a function to manually set the sampling length has been added to the data acquisition module for ease of use. Each time, four sets of sampling data are acquired from four channels: TR12, TR34, TR14, and TR32. Defect information is contained in one or more sets of data from these four channels.

[0026] 2. Data preprocessing

[0027] To accurately pinpoint the location of defects, the pulse signals from the four channels were divided into five regions from start to finish: nut region, transition region, screw region, threaded region, and bottom wave region. The sampling length percentages for each region were 18.2%, 10.1%, 36.3%, 25.3%, and 10.1%, respectively. With a sampling length of 1304 sampling points, the number of sampling points for each region were 237, 132, 473, 330, and 132, respectively. The detection interface visualized the data from each channel, using different colors to mark different regions.

[0028] 3. Detection Algorithm

[0029] 3.1 Determining the First Peak. All peaks in the sequence are determined by calculating the monotonically decreasing zero point of the first derivative of the pulse sequence. Since the data is discrete, the formula for calculating the first derivative is: Where f(x) represents the x-th sampling point in the discrete sequence, and h represents the step size between sampling points. Pulse sequences exhibit rapid oscillation characteristics, therefore, a single peak cannot be used as the basis for identification and analysis. Thus, the peaks in the sequence should be merged, and a cluster of peaks should be fused into one peak. Specifically, this is achieved by connecting all current peak points to form a new curve, which then merges the cluster of peaks into one peak. It is assumed that the step size between all sampling points on the new curve is consistent, and the first derivative is used again to determine all peaks of the new curve. After determining all peaks, the initial peak and its diffraction peaks generated in the nut area due to ultrasonic incident are deleted. The first peak from left to right in the pulse is the characteristic peak containing defect information. It should be noted that the first peak is not necessarily the highest peak. When defect peaks are detected in all four channels, the peak with the highest intensity is used as the detection standard, and the corresponding channel is marked as the channel where the defect was detected.

[0030] 3.2 Calculating the noise level. The noise level determines whether a peak is a defective peak. The noise level is calculated by taking the standard deviation and mean of the pulse sequence. The formula for calculating the mean is: in Let X1 be the mean of the pulse sequence, and X2 be the mean of the pulse sequence. n This represents the value of the nth sampling point in the pulse sequence. n represents the sampling length. The formula for calculating the standard deviation is: Among them, S x x represents the standard deviation calculated from the pulse sequence. i This represents the value of the i-th sampling point in the pulse sequence. Let represent the mean of the pulse sequence, and n represent the sampling length. The final result can be obtained by iterative calculation based on these two indicators. The specific steps are as follows: First, calculate the mean and standard deviation of the pulse sequence. The initial standard deviation and mean will be large due to the presence of defect peaks, diffraction peaks of defect peaks, bottom wave peaks, and initial peaks in the pulse sequence. Therefore, a screening condition is proposed. This is to identify sampling points that are not noise. S represents the mean of the pulse sequence. x X represents the standard deviation of the pulse sequence. delThe sampling points that meet the deletion criteria are identified by iterating through the pulse sequence. Sampling points meeting these criteria are deleted. This filtering process removes some sampling points with higher pulse intensities, but some with lower diffraction waves remain. Therefore, the filtering process needs to be iterated. After 15 iterations, the standard deviation and mean of the sequence almost stabilize, and the iteration ends. The final mean and standard deviation are calculated and verified using 194 sets of sampled data. The noise level is then set to... It meets the noise level standards for all sampled samples, among which S represents the mean of the pulse sequence. x S represents the standard deviation of the pulse sequence. noise Indicates the noise level.

[0031] 3.3 Determine the signal-to-noise ratio. When the signal-to-noise ratio of the first peak of the pulse sequence is greater than 12, the pulse sequence can be considered to contain a defective signal. The formula for calculating the signal-to-noise ratio is: Δ=20log(H1 / H2), where H1 represents the peak intensity of the first peak determined in 3.1, and H2 represents the noise level value obtained in 3.2.

[0032] 3.4 Determining the Results. After determining the first peak in 3.1, if the signal-to-noise ratio calculated in 3.3 is greater than 12, the pulse sequence is considered to contain a defect signal. Next, the cross-sectional loss of the bolt defect is determined. Taking the core casing of a nuclear power plant as an example, the cross-sectional loss of the bolt defect is detected to be greater than 15%. The main steps are as follows: Several pulse sequences are collected as training samples. The first peak of the defect and the corresponding position information of the defect in the pulse sequence are extracted as features. In addition, the transition area, screw area, and thread area to be detected are quantized into numerical features 0, 1, and 2 as feature values ​​of the training samples, respectively. Since the nut area does not need to be detected and the bottom wave has no corresponding position in the workpiece, these two areas are no longer considered. Finally, since the disappearance of the bottom wave means that there must be a defect, the presence or absence of the bottom wave is requantized. The presence of the bottom wave is quantized as 0, and the absence of the bottom wave is quantized as 1. The quantized data is also used as the features of the training samples. In summary, a total of 4 items are extracted in each pulse sequence sample. Next, a feature-based classification network is constructed. In this invention, a BP neural network with backpropagation of feedforward error is selected as the recognition network. The four extracted features are used as input to the neural network, and the output is either a cross-sectional loss greater than 15% or less than 15%. During the construction of the BP neural network, the number of nodes in each layer is determined using a commonly used neural network node determination method, and the calculation formula is as follows: Where m and n represent the number of hidden layer nodes, and I and O represent the number of input and output layers, respectively. During the forward propagation of the model, the formula for calculating the relationship between the current node and the previous layer node is:

[0033] Where w ij b represents the weight between nodes i and j. j Let x be the threshold for node j. j =f(S) j ) represents the output of each node, where f is the activation function. In this study, the activation function used is ReLU, and its calculation formula is as follows:

[0034]

[0035] BPNN networks have backpropagation capabilities. During backpropagation, the calculation method is as follows, assuming all results from the output layer are d. j Then the error function is:

[0036] Where y j The true result is represented by n, where n is the number of samples.

[0037] After the neural network is trained, in subsequent real-time detection, the trained model can directly detect whether the cross-sectional loss of bolt defects is greater than 15%.

[0038] 4. Detection Interface

[0039] 4.1 Inspection Results Display. In the inspection interface, after inspection is completed, the corresponding inspection results will be displayed below the visualization charts described in the data preprocessing section. These results include defect depth, strength, and whether a defect was detected. A two-dimensional bolt planar view with marked defect locations is also displayed, along with defect peaks marked in the channel diagram where defects were detected. Additionally, a three-dimensional model of the bolt was constructed using Solidworks 3D modeling software, and the OpenGL module in QT was used to display a three-dimensional simulated workpiece with marked defect locations on the inspection system pop-up window. Clicking on the three-dimensional view of the inspection section will display the three-dimensional workpiece information.

[0040] 4.2 Database Connection. This invention uses a MySQL database to create a database for storing historical detection data. After real-time detection data is completed, the data can be named according to rules and stored in the corresponding sub-database within the created database. Additionally, a database visualization and statistics interface is designed within the detection system. By selecting the content, range, and visualization chart type to be statistically analyzed, various situations of the data in the database can be statistically analyzed, such as no defects detected, data in the reactor, etc.

[0041] 4.3 Report Generation. After inspection is complete, the inspection system includes a report export function. The default exported report content includes: inspection text results, channel pulse images corresponding to the defects, position images on the bolts, peak position information corresponding to the defects, and signal-to-noise ratio. Additionally, a function allows users to input other relevant information, such as the inspector, date, and remarks, which are then exported along with the default information as PDF or Word format. In the exported document, each piece of information is stored in a table as a cell.

[0042] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications to the technical solutions described in the foregoing embodiments, or equivalent substitutions for some or all of the technical features, do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A real-time intelligent detection method for bolt defects based on deep learning, characterized in that, Includes the following steps: Step 100, Real-time Data Acquisition and Processing: The ultrasonic flaw detection software connects to the data acquisition module via TCP communication technology to obtain the current sampling data; Step 200, Data Preprocessing: The pulse signal is divided into five regions from start to end by the data preprocessing module: nut region, transition region, screw region, thread region, and bottom wave region. Step 300, detecting the cross-sectional loss of bolt defects using the detection algorithm module, further includes the following sub-steps: Step S301, Determine the first peak: By calculating the monotonically decreasing zero point of the first derivative of the pulse sequence, determine all peaks in the sequence. The formula for calculating the first derivative is: Where f(x) represents the x-th sampling point in the discrete sequence, and h represents the step size between sampling points; the peaks in the sequence are merged, a cluster of peaks is merged to form a single peak, and the first derivative is used to determine all the peaks of the new curve; the nut area is deleted, and the peak with the highest intensity is used as the detection standard, and the corresponding channel is marked as the channel where the defect was detected; Step S302: Calculate the noise level: Calculate the standard deviation and mean of the pulse sequence. The formula for calculating the mean is: in Let X1 be the mean of the pulse sequence, and X2 be the mean of the pulse sequence. n This represents the value of the nth sampling point in the pulse sequence; n represents the sampling length; the formula for calculating the standard deviation is: Among them, S x x represents the standard deviation calculated from the pulse sequence. i This represents the value of the i-th sampling point in the pulse sequence. Let represent the mean of the pulse sequence, and n represent the sampling length. The final result can be obtained by iterative calculation based on these two indicators. The specific steps are: first, calculate the mean and standard deviation of the pulse sequence, and then, through screening conditions... These sampling points are not noise, among which S represents the mean of the pulse sequence. x X represents the standard deviation of the pulse sequence. del This indicates sampling points that meet the deletion criteria. The pulse sequence is iterated through, and sampling points meeting the criteria are deleted. This filtering process is repeated iteratively until the standard deviation and mean of the sequence tend to stabilize. The iteration process ends, and the final mean and standard deviation are calculated. The noise level is then set to... It meets the noise level standards for all sampled samples, among which S represents the mean of the pulse sequence. x S represents the standard deviation of the pulse sequence. noise Indicates noise level; Step S303, determine the signal-to-noise ratio: when the signal-to-noise ratio of the first peak of the pulse sequence is greater than 12, it is determined that the pulse sequence contains a defect signal. The formula for calculating the signal-to-noise ratio is: Δ=20log(H1 / H2), where H1 represents the peak intensity of the first peak and H2 represents the noise level value. Step S304, Determine the result: Determine whether the cross-sectional loss of the bolt defect is greater than 15%. The steps are as follows: Collect several pulse sequences as training samples, and extract the defect first peak and the corresponding position information of the defect in the pulse sequence as features; quantize the transition area, screw area and thread area to be detected into numerical features 0, 1 and 2 as feature values ​​of the training samples; determine whether there is a bottom wave and requantize it. If there is a bottom wave, quantize it as 0, and if there is no bottom wave, quantize it as 1. The quantized data is also used as the features of the training samples; extract 4 items in each pulse sequence sample, and select a BP neural network with feedforward error backpropagation as the recognition network; use the extracted 4 features as the input of the neural network, and output two results: cross-sectional loss greater than 15% and less than 15%.

2. The real-time intelligent detection method for bolt defects based on deep learning according to claim 1, characterized in that, Step 100 further includes setting the sampling length through the data acquisition module. Each time, a total of 4 sets of sampling data from 4 channels are acquired, namely TR12, TR34, TR14 and TR32. The defect information is contained in one or more sets of data from the above four channels.

3. The real-time intelligent detection method for bolt defects based on deep learning according to claim 1, characterized in that, In step 200, the sampling length percentages of the five regions are 18.2%, 10.1%, 36.3%, 25.3%, and 10.1%, respectively.

4. The real-time intelligent detection method for bolt defects based on deep learning according to claim 1, characterized in that, In step S304, during the construction of the BP neural network, the number of nodes in each layer is determined according to a commonly used neural network node determination method. The calculation formula is as follows: Where m and n represent the number of hidden layer nodes, and I and O represent the number of input and output layers, respectively; during the forward propagation of the model, the calculation formula between the current node and the previous layer node is: Where w ij b represents the weight between nodes i and j. j Let x be the threshold for node j. j =f(S) j ) is the output of each node, where f is the activation function, which is ReLU, and its calculation formula is as follows: BPNN networks have backpropagation capabilities. During backpropagation, the calculation method is as follows, with all output layer results represented by d. j Then the error function is: Where y j For the true result, n is the number of samples; After the neural network is trained, in subsequent real-time detection, the trained model can directly detect whether the cross-sectional loss of bolt defects is greater than 15%.

5. The real-time intelligent detection method for bolt defects based on deep learning according to claim 1, characterized in that, The real-time intelligent detection method further includes step 400, which displays the results using a detection interface, specifically including the following sub-steps: Step S401, Detection results display: After the detection is completed, the corresponding detection results are displayed below the visualization chart described in the data preprocessing module, including defect depth, strength, whether a defect was detected, and a two-dimensional bolt plan view with marked defect locations is displayed, as well as defect peaks marked in the channel diagram where defects were detected. A 3D model of the bolt was built using Solidworks 3D modeling software, and the 3D simulated workpiece with marked defect locations was displayed on the pop-up window of the inspection system using the OpenGL module in QT, displaying 3D workpiece information. Step S402, Database Connection: A database for storing historical detection data is created based on a MySQL database. After the real-time detection data is detected, the data can be named according to rules, and the corresponding sub-database can be selected in the created database to complete the storage. Using the database visualization statistics interface, you can collect various statistics on the data in the database by selecting the content, scope, and type of visualization chart to be counted. Step S403, generate report: After the inspection is completed, export the report. The report content includes: inspection text results, channel pulse image corresponding to the defect, position image on the bolt, position information of the peak corresponding to the defect, and signal-to-noise ratio.

6. A real-time intelligent detection system for bolt defects based on deep learning, characterized in that, The real-time intelligent detection system includes: The data acquisition module is connected to the ultrasonic flaw detection software via TCP communication technology to acquire the current sampling data; Data preprocessing module: Connected to the data acquisition module, it is used to divide the pulse signal from start to end into five regions: nut region, transition region, screw region, thread region, and bottom wave region; The detection algorithm module, connected to the data preprocessing module, is used to detect the cross-sectional loss of bolt defects. The specific process is as follows: Determining the first peak: By calculating the monotonically decreasing zero point of the first derivative of the pulse sequence, all peaks in the sequence are determined. The formula for calculating the first derivative is: Where f(x) represents the x-th sampling point in the discrete sequence, and h represents the step size between sampling points; the peaks in the sequence are merged, a cluster of peaks is merged to form a single peak, and the first derivative is used to determine all the peaks of the new curve; the nut area is deleted, and the peak with the highest intensity is used as the detection standard, and the corresponding channel is marked as the channel where the defect was detected; Calculate the noise level: Calculate the standard deviation and mean of the pulse sequence. The formula for calculating the mean is: in Let X1 be the mean of the pulse sequence, and X2 be the mean of the pulse sequence. n This represents the value of the nth sampling point in the pulse sequence; n represents the sampling length; the formula for calculating the standard deviation is: Among them, S x x represents the standard deviation calculated from the pulse sequence. i This represents the value of the i-th sampling point in the pulse sequence. Let represent the mean of the pulse sequence, and n represent the sampling length. The final result can be obtained by iterative calculation based on these two indicators. The specific steps are: first, calculate the mean and standard deviation of the pulse sequence, and then, through screening conditions... These sampling points are not noise, among which S represents the mean of the pulse sequence. x X represents the standard deviation of the pulse sequence. del This indicates sampling points that meet the deletion criteria. The pulse sequence is iterated through, and sampling points meeting the criteria are deleted. This filtering process is repeated iteratively until the standard deviation and mean of the sequence tend to stabilize. The iteration process ends, and the final mean and standard deviation are calculated. The noise level is then set to... It meets the noise level standards for all sampled samples, among which S represents the mean of the pulse sequence. x S represents the standard deviation of the pulse sequence. noise Indicates noise level; Determine the signal-to-noise ratio: When the signal-to-noise ratio of the first peak of the pulse sequence is greater than 12, the pulse sequence is considered to contain a defective signal. The formula for calculating the signal-to-noise ratio is: Δ=20log(H1 / H2), where H1 represents the peak intensity of the first peak and H2 represents the noise level value. Determining the Result: To determine whether the cross-sectional loss of the bolt defect is greater than 15%, the following steps are taken: Collect several pulse sequences as training samples, and extract the defect's initial peak and corresponding location information from the pulse sequences as features; quantize the transition zone, bolt zone, and threaded zone to be detected into numerical features 0, 1, and 2 respectively as feature values ​​for the training samples; determine whether there is a bottom wave and requantize it; if there is a bottom wave, quantize it as 0; if there is no bottom wave, quantize it as 1, and use the quantized data as features for the training samples; extract four items from each pulse sequence sample, and select a BP neural network with feedforward error backpropagation as the recognition network; use the four extracted features as input to the neural network, and output two results: cross-sectional loss greater than 15% and less than 15%.

7. The real-time intelligent bolt defect detection system based on deep learning according to claim 6, characterized in that, By setting the sampling length through the data acquisition module, a total of 4 sets of sampled data from 4 channels are acquired each time. The channels are TR12, TR34, TR14, and TR32. The defect information is contained in one or more sets of data from the above four channels.

8. The real-time intelligent bolt defect detection system based on deep learning according to claim 6, characterized in that, The sampling length percentages for the five regions were 18.2%, 10.1%, 36.3%, 25.3%, and 10.1%, respectively.

9. The real-time intelligent bolt defect detection system based on deep learning according to claim 6, characterized in that, In constructing a BP neural network, the number of nodes in each layer is determined using common neural network node determination methods. The calculation formula is as follows: Where m and n represent the number of hidden layer nodes, and I and O represent the number of input and output layers, respectively; during the forward propagation of the model, the calculation formula between the current node and the previous layer node is: Where w ij b represents the weight between nodes i and j. j Let x be the threshold for node j. j =f(S) j ) is the output of each node, where f is the activation function, which is ReLU, and its calculation formula is as follows: BPNN networks have backpropagation capabilities. During backpropagation, the calculation method is as follows, with all output layer results represented by d. j Then the error function is: Where y j For the true result, n is the number of samples; After the neural network is trained, in subsequent real-time detection, the trained model can directly detect whether the cross-sectional loss of bolt defects is greater than 15%.

10. The real-time intelligent bolt defect detection system based on deep learning according to claim 6, characterized in that, It further includes a detection interface for displaying the results, the specific process of which is as follows: The test results show that after the test is completed, the corresponding test results are displayed below the visualization chart described in the data preprocessing module, including the defect depth, strength, whether the defect was detected, and a two-dimensional bolt plan view with the defect location marked, as well as the defect peak marked in the channel diagram where the defect was detected. A 3D model of the bolt was built using Solidworks 3D modeling software, and the 3D simulated workpiece with marked defect locations was displayed on the pop-up window of the inspection system using the OpenGL module in QT, displaying 3D workpiece information. Database connection: A database for storing historical detection data was created based on a MySQL database. After the real-time detection data is detected, the data can be named according to rules and the corresponding sub-database can be selected in the created database to complete the storage. Using the database visualization statistics interface, you can collect various statistics on the data in the database by selecting the content, scope, and type of visualization chart to be counted. Generate a report: After the inspection is completed, export a report. The report content includes: inspection text results, channel pulse image corresponding to the defect, position image on the bolt, position information of the peak corresponding to the defect, and signal-to-noise ratio.