Ultrasonic prediction network training method, grain size ultrasonic prediction method and device
By improving the virtual sample generation of GAN and introducing a quality prediction mechanism, the problems of sample scarcity and imbalance in the ultrasonic prediction model of grain size of high-temperature alloys are solved by screening, expanding and balancing the sample set, and more accurate grain size prediction is achieved.
Patent Information
- Application Number
- CN202410888383.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-07-04
AI Technical Summary
In existing technologies, ultrasonic prediction models for high-temperature alloy grain size suffer from poor prediction performance and cannot accurately predict grain size due to the scarcity and uneven distribution of sample numbers.
An improved generative adversarial network (GAN) is used to generate virtual samples. A quality prediction mechanism is introduced to screen samples, expand the sample set size and improve sample quality. The screening mechanism ensures the balanced distribution of samples. Virtual ultrasound feature parameters are generated using a generator and a discriminator, and samples are screened by the difference between virtual error and real error.
The prediction accuracy of the ultrasonic grain size prediction model has been improved, and the problem of poor prediction results caused by scarce sample quantity and unbalanced distribution has been solved, thus achieving accurate prediction of grain size.
Smart Images

Figure CN118862974B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of high-temperature alloy grain size measurement technology, and in particular to an ultrasonic prediction network training method based on an improved GAN, and an ultrasonic prediction method and device for high-temperature alloy grain size. Background Technology
[0002] High-temperature alloys are widely used in aerospace, military, and other fields, possessing properties such as high-temperature resistance, oxidation resistance, and corrosion resistance. However, workpieces made of high-temperature alloys are subject to stress-strain effects during long-term service, causing varying degrees of performance changes that can seriously affect their safety during service. The microstructure of high-temperature alloys reflects different material properties, and performance changes can be predicted by analyzing the microstructure. Grain size is the most representative parameter in the microstructure, and ultrasonic prediction of grain size can effectively prevent workpiece failures during service.
[0003] Data-driven modeling methods are highly dependent on the quantity of the original sample set, and the size of the original sample set has a significant impact on the prediction accuracy of the constructed ultrasound prediction model. However, the high cost of collecting original samples leads to a scarcity and uneven distribution of samples, which in turn results in poor prediction performance of the ultrasound prediction model and an inability to accurately predict grain size. Summary of the Invention
[0004] The purpose of this application is to provide an ultrasonic prediction network training method, a grain size ultrasonic prediction method and device, which can improve the prediction accuracy of the grain size ultrasonic prediction model.
[0005] To achieve the above objectives, this application provides the following solution:
[0006] Firstly, this application provides a method for training an ultrasound prediction network, including:
[0007] Obtain several original samples; each original sample includes: the original grain size of the high-temperature alloy sample and the corresponding original ultrasonic characteristic parameters;
[0008] A generative adversarial network (GAN) is trained using the original ultrasound feature parameters to obtain a generative adversarial model. The GAN includes a generator, a quality evaluation mechanism, and a discriminator. The quality evaluation mechanism is used to determine whether the virtual difference exceeds a preset threshold. When the virtual difference exceeds the preset threshold, the ultrasound feature parameters generated by the generator during the training phase are deleted. When the virtual difference does not exceed the preset threshold, the ultrasound feature parameters generated by the generator during the training phase are input into the discriminator. The virtual difference is the difference between the ultrasound feature parameters generated by the generator during the training phase and the original ultrasound feature parameters.
[0009] Virtual ultrasound feature parameters are generated using the generator in the generative adversarial model.
[0010] A virtual sample is obtained; the virtual sample includes: virtual ultrasonic feature parameters and virtual grain size; the virtual grain size is obtained by inputting the virtual ultrasonic feature parameters into a machine learning algorithm model; the machine learning algorithm model is trained from the original grain size and the original ultrasonic feature parameters.
[0011] The virtual samples are filtered based on the difference between the virtual error and the real error to obtain the filtered samples; the virtual error is determined by the output of the ultrasound prediction network after the virtual samples are input and the virtual grain size; the real error is determined by the output of the ultrasound prediction network after the original samples are input and the original grain size.
[0012] The ultrasonic prediction network was trained using the screened samples and the original samples to obtain the ultrasonic prediction model for grain size.
[0013] Optionally, the virtual samples are filtered based on the difference between the virtual error and the real error to obtain filtered samples, specifically including:
[0014] The performance improvement rate of the model is calculated based on the virtual error and the actual error, using the following formula: in, In the formula, EIR is the model performance improvement rate, RMSE1 is the root mean square error between the output of the ultrasound prediction network after inputting the original sample and the original grain size, RMSE2 is the root mean square error between the output of the ultrasound prediction network after inputting the virtual sample and the virtual grain size, i represents the i-th sample, and y i1 For the original sample, To input the original sample into the output of the ultrasound prediction network, y i2 For virtual samples, The output of the ultrasound prediction network after inputting virtual samples;
[0015] Virtual samples with a model performance improvement rate of less than 0 will be deleted.
[0016] Optionally, obtaining the original sample specifically includes:
[0017] A microstructure image of a high-temperature alloy sample was obtained; the microstructure image was obtained through metallographic experiments.
[0018] The grain area of each high-temperature alloy sample in the microstructure pattern image was calculated using image processing methods.
[0019] The grain size of each high-temperature alloy sample is calculated based on the grain area to obtain the original grain size;
[0020] Obtain the original ultrasonic characteristic parameters of the high-temperature alloy sample; the ultrasonic characteristic parameters include: average sound velocity, attenuation coefficient, nonlinear coefficient, first-order bottom wave frequency deviation and second-order bottom wave frequency deviation.
[0021] Optionally,
[0022] The formula for calculating the virtual difference is:
[0023]
[0024] In the formula, η represents the virtual difference, M represents the number of attributes in datasets P and Q, and D... kl This indicates the degree of similarity between two probability distributions; i represents the nth attribute in the dataset, and P... i Q i This represents the specific value of the i-th attribute in datasets P and Q.
[0025] Optionally, before filtering the virtual samples based on the difference between the virtual error and the real error to obtain the filtered virtual samples, the method further includes:
[0026] The center coordinates of each cluster in the original sample were obtained using the K-means clustering algorithm.
[0027] Calculate the average distance from each virtual sample to the center coordinates of its corresponding cluster;
[0028] Virtual samples with a first distance greater than the average distance are deleted; the first distance is the distance from the virtual sample to the center coordinates of the corresponding cluster class.
[0029] Optionally, the grain size ultrasonic prediction network is:
[0030]
[0031] In the formula, F(X) represents the predicted grain size, K represents the number of decision trees, and X represents the input ultrasonic feature parameters.
[0032] Secondly, this application provides a method for ultrasonic prediction of grain size, including:
[0033] Obtain the ultrasonic characteristic parameters of the grain to be tested;
[0034] The ultrasonic feature parameters are input into the grain size ultrasonic prediction model to obtain the grain size of the grain to be tested; the grain size ultrasonic prediction model is trained by any of the ultrasonic prediction network training methods described above.
[0035] Thirdly, this application provides a computer device, including: a memory and a processor for storing a computer program on the memory and executable on the processor, wherein the processor executes the computer program to implement the ultrasonic prediction network training method or the grain size ultrasonic prediction method described above.
[0036] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the ultrasonic prediction network training method or the grain size ultrasonic prediction method described in any of the preceding claims.
[0037] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the ultrasonic prediction network training method or the grain size ultrasonic prediction method described in any of the preceding claims.
[0038] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0039] This application provides a training method for an ultrasound prediction network, a method and apparatus for predicting grain size using ultrasound, and employs an improved GAN to generate virtual samples to expand the sample set size. A quality prediction mechanism is introduced into the traditional GAN to improve the quality of the generated virtual samples. A quality prediction mechanism is added to the traditional generative adversarial network to determine whether the virtual difference exceeds a preset threshold. When the preset threshold is exceeded, the virtual ultrasound feature parameters generated by the generator are deleted. When the preset threshold is not exceeded, the virtual ultrasound feature parameters generated by the generator are input into a discriminator. The virtual difference is the difference between the virtual ultrasound feature parameters generated by the generator and the original ultrasound feature parameters. After generating virtual samples, the samples are filtered based on the difference between the virtual error and the real error to ensure a balanced distribution. The virtual error is the error between the output of the ultrasound prediction network after inputting the virtual sample and the virtual grain size, and the real error is the error between the output of the ultrasound prediction network after inputting the original sample and the original grain size. This application expands the sample set size by improving the virtual sample generation of GAN, introduces a quality prediction mechanism to improve the quality of the generated virtual samples, and uses a screening mechanism to screen the virtual samples based on the difference between the virtual error and the real error to obtain screened samples, thus ensuring a balanced distribution of samples. This solves the problem of poor prediction effect of ultrasound prediction model caused by the scarcity and unbalanced distribution of samples in the prior art, and enables accurate prediction of grain size. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is an application environment diagram of an ultrasound prediction network training method in one embodiment of this application;
[0042] Figure 2 A flowchart illustrating an ultrasound prediction network training method provided in an embodiment of this application;
[0043] Figure 3 A structural diagram of a conventional GAN network provided in an embodiment of this application;
[0044] Figure 4 This is a schematic diagram illustrating the generation of a virtual sample according to an embodiment of this application;
[0045] Figure 5 Metallographic images of different ring structures of TC25 high-temperature alloy provided in an embodiment of this application;
[0046] Figure 6 A comparison curve of the predicted values of the ultrasonic prediction model for grain size with and without virtual samples during training, provided in an embodiment of this application;
[0047] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0050] The ultrasound prediction network training method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on other servers. Terminal 102 can send the original sample to be processed to server 104. After receiving the original sample, server 104, for the original grain size and corresponding original ultrasonic characteristic parameters of the high-temperature alloy sample in the original sample, uses the original ultrasonic characteristic parameters to train a generative adversarial network (GAN) to obtain a generative adversarial model. The GAN includes a generator, a quality evaluation mechanism, and a discriminator. The quality evaluation mechanism is used to determine whether the virtual difference exceeds a preset threshold. When the virtual difference exceeds the preset threshold, the ultrasonic characteristic parameters generated by the generator during the training phase are deleted. When the virtual difference does not exceed the preset threshold, the ultrasonic characteristic parameters generated by the generator during the training phase are input into the discriminator. The virtual difference is the difference between the ultrasonic characteristic parameters generated by the generator during the training phase and the original ultrasonic characteristic parameters. A generator in a generative adversarial model is used to generate virtual ultrasound feature parameters; virtual samples are obtained; the virtual samples include virtual ultrasound feature parameters and virtual grain size; the virtual grain size is obtained by inputting the virtual ultrasound feature parameters into a machine learning algorithm model; the machine learning algorithm model is trained using the original grain size and the original ultrasound feature parameters; the virtual samples are filtered based on the difference between the virtual error and the real error to obtain filtered samples; the virtual error is determined by the output of the ultrasound prediction network after inputting the virtual samples and the virtual grain size; the real error is determined by the output of the ultrasound prediction network after inputting the original samples and the original grain size; the ultrasound prediction network is trained using the filtered samples and the original samples to obtain a grain size ultrasound prediction model. The server 104 can feed back the obtained grain size ultrasound prediction model to the terminal 102. Furthermore, in some embodiments, the ultrasound prediction network training method can also be implemented separately by the server 104 or the terminal 102. For example, the terminal 102 can directly process the original samples, or the server 104 can obtain the original samples from the data storage system and process them.
[0051] The grain size ultrasonic prediction method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send the ultrasonic characteristic parameters of the test grain to server 104. After receiving the ultrasonic characteristic parameters, server 104 inputs them into a grain size ultrasonic prediction model to obtain the grain size of the test grain. Server 104 can then feed back the obtained grain size to terminal 102. Furthermore, in some embodiments, the grain size ultrasonic prediction method can also be implemented independently by server 104 or terminal 102. For example, terminal 102 can directly perform prediction processing on the ultrasonic characteristic parameters of the test grain, or server 104 can obtain the ultrasonic characteristic parameters of the test grain from the data storage system and perform prediction processing on the ultrasonic characteristic parameters of the test grain.
[0052] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.
[0053] In one exemplary embodiment, such as Figure 2 As shown, a method for training an ultrasound prediction network is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S1 to S6. Wherein:
[0054] Step S1: Obtain several original samples; each original sample includes: the original grain size of the high-temperature alloy sample and the corresponding original ultrasonic characteristic parameters.
[0055] In this embodiment, metallographic experiments and ultrasonic scanning were performed on the high-temperature alloy sample to obtain the corresponding original grain size and original ultrasonic characteristic parameters. The corresponding original grain size and original ultrasonic characteristic parameters were used to form the original sample.
[0056] Metallographic experiments were performed on the high-temperature alloy samples to obtain their microstructure images. The grain area S of each high-temperature alloy sample was calculated using ImageJ digital image analysis software. The grain size of each high-temperature alloy sample can then be calculated.
[0057] An ultrasonic A-scan was performed on the high-temperature alloy sample, and the original ultrasonic characteristic parameters were extracted from the ultrasonic A-scan signal. The extracted original ultrasonic characteristic parameters were: average sound velocity, etc. Attenuation coefficient α, nonlinear coefficient β, first-order bottom frequency offset and secondary bottom wave frequency offset The formulas for calculating the average sound velocity, attenuation coefficient, and nonlinear coefficient are as follows:
[0058]
[0059]
[0060] In the formula, P represents the average thickness of the high-temperature alloy sample, Δt is the time from the first bottom echo peak to the surface echo peak, and P is the average thickness of the sample. F1 For a bottom wave peak, P F2 Let A0 and A2 be the amplitudes of the fundamental wave and the second harmonic, respectively, where x is the propagation distance and k is the wave number. In practical applications, β' can be used instead of β. The formula for calculating β' is as follows:
[0061]
[0062] In the formula, This represents the square of the fundamental frequency of the ultrasonic echo signal.
[0063] By combining the original ultrasonic characteristic parameters corresponding to the high-temperature alloy sample with the original grain size, a complete original sample can be obtained. The original sample contains 5 inputs (average sound velocity, average attenuation coefficient, nonlinear coefficient, first-order bottom wave frequency deviation, and second-order bottom wave frequency deviation) and 1 output (grain size). By constructing an ultrasonic prediction model with 5 inputs and 1 output, the grain size is predicted using the ultrasonic characteristic parameters.
[0064] Step S2: Train a generative adversarial network using the original ultrasound feature parameters to obtain a generative adversarial model. The generative adversarial network includes a generator, a quality evaluation mechanism, and a discriminator. The quality evaluation mechanism is used to determine whether the virtual difference exceeds a preset threshold. When the virtual difference exceeds the preset threshold, the ultrasound feature parameters generated by the generator during the training phase are deleted. When the virtual difference does not exceed the preset threshold, the ultrasound feature parameters generated by the generator during the training phase are input into the discriminator. The virtual difference is the difference between the ultrasound feature parameters generated by the generator during the training phase and the original ultrasound feature parameters.
[0065] Step S3: Use the generator in the generative adversarial model to generate virtual ultrasound feature parameters. (Using the generator in the trained generative adversarial model to generate virtual sample ultrasound feature parameters, in this embodiment, the generative adversarial network is trained using all the original ultrasound features. When the trained generative adversarial model obtains virtual ultrasound feature parameters, it does not need to input the original ultrasound feature parameters into the generator; only random noise is needed to generate virtual ultrasound feature parameters.)
[0066] In this embodiment, the original ultrasound feature parameters are first normalized, and then applied to a traditional GAN (such as...). Figure 3 The method introduces a virtual sample quality evaluation mechanism, which inputs normalized ultrasound feature parameters into the improved GAN for training, and uses the trained GAN to generate virtual sample inputs.
[0067] The extracted raw ultrasound feature parameters are represented as a vector form X=(x1,x2,…,x…). n ), where n represents the dimension of the ultrasound characteristic parameters, and here n = 5.
[0068] A quality evaluation mechanism based on probability distribution differences is introduced into GANs to improve the quality of samples generated by the generator. An index η is defined to evaluate the difference between real samples and original samples. If η is greater than a set threshold, the selected virtual samples are input into the discriminator for further training. If η is less than the set threshold, the virtual samples are deleted. The formula for calculating η is as follows:
[0069]
[0070] In the formula, M represents the number of attributes in datasets P and Q, and D... kl This indicates the degree of similarity between two probability distributions; i represents the nth attribute in the dataset, and P... i Q i This represents the specific value of the i-th attribute in datasets P and Q.
[0071] Step S4, obtain virtual samples; the virtual samples include: virtual ultrasonic feature parameters and virtual grain size; the virtual grain size is obtained by inputting the virtual ultrasonic feature parameters into a machine learning algorithm model; the machine learning algorithm model is trained using the original grain size and the original ultrasonic feature parameters. Please refer to [link to relevant documentation]. Figure 4 .
[0072] In this embodiment, a few-shot mapping model is selected as the machine learning algorithm model. The few-shot mapping model is constructed using the random forest method, the few-shot mapping network is trained using the original samples, virtual ultrasound feature parameters are input, and virtual grain size is output. The corresponding input and output are combined into a complete virtual sample.
[0073] Specifically: Using the original samples, a random forest algorithm is employed to construct a few-sample mapping model to generate virtual sample outputs. The few-sample mapping network function is:
[0074]
[0075] In the formula, y vir This represents the predicted result, i.e., the virtual grain size value, X. vir Represents the virtual ultrasound characteristic parameter X vir =(x1) vir x2 vir x3 vir x4 vir x5 vir N represents the number of decision trees in the random forest. This is a decision tree model.
[0076] The original samples are divided into training and test sets. The training set is used to train the constructed few-shot mapping network (the training set is normalized, and the normalized training set is input into the mapping model for training). The test set is used to validate the trained few-shot mapping model to see if it meets the requirements. The input of the few-shot mapping model is the virtual ultrasound feature parameter X. vir =(x1) vir x2 vir x3 vir x4 vir x5 vir The output is the virtual grain size value y. vir .
[0077] Then, the virtual samples are initially screened. K-means is used to analyze the similarity of the virtual samples, and virtual samples with low similarity are deleted. K-means is then used to perform cluster analysis on the original samples to obtain the center coordinates of each cluster. Using the center coordinates of the original sample clusters as a reference, cluster analysis is performed on the virtual samples to calculate the average distance d from the samples within a cluster to the cluster center. ave If the distance d from a virtual sample to the center of its cluster is greater than the average distance dc ave If the similarity is too small, it indicates that the virtual sample is too similar to the real sample and needs to be deleted; otherwise, it should be retained.
[0078] In this embodiment, the K-means clustering algorithm is used to obtain the center coordinates of each cluster in the original sample;
[0079] Calculate the average distance from each virtual sample to the center coordinates of its corresponding cluster;
[0080] Virtual samples with a first distance greater than the average distance are deleted, and the remaining virtual samples are used as the virtual samples in the step "the difference between virtual error and real error is used to filter the virtual samples to obtain the filtered virtual samples"; the first distance is the distance from the virtual sample to the center coordinates of the corresponding cluster class.
[0081] The initially screened virtual samples and the original samples are reconstructed into a mixed sample set D. A random forest method is used to construct an ultrasonic prediction model for high-temperature alloy grain size. Ultrasonic feature parameters can be obtained through non-destructive methods such as ultrasonic testing, while grain size can only be obtained through destructive methods such as metallographic testing. To obtain the grain size of the material being tested non-destructively, the readily available ultrasonic feature parameters are input into the trained ultrasonic prediction model, which can then predict the corresponding grain size, thus achieving non-destructive evaluation of the material. Random sampling with replacement is performed on D to obtain K training subsets {D1, D2, ..., D...}. k Therefore, K decision tree models can be constructed. This leads to the acquisition of an RF-based ultrasound prediction model, which is specifically as follows:
[0082]
[0083] In the formula, F(X) represents the final prediction result, i.e. the grain size of the detected material, K represents the number of decision trees, and X represents the input ultrasonic feature parameters.
[0084] Step S5: The virtual samples are filtered based on the difference between the virtual error and the real error to obtain the filtered samples; the virtual error is determined by the output of the ultrasound prediction network after the virtual samples are input and the virtual grain size; the real error is determined by the output of the ultrasound prediction network after the original samples are input and the original grain size.
[0085] In this embodiment, the improvement rate is used as the evaluation index to analyze the improvement of the ultrasound prediction model by the virtual samples after the initial screening in order to conduct a second screening of the virtual samples.
[0086] Specifically, this embodiment sets the improvement rate as the indicator for evaluating the effectiveness of virtual samples, and uses the root mean square error as the evaluation indicator to measure the performance of the ultrasound prediction model. The effectiveness analysis of the virtual samples is performed based on the improvement rate, and the specific calculation formula is as follows:
[0087]
[0088] in, EIR stands for Model Performance Improvement Rate, used to measure the degree to which virtual samples improve the performance of the ultrasound prediction model. RMSE1 is the root mean square error between the output of the ultrasound prediction network after inputting the original samples and the original grain size. RMSE2 is the root mean square error between the output of the ultrasound prediction network after inputting virtual samples and the virtual grain size. i represents the i-th sample, y... i1 For the original sample, To input the original sample into the output of the ultrasound prediction network, y i2 For virtual samples, The output of the ultrasound prediction network is the virtual sample input; the root mean square error is used to measure the predictive performance of the ultrasound prediction model.
[0089] The virtual samples are then screened a second time to determine if their EIR is greater than 0. If it is, they are retained; otherwise, they are deleted.
[0090] Step S6: Train the ultrasonic prediction network using the screened samples and the original samples to obtain the ultrasonic prediction model for grain size.
[0091] By implementing steps S1 to S6 above, the quality prediction mechanism is introduced to improve the quality of the generated virtual samples while expanding the sample set size by improving the GAN to generate virtual samples. The virtual samples are then filtered based on the difference between the virtual error and the real error to obtain the filtered samples. This ensures a balanced distribution of the samples and solves the problem of poor prediction performance of ultrasound prediction models caused by the scarcity and unbalanced distribution of samples in the prior art. It can make accurate predictions of grain size.
[0092] This application also provides an application scenario in which the above-described ultrasonic prediction network training method is applied. Specifically, the ultrasonic prediction network training method provided in this embodiment can be applied to the high-temperature alloy grain size prediction scenario. The high-temperature alloy grain size prediction scenario includes the training of the prediction network and the acquisition and input of the test samples. The video tag processing method provided in this embodiment belongs to the training stage of the prediction network. That is, by using a virtual sample augmentation technique, the existing training samples are augmented, then the augmented samples are selected, and finally the selected samples are used to train the prediction network to obtain a training model.
[0093] In one exemplary embodiment, a method for ultrasonic prediction of grain size is provided, comprising:
[0094] Obtain the ultrasonic characteristic parameters of the grain to be tested;
[0095] The ultrasonic characteristic parameters are input into the grain size ultrasonic prediction model to obtain the grain size of the grain to be tested; the grain size ultrasonic prediction model is trained by the ultrasonic prediction network training method described above.
[0096] In one exemplary embodiment, an ultrasonic method for predicting grain size is provided. This specific embodiment uses titanium alloy TC25 as an example to illustrate the prediction method. A total of 168 experimental samples were prepared. Using the method of this embodiment, the ultrasonic characteristic parameters of the 168 samples are first obtained, then metallographic preparation is performed, and finally, the results are obtained using an optical microscope. Figure 5 The microstructure diagram shown is as follows, in which Figure 5-1 Metallographic diagram of G-1 ring structure. Figure 5-2 Metallographic diagram of G-2 ring structure. Figure 5-3 Metallographic diagram of G-3 ring structure. Figure 5-4 Metallographic diagram of the X-1 ring structure. Figure 5-5 Metallographic diagram of the X-2 ring structure. Figure 5-6 The metallographic image of the X-3 ring structure was used. The grain size area S was calculated using ImageJ digital image analysis software. The grain size can then be calculated. Combining the ultrasonic feature parameters with the corresponding grains yields a complete sample. The sample is divided into two parts: a training set (134 samples) and a test set (34 samples). Then, a virtual sample input is generated by improving the GAN network, and virtual sample evaluation metrics are calculated to optimize the generator and discriminator. A small-sample mapping model is constructed, and the virtual sample input values are fed into this model to predict the virtual sample output. Combining the virtual sample input with the corresponding virtual sample output yields a complete virtual sample. The virtual samples are then initially screened, and the initially screened virtual samples are reconstructed with the training set to form a mixed sample set. This mixed sample set is used to train the ultrasonic prediction model. Based on the improvement of the ultrasonic prediction model by the virtual samples, a second screening of the virtual samples is performed. Finally, the ultrasonic prediction model is retrained. The comparison curve between the predicted values of the ultrasonic prediction model for grain size with and without virtual samples and the predicted values of the real samples is shown in the figure. Figure 6 As shown.
[0097] This embodiment introduces a quality evaluation mechanism into traditional GANs, optimizes the generator and discriminator, improves the quality of generated samples, and expands the scale of small sample sets. This provides a new technical means to address the problem of low accuracy of prediction models caused by scarce and unbalanced sample numbers.
[0098] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 7As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores training data for ultrasonic prediction networks or grain-size ultrasonic prediction data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an ultrasonic prediction network training method or a grain-size ultrasonic prediction method.
[0099] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0100] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0101] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0102] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0103] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0104] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0105] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0106] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0107] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for training an ultrasound prediction network, characterized in that, The ultrasound prediction network training method includes: Obtain several original samples; each original sample includes: the original grain size of the high-temperature alloy sample and the corresponding original ultrasonic characteristic parameters; A generative adversarial network (GAN) is trained using the original ultrasound feature parameters to obtain a generative adversarial model. The GAN includes a generator, a quality evaluation mechanism, and a discriminator. A quality evaluation mechanism for probability distribution differences is introduced into the GAN. An index η is defined to evaluate the difference between the ultrasound feature parameters generated by the generator during the training phase and the original ultrasound feature parameters. If η is greater than a set threshold, the ultrasound feature parameters generated by the generator during the training phase are input into the discriminator for further training. If η is less than the set threshold, the ultrasound feature parameters generated by the generator during the training phase are deleted. In the formula, M represents the number of attributes in datasets P and Q, and D... kl This indicates the degree of similarity between two probability distributions; i represents the nth attribute in the dataset, and P... i , Q i This represents the specific value of the i-th attribute in datasets P and Q; Virtual ultrasound feature parameters are generated using the generator in the generative adversarial model. A virtual sample is obtained; the virtual sample includes: virtual ultrasonic feature parameters and virtual grain size; the virtual grain size is obtained by inputting the virtual ultrasonic feature parameters into a machine learning algorithm model; the machine learning algorithm model is trained from the original grain size and the original ultrasonic feature parameters. The virtual samples are filtered based on the difference between the virtual error and the real error to obtain the filtered samples; the virtual error is determined by the output of the ultrasound prediction network after the virtual samples are input and the virtual grain size; the real error is determined by the output of the ultrasound prediction network after the original samples are input and the original grain size. The ultrasonic prediction network was trained using the screened samples and the original samples to obtain a grain size ultrasonic prediction model. The ultrasonic prediction model for grain size is as follows: In the formula, F(X) represents the predicted grain size, K represents the number of decision trees, and X represents the input ultrasonic feature parameters. This represents a decision tree model.
2. The ultrasound prediction network training method according to claim 1, characterized in that, The step of filtering the virtual samples based on the difference between the virtual error and the real error to obtain the filtered samples specifically includes: The performance improvement rate of the model is calculated based on the virtual error and the actual error, using the following formula: in, In the formula, EIR is the model performance improvement rate, RMSE1 is the root mean square error between the output of the ultrasound prediction network after inputting the original sample and the original grain size, RMSE2 is the root mean square error between the output of the ultrasound prediction network after inputting the virtual sample and the virtual grain size, i represents the i-th sample, and y i1 For the original sample, To input the original sample into the output of the ultrasound prediction network, y i2 For virtual samples, The output of the ultrasound prediction network after inputting virtual samples; Virtual samples with a model performance improvement rate of less than 0 will be deleted.
3. The ultrasound prediction network training method according to claim 1, characterized in that, The acquisition of several original samples specifically includes: A microstructure image of a high-temperature alloy sample was obtained; the microstructure image was obtained through metallographic experiments. The grain area of each high-temperature alloy sample in the microstructure pattern image was calculated using image processing methods. The grain size of each high-temperature alloy sample is calculated based on the grain area to obtain the original grain size; Obtain the original ultrasonic characteristic parameters of the high-temperature alloy sample; the ultrasonic characteristic parameters include: average sound velocity, attenuation coefficient, nonlinear coefficient, first-order bottom wave frequency deviation and second-order bottom wave frequency deviation.
4. The ultrasound prediction network training method according to claim 1, characterized in that, Before filtering the virtual samples based on the difference between the virtual error and the real error to obtain the filtered virtual samples, the method further includes: The center coordinates of each cluster in the original sample were obtained using the K-means clustering algorithm. Calculate the average distance from each virtual sample to the center coordinates of its corresponding cluster; Virtual samples with a first distance greater than the average distance are deleted; the first distance is the distance from the virtual sample to the center coordinates of the corresponding cluster class.
5. A method for ultrasonic prediction of grain size, characterized in that, The ultrasonic prediction method for grain size includes: Obtain the ultrasonic characteristic parameters of the grain to be tested; The ultrasonic characteristic parameters are input into the grain size ultrasonic prediction model to obtain the grain size of the grain to be tested; the grain size ultrasonic prediction model is trained by the ultrasonic prediction network training method according to any one of claims 1-4.
6. A computer device, comprising: The memory and processor contain a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the ultrasonic prediction network training method of any one of claims 1-4 or the grain size ultrasonic prediction method of claim 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the ultrasonic prediction network training method according to any one of claims 1-4 or the grain size ultrasonic prediction method according to claim 5.
8. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the ultrasonic prediction network training method according to any one of claims 1-4 or the grain size ultrasonic prediction method according to claim 5.
Citation Information
Patent Citations
Construction method of high-temperature alloy grain size identification model and size identification method
CN112836433A
High-dimensional ultrasonic evaluation method for grain size of nickel-based alloy
CN113804591A