Defect Detection Method, Device and Electronic Equipment
Through the multi-task learning model, the scanning properties of ultrasonic devices are automatically adjusted, and the defect detection process is optimized, which solves the problem of high cost and low efficiency under manual determination method, and achieves more efficient defect detection.
Patent Information
- Application Number
- CN202510185783.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-02-19
AI Technical Summary
In the prior art, defect detection relies on manual determination of ultrasonic detection schemes, resulting in high labor costs and low efficiency.
The multi-task learning model is used to process the initial scanning information of the ultrasonic device. Through feature extraction and fusion, the ultrasonic scanning attributes are automatically adjusted to optimize defect detection, and the adjusted ultrasonic device is used to scan the target test block.
The automatic determination of ultrasonic detection scheme is realized, which improves the efficiency of defect detection, avoids the problems of high labor costs and low efficiency, and improves the accuracy and efficiency of defect detection.
Smart Images

Figure CN119666986B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of ultrasonic testing, and particularly to a defect detection method, device, and electronic device. Background Art
[0002] Ultrasonic testing is a method for detecting and measuring internal defects of materials or structures using ultrasonic waves. It is an important technology in non-destructive testing and can be widely applied in industries, manufacturing, and medical fields. In practical applications, for a test block to be detected, usually an ultrasonic testing plan suitable for the test block is formulated manually according to the material, shape, etc. of the test block. The ultrasonic testing plan includes, for example, at least ultrasonic scanning parameters for ultrasonic scanning. Then, an ultrasonic device is used to scan the test block based on the above ultrasonic testing plan to obtain ultrasonic scanning information for defect detection of the test block. Here, a test block refers to a standard material block made of the same material and heat treatment process as the workpiece to be measured, which is specially made for the workpiece to be measured. However, the above manual method has problems such as high labor cost and low efficiency. Summary of the Invention
[0003] In view of this, this application provides a defect detection method, device, and electronic device to improve the efficiency of defect detection.
[0004] An embodiment of this application provides a defect detection method, which includes:
[0005] Input the initial ultrasonic scanning information obtained after the target test block is scanned by an ultrasonic device into a trained multi-task learning model. The multi-task learning model includes at least two feature extractors corresponding to different tasks. Different feature extractors correspond to different tasks. Any feature extractor extracts at least one task feature from the initial ultrasonic scanning information based on the prior knowledge of the task corresponding to the feature extractor that has been learned, and selects at least one task feature from the task features extracted by each feature extractor based on a random selection mechanism, so as to use the task features extracted by the feature extractor and the selected task features as the task features output by the feature extractor. The multi-task learning model further includes: a feature fusion device connected to the feature extractors corresponding to each task, and a task prediction network model corresponding to each task connected to the feature fusion device. The feature fusion device is used to fuse the task features output by the feature extractor corresponding to any task to obtain a fusion result, and the task prediction network model corresponding to the task is used to perform task prediction based on the fusion result to obtain the task prediction result corresponding to the task.
[0006] Adjust the attribute value corresponding to at least one ultrasonic scanning attribute in the ultrasonic device according to the task prediction results of each task.
[0007] After the attribute value corresponding to at least one ultrasonic scanning attribute in the ultrasonic device is adjusted, the target ultrasonic scanning information obtained after the target test block is scanned by the ultrasonic device is obtained; the target ultrasonic scanning information is used for defect detection of the target test block.
[0008] An embodiment of the present application further provides a defect detection device, and the device includes:
[0009] An input module, configured to input the initial ultrasonic scanning information obtained after the target test block is scanned by the ultrasonic device into a trained multi-task learning model; wherein, the multi-task learning model includes feature extractors corresponding to at least two tasks; different feature extractors correspond to different tasks; any feature extractor extracts at least one task feature from the initial ultrasonic scanning information based on the prior knowledge of the task corresponding to the feature extractor that has been learned, and selects at least one task feature from the task features extracted by each feature extractor based on a random selection mechanism, so as to use the task features extracted by the feature extractor and the selected task features as the task features output by the feature extractor; the multi-task learning model further includes: a feature fusion device connected to the feature extractors corresponding to each task, and a task prediction network model corresponding to each task connected to the feature fusion device; the feature fusion device is configured to fuse the task features output by the feature extractor corresponding to any task to obtain a fusion result, and the task prediction network model corresponding to the task is configured to perform task prediction based on the fusion result to obtain the task prediction result corresponding to the task;
[0010] An adjustment module, configured to adjust the attribute value corresponding to at least one ultrasonic scanning attribute in the ultrasonic device according to the task prediction results of each task;
[0011] A detection module, configured to obtain the target ultrasonic scanning information obtained after the target test block is scanned by the ultrasonic device after the attribute value corresponding to at least one ultrasonic scanning attribute in the ultrasonic device is adjusted; the target ultrasonic scanning information is used for defect detection of the target test block.
[0012] An embodiment of the present application further provides an electronic device, and the electronic device includes:
[0013] A processor; and
[0014] A computer-readable storage medium, in which computer program instructions are stored, and when the computer program instructions are run by the processor, the processor is caused to execute the steps of the above method.
[0015] An embodiment of the present application further provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are run by the processor, the processor is caused to execute the steps in the above method.
[0016] As can be seen from the above technical solutions, in the embodiments of the present application, the task prediction results of the learned tasks are determined by using the trained multi-task learning model, so as to adjust the attribute values corresponding to at least one ultrasonic scanning attribute in the ultrasonic device according to the task prediction results of each task. Based on this, after scanning the target test block with the ultrasonic device whose attribute values have been adjusted, the target ultrasonic scanning information is used to detect the defects of the target test block. In this way, an ultrasonic detection solution suitable for ultrasonic scanning of the target test block is automatically determined, thereby avoiding problems such as high labor costs and low efficiency caused by the manual determination method, and improving the efficiency of defect detection.
[0017] Further, in the embodiments of the present application, the task features extracted by each feature extractor in the multi-task learning model can be shared, which can avoid overfitting in the learning of a single task. In this embodiment, the features required for the task prediction of each task include: the task features extracted by the feature extractor corresponding to the task based on the prior knowledge of the task, and the task features selected from the task features extracted by each feature extractor based on a random selection mechanism; among them, the task features are extracted based on the prior knowledge of each task, which can extract task features highly relevant to the requirements of the task, thereby improving the accuracy of task prediction; and the task features are selected based on the random selection mechanism, which can enable the model to learn different task features during the task prediction of any task, avoid the model forming an over-reliance on certain task features resulting in overfitting in learning, and thus enhance the robustness and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings here are incorporated into the specification and form a part of this application, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0019] Figure 1 It is a flowchart of the method provided by the embodiments of the present application.
[0020] Figure 2 It is a schematic diagram of the ultrasonic scanning information provided by the embodiments of the present application.
[0021] Figure 3 It is a schematic diagram of the implementation of the multi-task learning model provided by the embodiments of the present application.
[0022] Figure 4 It is a schematic diagram of the implementation of feature extraction provided by the embodiments of the present application.
[0023] Figure 5 It is a schematic diagram of the device structure provided by the embodiments of the present application.
[0024] Figure 6 It is a schematic diagram of the electronic device structure provided by the embodiments of the present application. Detailed implementation manners
[0025] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application and make the above-mentioned objects, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0026] See Figure 1 , Figure 1 which is a flowchart of the method provided in the embodiments of the present application. This method is applied to an electronic device. As an embodiment, the electronic device here can be, for example, an ultrasonic device or other devices communicatively connected to the ultrasonic device, and the present embodiment does not specifically limit this. Among them, an ultrasonic device refers to a device used for ultrasonic detection, such as an ultrasonic flaw detector, etc., which is not specifically limited here.
[0027] As Figure 1 shown, the process may include the following steps:
[0028] Step 101: Input the initial ultrasonic scan information obtained after the target test block is scanned by the ultrasonic device into the trained multi-task learning model; where the multi-task learning model includes at least two feature extractors corresponding to different tasks; different feature extractors correspond to different tasks; any feature extractor extracts at least one task feature from the initial ultrasonic scan information based on the prior knowledge of the task corresponding to the feature extractor that has been learned, and selects at least one task feature from the task features extracted by each feature extractor based on a random selection mechanism, so as to use the task features extracted by the feature extractor and the selected task features as the task features output by the feature extractor; the multi-task learning model further includes: a feature fusion device connected to the feature extractor corresponding to each task, and a task prediction network model corresponding to each task connected to the feature fusion device; the feature fusion device is used to fuse the task features output by the feature extractor corresponding to any task to obtain a fusion result, and the task prediction network model corresponding to the task is used to perform task prediction based on the fusion result to obtain the task prediction result corresponding to the task.
[0029] In this embodiment, the target test block may refer to a test block to be defect-detected. As an embodiment, the initial ultrasonic scan information obtained after the target test block is scanned by the ultrasonic device may include: the echo signals at each detection position on the target test block. Among them, the detection position may refer to the position detected by the ultrasonic probe of the ultrasonic device. The echo signal may refer to the signal that is reflected back to the ultrasonic probe when the ultrasonic wave emitted by the ultrasonic probe in the ultrasonic device encounters an object interface (such as an interface on the outer surface of an object, and an interface where an internal defect of an object is located, etc.).
[0030] For example, see Figure 2The schematic diagram of ultrasonic scanning information shown, which is obtained by scanning a test block immersed in water with an ultrasonic device; for example, the ultrasonic scanning information may include the echo signal of the bottom interface of the water tank (i.e., the bottom echo of the water tank in Figure 2 , the echo signal of the interface on the test block in contact with the ultrasonic probe (i.e., the upper surface echo of the test block in Figure 2 ), etc. Here, no further examples will be given one by one.
[0031] In this embodiment, after obtaining the initial ultrasonic scanning information obtained by scanning the target test block with the ultrasonic device, the initial ultrasonic scanning information is input into a trained multi-task learning model.
[0032] Here, for each task learned in the multi-task learning model, first, the task feature extractor corresponding to the task in the multi-task learning model extracts at least one task feature from the initial ultrasonic scanning information based on the prior knowledge of the task, and selects at least one task feature from the task features extracted by each feature extractor based on a random selection mechanism, so as to use the task features extracted by the feature extractor and the selected task features as the task features output by the feature extractor corresponding to the task; then, the feature fusion device in the multi-task learning model fuses the task features output by the feature extractor corresponding to the task to obtain a fusion result; finally, the task prediction network model corresponding to the task in the multi-task learning model performs task prediction on the fusion result to obtain the task prediction result corresponding to the task. In this way, the task prediction results of each task in the multi-task learning model are obtained.
[0033] In this embodiment, as an example, to improve the performance of task prediction, a task prediction network model suitable for the task can be determined based on the task characteristics of each task in the multi-task learning model.
[0034] As for the various tasks included in the multi-task learning model in this step, how to specifically extract at least one task feature from the initial ultrasonic scanning information based on the prior knowledge of the task corresponding to the feature extractor, and how to specifically determine a task prediction network model suitable for the task based on the task characteristics of each task, examples will be described below and will not be elaborated here.
[0035] Step 102, adjust the attribute values corresponding to at least one ultrasonic scanning attribute in the ultrasonic device according to the task prediction results of each task.
[0036] In this embodiment, the ultrasonic scanning attributes can be understood as the parameters associated with ultrasonic scanning in an ultrasonic device; correspondingly, the attribute values of the ultrasonic scanning attributes can be understood as parameter values. For example, as an embodiment, the at least one ultrasonic scanning attribute may include, but is not limited to, a focusing parameter, an ultrasonic scanning frequency band, and an ultrasonic scanning path, etc. Among them, the focusing parameter may refer to the focusing parameter in the focusing method; for example, the focusing parameter may include the signal emission time and signal emission angle of at least one ultrasonic signal transmitter in the ultrasonic device, and this embodiment does not specifically limit it. The ultrasonic scanning frequency band may refer to the frequency range of the ultrasonic signal used for ultrasonic scanning. The ultrasonic scanning path may refer to the path of ultrasonic scanning.
[0037] In this embodiment, as an embodiment, the tasks associated with different ultrasonic scanning attributes are also different. Based on this, for each ultrasonic scanning attribute, when adjusting the attribute value corresponding to the ultrasonic scanning attribute according to the task prediction results of each task, the attribute value corresponding to the ultrasonic scanning attribute can be adjusted based on the task prediction results of the tasks associated with the ultrasonic scanning attribute. As for how to specifically adjust the attribute values corresponding to at least one ultrasonic scanning attribute in the ultrasonic device according to the task prediction results of each task, it will be described by way of example below and will not be elaborated here for the time being.
[0038] Step 103, after the attribute values corresponding to at least one ultrasonic scanning attribute in the ultrasonic device are completed being adjusted, obtain the target ultrasonic scanning information obtained after the target test block is scanned by the ultrasonic device; the target ultrasonic scanning information is used for defect detection of the target test block.
[0039] In this embodiment, after the attribute values corresponding to at least one ultrasonic scanning attribute in the ultrasonic device are completed being adjusted, compared with the initial setting of the attribute values of each ultrasonic scanning attribute of the ultrasonic device, the current setting of the attribute values of each ultrasonic scanning attribute of the ultrasonic device is more suitable for ultrasonic scanning of the target test block. That is to say, the target ultrasonic scanning information obtained after the target test block is scanned by the ultrasonic device at this time is more accurate and comprehensive than the above-mentioned initial ultrasonic scanning information; based on this, using the target ultrasonic scanning information for defect detection of the target test block can effectively improve the accuracy of defect detection.
[0040] In this embodiment, there is no specific limitation on how to perform defect detection of the target test block based on the target ultrasonic scanning information; for example, as an embodiment, a pre-trained defect detection model can be used to perform defect detection on the target ultrasonic scanning information to obtain the defect detection result of the target test block.
[0041] So far, the Figure 1 shown process is completed.
[0042] Through Figure 1As can be seen from the shown process, in the embodiment of the present application, the task prediction results of the learned tasks are determined by using the trained multi-task learning model, so as to adjust the attribute values corresponding to at least one ultrasonic scanning attribute in the ultrasonic device according to the task prediction results of each task. Based on this, after scanning the target test block with the ultrasonic device whose attribute values have been adjusted, the target ultrasonic scanning information is obtained to detect the defects of the target test block. In this way, an ultrasonic detection scheme suitable for ultrasonic scanning of the target test block is automatically determined, thus avoiding problems such as high labor cost and low efficiency caused by the manual determination method, and improving the efficiency of defect detection.
[0043] Further, in the embodiment of the present application, the task features extracted by each feature extractor in the multi-task learning model can be shared, which can avoid overfitting in the learning of a single task. In this embodiment, the features required for the task prediction of each task include: the task features extracted by the feature extractor corresponding to the task based on the prior knowledge of the task, and the task features selected from the task features extracted by each feature extractor based on a random selection mechanism; among them, the task features are extracted based on the prior knowledge of each task, which can extract task features highly relevant to the requirements of the task, thereby improving the accuracy of task prediction; and the task features are selected based on the random selection mechanism, which can enable the model to learn different task features during the task prediction of any task, avoid the model forming an excessive dependence on certain task features to cause the situation of learning overfitting, and thus enhance the robustness and generalization ability of the model.
[0044] Next, an example description of the tasks included in the multi-task learning model in step 101 above will be given first:
[0045] In this embodiment, as an example, at least two tasks included in the multi-task learning model may include: a first task, which is an abnormal area prediction task for the target test block; and / or, a second task, which is a method type prediction task for the focusing method; and / or, a third task, which is a material type prediction task for the target test block; and / or, a fourth task, which is a geometric shape prediction task for the target test block. It should be noted that this is only an example description of the tasks included in the multi-task learning model, and the tasks included in the multi-task learning model can be flexibly set according to actual application requirements, and this embodiment does not specifically limit.
[0046] Among them, the abnormal area of the target test block may refer to the area on the target test block that is different from the expected normal structure; for example, it may include the area on the target test block that cannot be scanned due to physical characteristics (such as shape, thickness, defect, etc.), and the area with defects, etc., and this is not specifically limited here.
[0047] The above focusing method may refer to a method for controlling the focus of an ultrasonic probe in an ultrasonic device; for example, the focusing method may include a phased array ultrasonic testing (PAUT) method, a total focusing method (TFM), a plane wave imaging (PWI) method, a virtual source imaging (VSI) method, etc., and this embodiment does not specifically limit it.
[0048] The material type of the above target test block may refer to the material category of the target test block; such as metal and plastic, etc. The geometric shape of the above target test block may refer to the external structure of the target test block; such as a cuboid, a cylinder, a cube, etc.
[0049] Based on the above description, the following describes adjusting the attribute value corresponding to at least one ultrasonic scanning attribute in the ultrasonic device according to the task prediction results of each task in step 102 above:
[0050] In this embodiment, as an example, in this step, adjusting the attribute value corresponding to at least one ultrasonic scanning attribute in the ultrasonic device according to the task prediction results of each task may specifically include, for example:
[0051] If the ultrasonic scanning attribute is a focusing parameter, the focusing parameter is related to the task prediction of the method type of the focusing method and the task prediction of the material type of the target test block; based on this, the task prediction results of the task prediction of the method type of the focusing method and the task prediction of the material type of the target test block may be calculated first according to a first specified calculation method to obtain a first calculation result. It can be understood that the first calculation result may include the attribute value corresponding to the calculated focusing parameter; then, based on the first calculation result, the attribute value corresponding to the focusing parameter in the ultrasonic device is adjusted, such as updating the attribute value corresponding to the focusing parameter in the ultrasonic device to the attribute value included in the first calculation result.
[0052] If the ultrasonic scanning attribute is an ultrasonic scanning frequency band, the ultrasonic scanning frequency band is related to the task prediction of the abnormal area of the target test block; based on this, the task prediction result of the task prediction of the abnormal area of the target test block may be calculated first according to a second specified calculation method to obtain a second calculation result. It can be understood that the second calculation result may include the attribute value corresponding to the calculated ultrasonic scanning frequency band; then, based on the second calculation result, the attribute value corresponding to the ultrasonic scanning frequency band in the ultrasonic device is adjusted, such as updating the attribute value corresponding to the ultrasonic scanning frequency band in the ultrasonic device to the attribute value included in the second calculation result.
[0053] If the ultrasonic scanning attribute is the ultrasonic scanning path, the ultrasonic scanning path is related to the abnormal area prediction task of the target test block, the method type prediction task of the focusing method, and the geometric shape prediction task of the target test block; based on this, the task prediction results of the abnormal area prediction task of the target test block, the task prediction results of the method type prediction task of the focusing method, and the task prediction results of the geometric shape prediction task of the target test block can be calculated first according to the third specified calculation method to obtain the third calculation result. It can be understood that the third calculation result may include the attribute value corresponding to the calculated ultrasonic scanning path, and the attribute value corresponding to the ultrasonic scanning path in the ultrasonic device can be adjusted based on the third calculation result, such as updating the attribute value corresponding to the ultrasonic scanning path in the ultrasonic device to the attribute value included in the third calculation result.
[0054] As for the above-mentioned first specified calculation method, second specified calculation method, and third specified calculation method, they can be flexibly set based on actual application requirements, and this embodiment does not specifically limit them. For example, the above-mentioned first specified calculation method, second specified calculation method, and third specified calculation method can be the same, such as a pre-trained attribute value prediction model; or, the above-mentioned first specified calculation method, second specified calculation method, and third specified calculation method can be different, such as each specified calculation method can be a pre-set trigonometric function calculation formula.
[0055] So far, the description of adjusting the attribute value corresponding to at least one ultrasonic scanning attribute in the ultrasonic device according to the task prediction results of each task in step 102 above is completed.
[0056] Next, a description will be given of how to specifically extract at least one task feature from the initial ultrasonic scanning information based on the prior knowledge of the task corresponding to the feature extractor learned above in step 101:
[0057] In this embodiment, the prior knowledge of any learned task in the multi-task learning model is used to indicate the task features required for the prediction of this task. As an embodiment, the prior knowledge of different tasks can be the same or different, and this embodiment does not specifically limit them, and they can be flexibly set based on actual application requirements.
[0058] Based on this, assuming that one of the tasks included in the above multi-task learning model is the abnormal area prediction task of the target test block, in this embodiment, the prior knowledge of this task at least indicates the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block. Here, the first interface refers to the interface where the target test block contacts the ultrasonic probe of the ultrasonic device; the second interface refers to the interface on the target test block that is opposite to the first interface and is the farthest from the ultrasonic probe. Based on this, at least one task feature is extracted from the initial ultrasonic scan information based on the prior knowledge of this task. In specific implementation, for example, it may include: extracting the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block from the initial ultrasonic scan information based on the prior knowledge of this task as the extracted task features. As for whether to use the time-domain features (such as the moment of the echo, etc.) or frequency-domain features (such as the signal frequency of the echo signal, etc.) in the echo signal, this embodiment does not specifically limit.
[0059] Assuming that one of the tasks included in the above multi-task learning model is the method type prediction task of the focusing method, in this embodiment, the prior knowledge of this task at least indicates the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block and the ultrasonic field information formed during the transmission of the ultrasonic wave emitted by the ultrasonic probe. Based on this, for the method type prediction task of the focusing method, at least one task feature is extracted from the initial ultrasonic scan information based on the prior knowledge of this task. In specific implementation, for example, it may include: extracting the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block and the ultrasonic field information formed during the transmission of the ultrasonic wave emitted by the ultrasonic probe from the initial ultrasonic scan information based on the prior knowledge of this task as the extracted task features.
[0060] Assuming that one of the tasks included in the above multi-task learning model is the material type prediction task of the target test block, in this embodiment, the prior knowledge of this task at least indicates the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block. Based on this, at least one task feature is extracted from the initial ultrasonic scan information based on the prior knowledge of this task. In specific implementation, for example, it may include: for the material type prediction task of the target test block, extracting the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block from the initial ultrasonic scan information based on the prior knowledge of this task as the extracted task features. As for whether to use the time-domain features (such as the moment of the echo, etc.) or frequency-domain features (such as the signal frequency of the echo signal, etc.) in the echo signal, this embodiment does not specifically limit.
[0061] Assume that one of the tasks included in the above multi-task learning model is the geometric shape prediction task of the target test block. In this embodiment, the prior knowledge of this task at least indicates the echo signal of the first interface of the target test block and the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block. Based on this, at least one task feature is extracted from the initial ultrasonic scan information based on the prior knowledge of this task. In specific implementation, for example, it may include: for the geometric shape prediction task of the target test block, the echo signal of the first interface of the target test block and the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block are extracted from the initial ultrasonic scan information as the extracted task features.
[0062] The following describes how to determine the task prediction network model applicable to each task based on the task characteristics of each task:
[0063] In this embodiment, as an example, for the abnormal area prediction task of the target test block, since predicting the abnormal area involves boundary box detection of the area, etc., the task prediction network model corresponding to this task can be a network model applicable to object detection such as U-Net (U-Net), Faster Region-based Convolutional Neural Network (Faster R-CNN), etc.
[0064] And so on, for the method type prediction task of the focusing method, this task involves the selection and classification of various types of focusing methods. Therefore, the task prediction network model corresponding to this task can be a network model applicable to classification such as Fully Connected Neural Networks (FCN), Convolutional Neural Networks (CNN), etc.
[0065] For the material type prediction task of the target test block, similar to the above method type prediction task of the focusing method, this task also involves the selection and classification of material types. Therefore, the task prediction network model corresponding to this task can be a network model applicable to classification such as FCN, CNN, etc.
[0066] For the geometric shape prediction task of the target test block, similar to the above abnormal area prediction task of the target test block, this task also involves boundary box detection, etc. Therefore, the task prediction network model corresponding to this task can be a network model applicable to object detection such as U-Net, Faster R-CNN, etc.
[0067] To facilitate understanding of the specific implementation process of the above defect detection method, the following is combined with Figure 3An example description of the specific implementation process of this defect detection method is as follows:
[0068] Refer to Figure 3 the schematic diagram of the implementation of the multi-task learning model shown in the figure. Assume that the multi-task learning model includes 4 tasks, as Figure 3 shown in the figure. These 4 tasks are namely the first task, the second task, the third task, and the fourth task. The corresponding feature extractors 301 are feature extractor A, feature extractor B, feature extractor C, and feature extractor D respectively; the feature fusion device 302 connected to each feature extractor; and, the task prediction network models 303 corresponding to the first task, the second task, the third task, and the fourth task are task prediction network model A, task prediction network model B, task prediction network model C, and task prediction network model D respectively.
[0069] Based on the above description, as an embodiment, the specific implementation process of the above defect detection method is as follows:
[0070] First, use an ultrasonic scanning device to perform ultrasonic scanning on the target test block to obtain the initial ultrasonic scanning information of the target test block.
[0071] In this embodiment, the scanning and display methods adopted by the ultrasonic scanning device may include but are not limited to: A-scan, B-scan, etc. Here, A-scan may refer to point scanning, and the obtained ultrasonic scanning information is displayed in the form of a waveform signal; B-scan may refer to line scanning, and the obtained ultrasonic scanning information is displayed in the form of a two-dimensional image.
[0072] Then, input the above initial ultrasonic scanning information into the trained multi-task learning model, so that the feature extractor corresponding to each task in the multi-task learning model outputs the task feature corresponding to the task based on the initial ultrasonic scanning information. The feature fusion device in the multi-task learning model performs feature fusion on the task feature corresponding to the task to obtain a fusion result, and the task prediction network model corresponding to the task performs task prediction based on the fusion result to obtain the task prediction result corresponding to the task.
[0073] In this embodiment, as an example, as Figure 4As shown in the figure, for each task, through the feature extractor 401 corresponding to the task, at least one task feature is first extracted from the initial ultrasonic scan information based on the prior knowledge of the task; then, since the multi-task learning model follows the parameter sharing mechanism, at least one task feature can be selected from the task features extracted by each feature extractor (i.e., feature extractor A, feature extractor B, feature extractor C, and feature extractor D) based on the random selection mechanism; finally, the task features extracted by the feature extractor 401 corresponding to the task and the selected task features (such as task feature 1,..., task feature n, where n is greater than 1) are used as the task features output by the feature extractor 401 corresponding to the task, and the task features output by the feature extractor 401 corresponding to the task are input to the feature fuser 402 to obtain the corresponding fusion result.
[0074] After that, according to the task prediction results of the above tasks, the attribute values corresponding to at least one ultrasonic scan attribute in the ultrasonic device are adjusted.
[0075] Finally, after the attribute values corresponding to at least one ultrasonic scan attribute in the ultrasonic device are adjusted, the target ultrasonic scan information obtained after the target test block is scanned by the ultrasonic device is obtained for defect detection of the target test block.
[0076] So far, the description of the method provided by the embodiments of this application is completed. Next, the device provided by the embodiments of this application will be described:
[0077] See Figure 5 , Figure 5 which is a schematic structural diagram of a defect detection device provided by the embodiments of this application. As Figure 5 shown, the device 500 includes an input module 501, an adjustment module 502, and a detection module 503;
[0078] Among them, the input module 501 is used to input the initial ultrasonic scan information obtained after the target test block is scanned by the ultrasonic device into the trained multi-task learning model. The multi-task learning model includes at least two feature extractors corresponding to different tasks respectively. Different feature extractors correspond to different tasks. Any feature extractor extracts at least one task feature from the initial ultrasonic scan information based on the prior knowledge of the task corresponding to the feature extractor that has been learned, and selects at least one task feature from the task features extracted by each feature extractor based on a random selection mechanism, so as to use the task features extracted by the feature extractor and the selected task features as the task features output by the feature extractor. The multi-task learning model further includes: a feature fusion device connected to the feature extractors corresponding to each task, and a task prediction network model corresponding to each task connected to the feature fusion device. The feature fusion device is used to fuse the task features output by the feature extractor corresponding to any task to obtain a fusion result, and the task prediction network model corresponding to the task is used to perform task prediction based on the fusion result to obtain the task prediction result corresponding to the task.
[0079] The adjustment module 502 is used to adjust the attribute values corresponding to at least one ultrasonic scan attribute in the ultrasonic device according to the task prediction results of each task.
[0080] The detection module 503 is used to obtain the target ultrasonic scan information obtained after the target test block is scanned by the ultrasonic device after the attribute values corresponding to at least one ultrasonic scan attribute in the ultrasonic device are adjusted. The target ultrasonic scan information is used for defect detection of the target test block.
[0081] As an embodiment, at least two tasks at least include a first task, and the first task is: the abnormal area prediction task of the target test block.
[0082] The prior knowledge of the first task at least indicates the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block. Among them, the first interface refers to the interface where the target test block contacts the ultrasonic probe of the ultrasonic device; the second interface refers to the interface on the target test block that is opposite to the first interface and is the farthest from the ultrasonic probe.
[0083] As an embodiment, at least two tasks further include a second task, and the second task is: the method type prediction task of the focusing method. The focusing method refers to the method used to control the focus of the ultrasonic probe in the ultrasonic device.
[0084] The prior knowledge of the second task at least indicates the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block and the ultrasonic field information formed during the transmission of the ultrasonic wave emitted by the ultrasonic probe.
[0085] And / or
[0086] The at least two tasks further include a third task, which is: a task of predicting the material type of the target test block;
[0087] The prior knowledge of the third task indicates at least the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block;
[0088] and / or
[0089] The at least two tasks further include a fourth task, which is: a task of predicting the geometric shape of the target test block;
[0090] The prior knowledge of the fourth task indicates at least the echo signal of the first interface of the target test block and the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block.
[0091] As an embodiment, at least one ultrasonic scanning attribute includes at least a focusing parameter;
[0092] Adjusting the attribute value corresponding to the focusing parameter in the ultrasonic device according to the task prediction results of each task includes: calculating according to a first specified calculation method the task prediction results of the task of predicting the method type of the focusing method and the task of predicting the material type of the target test block to obtain a first calculation result, and adjusting the attribute value corresponding to the focusing parameter in the ultrasonic device based on the first calculation result.
[0093] As an embodiment, at least one ultrasonic scanning attribute further includes an ultrasonic scanning frequency band;
[0094] Adjusting the attribute value corresponding to the ultrasonic scanning frequency band in the ultrasonic device according to the task prediction results of each task includes: calculating according to a second specified calculation method the task prediction results of the task of predicting the abnormal area of the target test block respectively to obtain a second calculation result, and adjusting the attribute value corresponding to the ultrasonic scanning frequency band in the ultrasonic device based on the second calculation result.
[0095] As an embodiment, at least one ultrasonic scanning attribute further includes an ultrasonic scanning path;
[0096] Adjusting the attribute value corresponding to the ultrasonic scanning path in the ultrasonic device according to the task prediction results of each task includes: calculating according to a third specified calculation method the task prediction results of the task of predicting the abnormal area of the target test block, the task prediction results of the task of predicting the method type of the focusing method, and the task prediction results of the task of predicting the geometric shape of the target test block to obtain a third calculation result, and adjusting the attribute value corresponding to the ultrasonic scanning path in the ultrasonic device based on the third calculation result.
[0097] Thus far, the structure description of the Figure 5 shown device is completed.
[0098] For the implementation processes of the functions and roles of each module in the above device, please refer to the implementation processes of the corresponding steps in the above method for details, which will not be elaborated here.
[0099] For the device embodiments, since they basically correspond to the method embodiments, relevant parts can refer to the partial descriptions of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0100] Please refer to Figure 6 , which is a schematic diagram of the hardware structure of an electronic device provided by an exemplary embodiment of this application. The electronic device may include a processor 601, a communication interface 602, a computer-readable storage medium 603, and a communication bus 604. The processor 601, the communication interface 602, and the computer-readable storage medium 603 complete communication with each other through the communication bus 604. Among them, computer program instructions are stored on the computer-readable storage medium 603; the processor 601 can execute the steps of the method described in the above embodiments by executing the computer program instructions stored on the computer-readable storage medium 603. According to the actual functions of the electronic device, the electronic device may further include other hardware, which will not be elaborated here.
[0101] Correspondingly, an embodiment of this application also provides a computer-readable storage medium, on which several computer program instructions are stored. When the computer program instructions are executed by a processor, the methods disclosed in the above examples of this application can be implemented.
[0102] Exemplarily, the above computer-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the computer-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or a combination thereof. The processor and the memory can be supplemented by or incorporated into dedicated logic circuits.
[0103] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the scope of protection of the present application.
Claims
1. A defect detection method, characterized in that, The method includes: Inputting the initial ultrasonic scan information obtained after the target test block is scanned by an ultrasonic device into a trained multi-task learning model; wherein, the multi-task learning model includes feature extractors corresponding to at least two tasks respectively; different feature extractors correspond to different tasks; any feature extractor extracts at least one task feature from the initial ultrasonic scan information based on the prior knowledge of the task corresponding to the feature extractor that has been learned, and selects at least one task feature from the task features extracted by each feature extractor based on a random selection mechanism, so as to use the task features extracted by the feature extractor and the selected task features as the task features output by the feature extractor; the prior knowledge of each task is used to assist in extracting task features highly relevant to the requirements of the task; the multi-task learning model further includes: a feature fusion device connected to the feature extractors corresponding to each task, and a task prediction network model corresponding to each task connected to the feature fusion device; the feature fusion device is used to fuse the task features output by the feature extractor corresponding to any task to obtain a fusion result, and the task prediction network model corresponding to this task is used to perform task prediction based on this fusion result to obtain the task prediction result corresponding to this task; Adjusting the attribute value corresponding to at least one ultrasonic scan attribute in the ultrasonic device according to the task prediction results of each task; the ultrasonic scan attribute is a parameter associated with ultrasonic scanning in the ultrasonic device; After the attribute value corresponding to at least one ultrasonic scan attribute in the ultrasonic device is adjusted, obtaining the target ultrasonic scan information obtained after the target test block is scanned by the ultrasonic device; the target ultrasonic scan information is used for defect detection of the target test block; compared with the attribute values of each ultrasonic scan attribute of the ultrasonic device at the initial time, the adjusted attribute values of each ultrasonic scan attribute are more suitable for ultrasonic scanning of the target test block.
2. The method according to claim 1, wherein The at least two tasks at least include a first task, and the first task is: the task of predicting the abnormal area of the target test block; The prior knowledge of the first task at least indicates the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block; wherein, the first interface refers to the interface where the target test block contacts the ultrasonic probe of the ultrasonic device; the second interface refers to the interface on the target test block that is opposite to the first interface and is the farthest from the ultrasonic probe.
3. The method according to claim 1 or 2, wherein The at least two tasks further include a second task, and the second task is: the task of predicting the method type of the focusing method; the focusing method refers to the method for controlling the focus of the ultrasonic probe in the ultrasonic device; The prior knowledge of the second task at least indicates the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block and the ultrasonic field information formed during the transmission of the ultrasonic wave emitted by the ultrasonic probe; and / or The at least two tasks further include a third task, which is: the task of predicting the material type of the target test block; The prior knowledge of the third task at least indicates the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block; and / or, The at least two tasks further include a fourth task, which is: the task of predicting the geometric shape of the target test block; The prior knowledge of the fourth task at least indicates the echo signal of the first interface of the target test block and the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block.
4. The method according to claim 1, wherein The at least one ultrasonic scanning attribute at least includes a focusing parameter; Adjusting the attribute value corresponding to the focusing parameter in the ultrasonic device according to the task prediction results of each task includes: calculating the task prediction results of the task of predicting the method type of the focusing method and the task of predicting the material type of the target test block according to a first specified calculation method to obtain a first calculation result, and adjusting the attribute value corresponding to the focusing parameter in the ultrasonic device based on the first calculation result.
5. The method according to claim 1 or 4, characterized in that, The at least one ultrasonic scanning attribute further includes an ultrasonic scanning frequency band; Adjusting the attribute value corresponding to the ultrasonic scanning frequency band in the ultrasonic device according to the task prediction results of each task includes: calculating the task prediction results of the task of predicting the abnormal area of the target test block respectively according to a second specified calculation method to obtain a second calculation result, and adjusting the attribute value corresponding to the ultrasonic scanning frequency band in the ultrasonic device based on the second calculation result.
6. The method according to claim 1 or 4, characterized in that The at least one ultrasonic scanning attribute further includes an ultrasonic scanning path; Adjusting the attribute value corresponding to the ultrasonic scanning path in the ultrasonic device according to the task prediction results of each task includes: calculating the task prediction results of the task of predicting the abnormal area of the target test block, the task prediction results of the task of predicting the method type of the focusing method, and the task prediction results of the task of predicting the geometric shape of the target test block according to a third specified calculation method to obtain a third calculation result, and adjusting the attribute value corresponding to the ultrasonic scanning path in the ultrasonic device based on the third calculation result.
7. A defect detection device, characterized in that, The device includes: An input module for inputting initial ultrasonic scan information obtained after a target test block is scanned by an ultrasonic device into a trained multi-task learning model; wherein the multi-task learning model includes feature extractors corresponding to at least two tasks respectively; different feature extractors correspond to different tasks; any one feature extractor extracts at least one task feature from the initial ultrasonic scan information based on the prior knowledge of the task corresponding to this feature extractor that has been learned, and selects at least one task feature from the task features extracted by each feature extractor based on a random selection mechanism, so as to use the task features extracted by this feature extractor and the selected task features as the task features output by this feature extractor; the prior knowledge of each task is used to assist in extracting task features highly relevant to the requirements of this task; the multi-task learning model further includes: a feature fusion device connected to the feature extractors corresponding to each task, and a task prediction network model corresponding to each task connected to the feature fusion device; the feature fusion device is used to fuse the task features output by the feature extractor corresponding to any one task to obtain a fusion result, and the task prediction network model corresponding to this task is used to perform task prediction based on this fusion result to obtain the task prediction result corresponding to this task; An adjustment module for adjusting the attribute value corresponding to at least one ultrasonic scan attribute in the ultrasonic device according to the task prediction results of each task; the ultrasonic scan attribute is a parameter associated with ultrasonic scanning in the ultrasonic device; A detection module for obtaining target ultrasonic scan information obtained after the target test block is scanned by the ultrasonic device after the attribute value corresponding to at least one ultrasonic scan attribute in the ultrasonic device is adjusted; the target ultrasonic scan information is used for defect detection of the target test block; compared with the attribute values of each ultrasonic scan attribute of the ultrasonic device initially, the adjusted attribute values of each ultrasonic scan attribute are more suitable for ultrasonic scanning of the target test block.
8. The device according to claim 7, wherein, The at least two tasks at least include a first task, and the first task is: the abnormal area prediction task of the target test block; the prior knowledge of the first task at least indicates the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block; wherein, the first interface refers to the interface where the target test block contacts the ultrasonic probe of the ultrasonic device; the second interface refers to the interface on the target test block that is opposite to the first interface and is the farthest from the ultrasonic probe; and / or, The at least two tasks further include a second task, and the second task is: the method type prediction task of the focusing method; the focusing method refers to the method for controlling the focus of the ultrasonic probe in the ultrasonic device; the prior knowledge of the second task at least indicates the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block and the ultrasonic field information formed during the transmission of the ultrasonic wave emitted by the ultrasonic probe; and / or, The at least two tasks further include a third task, which is: the task of predicting the material type of the target test block; the prior knowledge of the third task at least indicates the echo signal of the first interface of the target test block and the echo signal of the second interface of the target test block; and / or, The at least two tasks further include a fourth task, which is: the task of predicting the geometric shape of the target test block; the prior knowledge of the fourth task at least indicates the echo signal of the first interface of the target test block and the propagation speed of the ultrasonic wave emitted by the ultrasonic probe in the target test block; and / or, The at least one ultrasonic scanning attribute at least includes a focusing parameter; Adjusting the attribute value corresponding to the focusing parameter in the ultrasonic device according to the task prediction results of each task includes: calculating according to a first specified calculation method the task prediction results of the task of predicting the method type of the focusing method and the task of predicting the material type of the target test block to obtain a first calculation result, and adjusting the attribute value corresponding to the focusing parameter in the ultrasonic device based on the first calculation result; and / or, The at least one ultrasonic scanning attribute further includes an ultrasonic scanning frequency band; Adjusting the attribute value corresponding to the ultrasonic scanning frequency band in the ultrasonic device according to the task prediction results of each task includes: calculating according to a second specified calculation method the task prediction results of the task of predicting the abnormal area of the target test block respectively to obtain a second calculation result, and adjusting the attribute value corresponding to the ultrasonic scanning frequency band in the ultrasonic device based on the second calculation result; and / or, The at least one ultrasonic scanning attribute further includes an ultrasonic scanning path; Adjusting the attribute value corresponding to the ultrasonic scanning path in the ultrasonic device according to the task prediction results of each task includes: calculating according to a third specified calculation method the task prediction results of the task of predicting the abnormal area of the target test block, the task prediction results of the task of predicting the method type of the focusing method, and the task prediction results of the task of predicting the geometric shape of the target test block to obtain a third calculation result, and adjusting the attribute value corresponding to the ultrasonic scanning path in the ultrasonic device based on the third calculation result.
9. An electronic device, characterized in that, The electronic device includes: a processor; and a computer-readable storage medium, in which computer program instructions are stored, and when the computer program instructions are run by the processor, the processor executes the steps in any one of claims 1 to 6 of the method.
10. A computer-readable storage medium, characterized in that, Computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are run by the processor, the processor executes the steps in any one of the methods of claims 1 to 6.
Citation Information
Patent Citations
Method for processing multiple tasks, related apparatus and computer program product
CN113378855A
Structural damage detection system based on asymmetric multi-task learning
CN119150140A