LPBF aluminum alloy performance prediction method and system based on self-attention mechanism

By applying a deep learning method of self-attention mechanism in the performance prediction of LPBF aluminum alloy, the problem of difficulty in achieving universal performance prediction in the broad composition design space in the prior art is solved, and accurate prediction of the performance of LPBF aluminum alloy and capture of complex element interactions are achieved.

CN120217878APending Publication Date: 2025-06-27CHONGQING INST OF GREEN & INTELLIGENT TECH CHINESE ACAD OF SCI

Patent Information

Application Number
CN202510344965.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art is difficult to achieve universal performance prediction within the vast composition design space of LPBF aluminum alloys, and traditional methods are difficult to capture complex elemental interactions and nonlinear relationships.

Method used

The deep learning method based on the self-attention mechanism is adopted, and the components and thermodynamic parameters of aluminum alloy are converted into vector forms that can be processed by the model through word embedding coding and dual-channel coding, and a dynamic weight allocation model is established to capture the complex nonlinear relationship between elements.

Benefits of technology

It realizes accurate prediction of the performance of LPBF aluminum alloy, breaks through the dimensional limitations of traditional linear regression methods, and provides the ability to capture the internal laws of complex systems more efficiently and comprehensively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217878A_ABST
    Figure CN120217878A_ABST
Patent Text Reader

Abstract

The invention discloses an LPBF aluminum alloy performance prediction method and system based on a self-attention mechanism, and belongs to the technical field of metal material science. The method comprises the following steps: acquiring components, thermodynamic parameters and corresponding target performance values of a plurality of aluminum alloys as data set samples; performing word embedding coding on elements of the aluminum alloy in the sample to obtain element vectors; performing dual-channel coding of main element linear embedding and trace doping element logarithmic embedding on the mass fraction of the aluminum alloy element in the sample to obtain a mass fraction vector; inputting the encoded samples into a prediction model to train the prediction model; the prediction model comprises a self-attention module and a prediction module; and inputting the components and thermodynamic parameters of the to-be-predicted aluminum alloy into the trained prediction model, and predicting the target performance of the to-be-predicted aluminum alloy. According to the method, the implicit mapping relation among components, indexes and performance is deeply mined, a dynamic weight distribution model of element interaction in the multi-element alloy system is established, and the dimension limitation of a traditional linear regression method is broken through.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of metal materials science and technology, and particularly relates to a method and system for predicting the properties of LPBF aluminum alloys based on the self-attention mechanism. Background Art

[0002] Aluminum alloys have excellent specific strength, thermal conductivity and workability, and are widely used in the fields of aerospace, automotive manufacturing and electronic packaging. Compared with traditional forging and casting processes, the use of LBPF technology for the processing of aluminum alloys provides technical support for the manufacture of aluminum alloy components with complex shapes. However, existing aluminum alloy materials are prone to defects such as pores and cracks in the LBPF process, resulting in a decrease in mechanical properties. In addition, its thermal conductivity also needs to be further improved to meet the thermal management requirements under certain special working conditions. Therefore, the development of new aluminum alloy materials with medium strength and high thermal conductivity and suitable for additive manufacturing processes is of great significance for promoting the application of additive manufacturing technology in the field of aluminum alloys.

[0003] Traditional alloy design methods mainly include the trial-and-error method based on experience and experiments, as well as classical thermodynamic calculations and phase diagram analysis. However, with the progress of science and technology and the increasing requirements for material properties, the components of alloys have become increasingly complex, and the design space has also increased accordingly. For the traditional trial-and-error method, it is very difficult to find the target alloy that meets the performance requirements in the huge composition space. With the proposal of the Materials Genome Initiative and the development of computational materials science, the emergence of theoretical models such as first-principles calculations and molecular dynamics simulations in materials calculation means makes it possible to predict the microstructure from the processing process and predict the properties from the microstructure. However, materials calculation methods are usually targeted at specific material systems and properties, and it is difficult to expand to new material spaces, with limited generalization ability, and it is impossible to achieve universal performance prediction in the vast composition design space of LPBF aluminum alloys. In addition, the microstructural features that affect the properties of LPBF aluminum alloys are complex and diverse, there are complex interactions and couplings between elements, and the special forming process of LPBF will also affect the final properties of aluminum alloys. Therefore, when describing the relationship between the composition and properties of LPBF aluminum alloys, it is necessary to consider the description of the non-linear relationship between elements.

[0004] The prior art Chinese Patent Application CN202310108790.4 discloses a method for determining alloy composition based on machine learning. The method includes: determining key features affecting the performance of aerospace aluminum alloys based on knowledge materials; constructing a data set according to the composition, performance, and corresponding key features of different aerospace aluminum alloys; based on the data set, using the extreme gradient boosting algorithm and the particle swarm optimization method to determine an alloy performance prediction model with the composition of aerospace aluminum alloys and the corresponding key features as inputs and performance as outputs; according to the alloy performance prediction model and alloy elements, using the Pareto front method to determine the composition of the aerospace aluminum alloy corresponding to the optimal performance.

[0005] This prior art uses XGBoost as an ensemble learning model. Although the prediction accuracy is high, the model structure is complex, and it is difficult to intuitively explain the causal relationship between elements and performance, which limits the theoretical guidance for the design of new materials.

[0006] Another prior art Chinese Patent Application CN202411406090.4 discloses a method, system, and medium for predicting the performance of medium and high entropy aluminum alloys. The method includes the following steps: obtaining a characteristic data set of the performance of medium and high entropy aluminum alloys; constructing an MLP prediction model and obtaining the optimal hyperparameter combination of the MLP prediction model through ESOA; training the MLP prediction model according to the characteristic data set and the optimal hyperparameter combination; predicting the performance of medium and high entropy aluminum alloys according to the trained MLP prediction model.

[0007] This prior art predicts the performance of aluminum alloys based on a multi-layer perceptron (MLP). The MLP is highly sensitive to hyperparameters (such as the number of neurons in the hidden layer, learning rate, etc.). Although optimized by ESOA, there may still be local optimum problems, resulting in limited generalization ability of the model. Summary of the Invention

[0008] The purpose of the present invention is to provide a method and system for predicting the performance of LPBF aluminum alloys based on the self-attention mechanism, which partially solves or alleviates the above deficiencies in the prior art. The aim is to establish a dynamic weight allocation model for element interaction in a multi-element alloy system by deeply mining the implicit mapping relationship between composition-index-performance, and to break through the dimensionality limitation of traditional linear regression methods.

[0009] To solve the above-mentioned technical problems, the present invention specifically adopts the following technical solutions: In the first aspect of the present invention, there is provided a method for predicting the performance of LPBF aluminum alloys based on the self-attention mechanism, including: Obtaining the composition, thermodynamic parameters, and corresponding target performance values of several aluminum alloys as data set samples; the composition of the aluminum alloy includes the elements constituting the aluminum alloy and the corresponding mass fractions; Perform word embedding encoding on the elements of the aluminum alloy in the sample to obtain element vectors; perform dual-channel encoding of the mass fractions of the aluminum alloy elements in the sample, including linear embedding of the major elements and logarithmic embedding of the trace doping elements, to obtain mass fraction vectors; Input the encoded sample into the prediction model to train the prediction model; the prediction model includes a self-attention module and a prediction module; Input the composition and thermodynamic parameters of the aluminum alloy to be predicted into the trained prediction model to predict the target properties of the aluminum alloy to be predicted.

[0010] As an improvement, the word embedding encoding is the One-hot or Mat2Vec encoding method.

[0011] As an improvement, the steps for encoding the mass fraction include: Normalize the mass fraction of the major elements to stoichiometric values and map the continuous fractions to n discrete intervals at a preset resolution; Map the mass fraction of the trace doping elements in the range of 10 -(m+1) ~10 -1 to the interval of 0~m using the logarithmic scale; For the mapped interval index value x, use the formula: to perform encoding; where FE[i] is the feature encoding at the i-th position in the vector, d model is the dimension of the encoding vector, and 50 is the base number controlling the frequency change of the sine wave.

[0012] As an improvement, the thermodynamic parameters include the crack sensitivity factor and the brittle temperature range.

[0013] As an improvement, use the formula: to calculate the crack sensitivity factor of the aluminum alloy; where HSI is the crack sensitivity factor, T is the temperature, F s 0.5 is the solid fraction in the semi-solid state.

[0014] As an improvement, use the formula: to calculate the brittle temperature range of the aluminum alloy; where Δ T CTR is the brittle temperature range, T ZST is the zero-strength temperature, T ZDT is the zero-ductility temperature.

[0015] As an improvement, the self-attention module is as follows: ; ; ; ; where W is the input parameter matrix of the model, Q, K, V are the query vector, key vector, and value vector in the attention module respectively, Attention(Q, K, V is the attention weight matrix after feature fusion between elements, K T is K the transpose matrix of the matrix, and d k is the dimension of the transformation matrix.

[0016] As an improvement, the prediction module is a feed-forward neural network.

[0017] As an improvement, the steps for training the prediction model include: Input the composition and thermodynamic parameters of the aluminum alloy in the sample into the prediction model to obtain the predicted value output by the prediction model; Input the predicted value and the corresponding true target performance value into the loss function to calculate the loss value; Use the stochastic gradient descent algorithm to optimize the parameters of the prediction model until the loss function satisfies the convergence condition.

[0018] The present invention also provides an LPBF aluminum alloy performance prediction system based on the self-attention mechanism, including: A dataset construction module, which obtains the composition, thermodynamic parameters, and their corresponding target performance values of several aluminum alloys as dataset samples; the composition of the aluminum alloy includes the elements constituting the aluminum alloy and their corresponding mass fractions; An encoding module, which is used to perform word embedding encoding on the elements of the aluminum alloy in the sample to obtain element vectors; and perform dual-channel encoding of the main element linear embedding and trace doping element logarithmic embedding on the mass fractions of the aluminum alloy elements in the sample to obtain mass fraction vectors; A model training module, which is used to input the encoded samples into the prediction model to train the prediction model; the prediction model includes a self-attention module and a prediction module; A prediction module, which is used to input the composition and thermodynamic parameters of the aluminum alloy to be predicted into the trained prediction model to predict the target performance of the aluminum alloy to be predicted.

[0019] Beneficial effects: In the prior art, when predicting the properties of aluminum alloys, in order to screen out aluminum alloys that meet the property requirements, a mapping relationship between the composition or the characteristics of the aluminum alloy material and the properties is constructed, so that only the basic information of the aluminum alloy, such as the composition and its material characteristics, etc., needs to be input to predict its corresponding properties. For example, in the prior art CN202411406090.4, a mapping relationship between the alloy composition and the yield strength is directly constructed. Another example is that the prior art CN202310108790.4 constructs a mapping relationship between the composition of the aluminum alloy, its material characteristics and the properties.

[0020] However, a completely different technical path is adopted in this application: instead of simply screening out the aluminum alloys that meet the expectations, it is considered from the perspective of the properties of the workpieces after the aluminum alloys are processed. Because the process of using LPBF to process aluminum alloys to make aluminum alloy parts will affect the properties of the aluminum alloys. Especially, its special solidification conditions and thermal history make the final aluminum alloy workpieces form special structures and property performances (that is, the properties of the aluminum alloys are changed by LPBF, which is called strong correlation). Therefore, in this application, in addition to considering the mutual influence between the constituent elements (or composition) of the aluminum alloys, process-sensitive parameters that have a strong correlation with the preparation process LPBF are introduced, such as the crack sensitivity factor and the brittle temperature range, so as to construct a mapping relationship between the composition-process-sensitive parameter-properties, so as to predict the properties of the aluminum alloys after being processed by LPBF.

[0021] During model training, various aluminum alloy data suitable for additive manufacturing need to be prepared as the training data set. However, the aluminum alloy data suitable for additive manufacturing are very scarce, and the sample size required for model training is very large. It is difficult to train a prediction model that meets the accuracy requirements with only dozens or hundreds of additive manufacturing aluminum alloy data. Therefore, when constructing the data set in this application, contrary to the traditional thinking, the data set is not limited to the aluminum alloy data suitable for additive manufacturing, but all aluminum alloy data suitable for and not suitable for additive manufacturing are used as the data set to participate in the training, and the crack sensitivity factor and the brittle temperature range of each aluminum alloy are introduced for training, so as to learn the interaction relationships between the components, between the components and the process-sensitive parameters, and between the composition-process-sensitive parameter-properties, so as to predict the properties of LPBF aluminum alloys. And combined with transfer learning, not only the limited additive manufacturing aluminum alloy data are fully utilized, but also the generalization error of the "general model" can be avoided.

[0022] The present invention breakthroughly introduces the self-attention mechanism in the field of natural language processing into the prediction of aluminum alloy properties, belonging to cross-field technological innovation. In natural language processing, the self-attention mechanism is good at capturing long-distance dependencies and semantic associations in text sequences; when migrated to the aluminum alloy property prediction scenario, this mechanism can be analogously used to mine the complex non-linear relationships between the characteristics of aluminum alloy components (element types, mass fractions), thermodynamic parameters, etc., breaking the limitation of traditional material property analysis relying on empirical formulas or single modeling, and providing a new analysis paradigm for the material field.

[0023] The self-attention mechanism dynamically allocates the degree of attention to different elements and parameters through "attention weights". In the aluminum alloy system, the effects of each element (such as the major element Al and trace doping elements Si, Mg, etc.) on the properties are not independent, but there is a coupling effect. The self-attention mechanism can automatically identify the correlations between these elements, accurately analyze the non-linear coupling effect between elements, and capture the internal laws of complex systems more efficiently and comprehensively than traditional methods.

[0024] Encode the element types and mass fractions (such as element embedding, dual-channel encoding of mass fractions), and convert the aluminum alloy composition information into a vector form that can be processed by the model, which not only retains the chemical properties of the elements (such as the associations in the periodic table of elements), but also reflects the numerical characteristics of the mass fractions (the precise ratio of major elements, logarithmic mapping amplification of trace elements). The encoded features are input into the self-attention model, enabling the model to effectively learn the mapping relationship of "composition - thermodynamic parameters (i.e., LPBF process sensitive parameters) - properties" based on standardized and structured data.

[0025] After the encoded element and parameter information is processed by the self-attention mechanism, the model can mine the deep feature associations that are difficult to capture by traditional methods. The prediction of the aluminum alloy properties by the model no longer depends on simple empirical formulas, but is based on the learning of complex feature relationships, making the prediction results more in line with the actual production scenarios (such as the performance in the LPBF process), and providing more reliable guidance for the design of aluminum alloy compositions and process optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale. Obviously, the following described drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.

[0027] Figure 1 It is the flowchart of Embodiment 1.

[0028] Figure 2 Schematic diagram for sample coding.

[0029] Figure 3 Schematic diagram for Mat-Vec coding.

[0030] Figure 4 Schematic diagram of the structure of the prediction model.

[0031] Figure 5 Schematic diagram of the process of transfer learning.

[0032] Figure 6 Comparison chart of the error between the predicted value and the actual value in the prediction of the thermal conductivity of LPBF aluminum alloy by the prediction model of the present invention.

[0033] Figure 7 Schematic diagram of the structure of Example 2. Detailed implementation manners

[0034] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0035] In this article, suffixes such as "module", "component" or "unit" used to represent elements are only for the convenience of describing the present invention, and they have no specific meaning in themselves. Therefore, "module", "component" or "unit" can be used interchangeably.

[0036] In this article, the orientation or positional relationship indicated by terms such as "upper", "lower", "inner", "outer", "front", "rear", "one end", "the other end", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be construed as a limitation of the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.

[0037] In this article, unless otherwise clearly specified and defined, terms such as "installation", "equipped with", "connection", etc. should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium, and can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0038] In this article, "and / or" includes any and all combinations of one or more of the listed related items.

[0039] In this article, "a plurality of" means two or more, that is, it includes two, three, four, five, etc.

[0040] Example 1: As Figure 1 shown, this embodiment provides a method for predicting the properties of LPBF aluminum alloy based on the self-attention mechanism, including: S1 Obtain the compositions, thermodynamic parameters and their corresponding target property values of several aluminum alloys as dataset samples; the composition of the aluminum alloy includes the elements that make up the aluminum alloy and their corresponding mass fractions.

[0041] The purpose of this step is to construct a dataset for training the model.

[0042] Aluminum alloy is an alloy system composed of multiple elements. The main elements usually include aluminum (Al), and in addition, there may be other elements such as magnesium (Mg), silicon (Si), copper (Cu), manganese (Mn), zinc (Zn), etc. The properties of aluminum alloy are mainly determined by its composition. For example, aluminum alloys containing magnesium and silicon are often used in the aerospace field because of their high strength and good corrosion resistance; while aluminum alloys containing copper are used in fields that require high strength and good processing performance, such as automobile manufacturing.

[0043] The mass ratio of each element in the aluminum alloy is called the mass fraction. The mass fraction has a crucial impact on the properties of aluminum alloy. Even the addition of trace elements may significantly change the properties of aluminum alloy. For example, adding a small amount of titanium (Ti) or boron (B) to the aluminum alloy can refine the grains, thereby improving the strength and toughness of the aluminum alloy. The change in the mass fraction of the main elements (such as aluminum) will directly affect the basic properties of the alloy, while the mass fraction of the trace elements is small, but it also plays an important role in regulating the structure and properties of the alloy.

[0044] Thermodynamic parameters are parameters that describe the physical and chemical properties of aluminum alloys under different temperature and pressure conditions. In the present invention, the thermodynamic parameters specifically include a crack sensitivity factor and a brittle temperature range. The crack sensitivity factor is used to evaluate the tendency of aluminum alloys to generate cracks during solidification or processing. The brittle temperature range represents the temperature interval in which the aluminum alloy transforms from a ductile state to a brittle state. Both are crucial for predicting the behavior of aluminum alloys in manufacturing processes such as Laser Powder Bed Fusion (LPBF). For example, by controlling the thermodynamic parameters, the LPBF process can be optimized to reduce crack generation and improve the quality and reliability of aluminum alloy parts.

[0045] In this embodiment, the so-called target performance value refers to the performance indicators that aluminum alloys need to achieve in specific application scenarios (for example, the performance of aluminum alloys after LPBF processing). These indicators can include mechanical properties (such as yield strength, tensile strength, elongation, etc.), physical properties (such as thermal conductivity, electrical conductivity, etc.), and chemical properties (such as corrosion resistance, etc.). Different application fields have different requirements for the target performance values of aluminum alloys.

[0046] Existing prediction models are not specific to LPBF aluminum alloys, so there is only a composition-property mapping and the influence of process conditions is ignored. As thermodynamic parameters, the crack sensitivity factor and the brittle temperature range directly reflect the thermal behavior of materials in the LPBF process. For example, an increase in the Mg content in an Al-Mg-Si alloy will reduce the HSI (decrease in crack sensitivity), but may expand the ΔT CTR (increase in brittle risk). Incorporating these parameters into the dataset can construct a causal chain of "composition → thermodynamic parameters → performance", enabling the model to learn how composition indirectly affects performance through thermodynamic behavior.

[0047] In this embodiment, the CALPHAD thermodynamic calculation software is used to perform Scheil-Gulliver solidification simulation, and based on this, the crack sensitivity factor HSI and the brittle temperature range ΔT of each aluminum alloy in the original dataset are calculated. CTR , and the two indicators are added to the dataset as an expansion. Specifically, the HSI and ΔT are calculated according to the end of the solidification curve in the temperature-solid fraction (T-f s ) curve. CTR .

[0048] More specifically, using the formula: , calculate the crack sensitivity factor of the aluminum alloy; where HSI is the crack sensitivity factor, T is the temperature, F s 0.5 is the solid fraction in the semi-solid.

[0049] Using the formula: , calculate the brittle temperature range of aluminum alloy; where, Δ T CTR is the brittle temperature range, T ZST is the zero strength temperature, T ZDT is the zero ductility temperature.

[0050] During the additive manufacturing process, solidification cracking usually occurs, and it usually occurs in the final stage of solidification. If there is not enough flowing liquid to fill the gaps between the solidifying metals, then cracks are likely to occur. Calculate the crack sensitivity factor HSI and the brittle temperature range ΔT CTR at the end of the solidification curve. They reflect the feeding ability of the melt at the end of solidification, and thus reflect the crack sensitivity and printability, and are related to the properties of the alloy after additive manufacturing forming, such as thermal conductivity, strength, etc.

[0051] The constructed dataset samples are as described in Table 1: Table 1 Sample Table Perform word embedding encoding on the elements of the aluminum alloy in the sample to obtain element vectors; perform dual-channel encoding of the main element linear embedding and trace doping element logarithmic embedding on the mass fractions of the aluminum alloy elements in the sample to obtain mass fraction vectors.

[0052] Figure 2 Shows the whole process of encoding the sample in this implementation, specifically including: For the elements in the aluminum alloy, in this embodiment, word embedding encoding such as One-hot or Mat2Vec encoding method is used to obtain element vectors. Each element is converted into a specific vector (such as the vectors of elements such as Al, Mg, Zr in the figure corresponding to vector blocks of different colors). The purpose is to convert the category information of the elements into feature vectors that can be processed by machine learning models and retain the chemical property associations of the elements.

[0053] The process of encoding elements using the Mat2Vec encoding method is as Figure 3 shown.

[0054] For the mass fractions of the elements in the aluminum alloy, in this embodiment, a dual-channel encoding method is used to obtain mass fraction encodings, map the numerical information of the mass fractions into feature vectors, and capture the proportional relationship and order information of the mass fractions.

[0055] The elements in aluminum alloy include major elements (such as Al) and trace doping elements (such as Mg, Mn, Zn, etc.). The mass fraction ranges of different elements vary greatly. In order to better retain and utilize the information of these element mass fractions in data processing and model training, in this embodiment, the encoding of the mass fraction is divided into two complementary mathematical spaces, one is a linear embedding channel and the other is a logarithmic embedding channel, as shown in the formula: ; where LineaEmbedding is the linear embedding channel, and its function is to retain the exact proportion information of the major elements; LogEmbedding is the logarithmic embedding channel, which can retain the information of the trace doping elements.

[0056] The linear embedding channel first normalizes the mass fraction of the element, that is, converts the percentage into a stoichiometric value. For example, the Al content of 88% is converted to 0.88, and then the continuous fraction is mapped to n (for example, 100) discrete intervals with a preset resolution such as 0.01. Its corresponding mathematical expression is as follows: ; where is the interval index value after mapping, and stoichiometry is the mass fraction.

[0057] The role of the above mapping method is to retain the exact proportion information of the major elements, because the mass fractions of the major elements are usually large and have a significant impact on the alloy properties. A higher resolution can more accurately reflect the changes in their proportions.

[0058] The logarithmic embedding channel uses a logarithmic scale to map the element fractions, mapping the trace doping elements in the mass fraction range of 10 -(m+1) ~10 -1 to the interval of 0~m (for example, the trace doping elements from 10 -6 -10 -1 are mapped to 0-5). Its corresponding mathematical expression is as follows: ; where x log is the interval index after mapping, and stoichiometry is the mass fraction.

[0059] Although the mass fractions of the trace doping elements are very small, they may also have an important impact on the properties of aluminum alloy. The mapping method of the logarithmic scale can amplify these trace values so that they will not be ignored in data processing and model training, thus being able to retain the information of the trace doping elements.

[0060] After mapping to the corresponding discrete index values through the two encoding channels respectively, the sine / cosine functions with different frequencies are used alternately. For the mapped interval index value x, using the formula: Encode; where FE[i] is the feature encoding at the i-th position in the vector, and d model is the dimension of the encoding vector, and 50 is the base number that controls the frequency change of the sine wave.

[0061] The role of positional encoding is to introduce sequential information so that the model can better capture the relationships and sequential features between the elemental mass fractions. By the different frequency changes of the sine and cosine functions, the index value x can be converted into an encoding vector with specific order and features, providing richer input features for the subsequent machine learning model, which helps the model learn and predict the relationship between the properties and mass fractions of aluminum alloys more accurately.

[0062] For the thermodynamic parameters in the sample, in this embodiment, the thermodynamic parameters are directly processed as numerical features. After encoding the elements and their mass fractions respectively, they are fused with the element vector and the mass encoding vector through a "matrix sum" operation, and finally a unified feature vector is formed to provide structured data for the subsequent model to analyze the alloy properties.

[0063] S3 Input the encoded sample into the prediction model to train the prediction model; the prediction model includes a self-attention module and a prediction module.

[0064] In this step, by inputting the encoded sample data into a specific prediction model, the model is trained to enable it to learn the relationship between the aluminum alloy composition, thermodynamic parameters and the target performance value, so as to have the ability to predict the properties of unknown aluminum alloys.

[0065] The prediction model in this embodiment is as Figure 4 shown, including a self-attention module and a prediction module.

[0066] Among them, the self-attention mechanism of the self-attention module is a technology that enables the model to automatically focus on the relationships between different positions in the input sequence when processing sequence data. In the aluminum alloy property prediction model, it can enable the model to automatically identify which factors have a more important impact on the target performance when considering various factors such as the aluminum alloy composition and thermodynamic parameters. For example, when analyzing the strength performance of aluminum alloys, the self-attention module may find that the mass fractions of certain specific elements and certain specific thermodynamic parameters (such as the crack sensitivity factor) have a closer relationship with the strength, and thus give more attention to these factors.

[0067] Specifically, the self-attention module is: ; ; ; ; where W is the input parameter matrix of the model, Q, K, V are the query vector, key vector, and value vector in the attention module respectively, Attention(Q, K, V is the attention weight matrix after element-wise feature fusion, K T is K the transpose matrix of the matrix, d k is the dimension of the transformation matrix.

[0068] The self-attention module generates the attention weight matrix by calculating the relationships among the query vector (Q), key vector (K), and value vector (V), thereby achieving weighted fusion of the input features. Specifically, it calculates the product of Q and the transpose matrix of K, then through a scaling operation, and then passes through the softmax function to obtain the attention weights. Finally, it multiplies the attention weights by V to obtain the fused feature representation. This process enables the model to weight different features according to their importance, thereby better capturing the complex relationships between features.

[0069] The self-attention module can effectively process long sequence data and can be calculated in parallel, improving the computational efficiency. In the prediction of aluminum alloy properties, it can handle the relationships among various elements and complex thermodynamic parameters, avoiding the problems of gradient vanishing or gradient explosion that may occur in traditional recurrent neural networks (RNNs) when processing long sequences, and thus more accurately learning the relationships between aluminum alloy properties and various factors.

[0070] In this embodiment, the prediction module is a feedforward neural network. A feedforward neural network is one of the most basic neural network structures. It consists of an input layer, hidden layers, and an output layer. Information propagates forward from the input layer to the output layer in sequence without feedback connections. In this embodiment, the feedforward neural network serves as the prediction module and receives the feature representation output by the self-attention module as input. In the feedforward neural network, the input features first pass through the input layer to the hidden layers. The neurons in the hidden layers perform weighted summation on the input and undergo non-linear transformation through activation functions, which can extract complex features from the input data. Then, the features processed by the hidden layers are passed to the output layer, and the output layer calculates based on the output of the hidden layers and finally outputs the prediction result, that is, the target property values of the aluminum alloy (such as yield strength, tensile strength, etc.).

[0071] The main role of the feedforward neural network is to further process and transform the features extracted by the self-attention module and map them to the prediction space of the target properties. Through multi-layer non-linear transformations, it can learn the complex mapping relationships between features and properties, thereby achieving accurate prediction of aluminum alloy properties.

[0072] A fully connected layer is also set up behind the feedforward neural network. Each neuron in the fully connected layer is connected to all neurons in the previous layer (feedforward neural network), and the input features are weighted and summed through the weight matrix. This process can integrate complex features such as aluminum alloy composition and thermodynamic parameters extracted by the feedforward neural network, and explore the potential correlation between different features.

[0073] In this embodiment, the step of training the prediction model includes: S301 inputs the composition and thermodynamic parameters of the aluminum alloy in the sample into the prediction model to obtain the prediction value output by the prediction model.

[0074] The data set established in the above steps is divided into a training set, a validation set and a test set. The prediction model is trained with the training set for 900 rounds.

[0075] S302 inputs the predicted value and the corresponding true target performance value into the loss function to calculate the loss value.

[0076] The predicted value output by the prediction model and the corresponding true target performance value are input into the loss function. The loss function is a function used to measure the difference between the predicted value and the true value. Common loss functions include mean square error (MSE) and cross entropy loss. The loss function calculates a value based on the input predicted value and true value through a specific calculation formula. This value is the loss value. The smaller the loss value, the closer the model's predicted value is to the true value, and the better the model's performance is; conversely, the larger the loss value, the worse the model's prediction effect is, and the model parameters need to be further adjusted.

[0077] S303 uses a stochastic gradient descent algorithm to optimize the parameters of the prediction model until the loss function meets the convergence condition.

[0078] The stochastic gradient descent algorithm is a commonly used optimization algorithm that calculates the gradient of the loss function with respect to the model parameters and then updates the parameters in the opposite direction of the gradient to gradually reduce the loss value. Each time the parameters are updated, the algorithm randomly selects a portion of the training data (rather than all the data) to calculate the gradient, which can speed up the training and also avoid falling into the local optimal solution to a certain extent.

[0079] The process of calculating the loss value and updating the model parameters is repeated until the loss function meets the convergence condition. The convergence condition usually means that the loss value no longer decreases significantly within a certain number of iterations, or reaches a pre-set smaller threshold. When the convergence condition is met, the model is considered to have been trained well enough and training can be stopped. At this time, the model can be used to predict the performance of aluminum alloy samples with unknown properties.

[0080] Figure 6 The figure shows a line chart comparing the predicted values and actual values of the thermal conductivity of LPBF aluminum alloy in this embodiment. The crack sensitivity factor HSI and the brittle temperature range ΔT are added to the dataset. CTR In the case of adding these two parameters, the MAPE can reach 3.95%, indicating that the model has excellent prediction accuracy.

[0081] Refer to Table 2 below, which shows the comparison of the prediction effects of the thermal conductivity prediction model described above and similar models published in recent years for reference on the same dataset (i.e., the comparison of cross-validation results). It can also be seen that the prediction model (SAGe) provided by the example of the present invention has better effects and prediction accuracy.

[0082] The MAPE (Mean Absolute Percentage Error) is an index used to evaluate the accuracy of the prediction model, measuring the degree of deviation between the predicted value and the actual value.

[0083] SMAPE (Symmetric Mean Absolute Percentage Error) is a symmetric error evaluation index for measuring prediction accuracy. Its calculation method is to divide the absolute value of the difference between the predicted value and the actual value by the average value of the absolute values of the predicted value and the actual value, and take the average result of all sample points.

[0084] R 2 is the core index in statistics used to evaluate the goodness of fit of the regression model, reflecting the explanatory ability of the independent variable for the change of the dependent variable. Its value usually ranges from 0 to 1. When R 2 is closer to 1, it indicates that the goodness of fit of the model is higher, the explanatory ability is stronger, and the predicted value is closer to the actual value.

[0085] Table 2 Performance Comparison Table That is to say, the final prediction model is obtained by using the principle of transfer learning through the above steps. Specifically, refer to Figure 5 , first train using the traditional aluminum alloy dataset to obtain a pre-trained model: at this stage, the model learns the basic mapping relationship between the element composition and the thermal conductivity, including the influence laws of element interactions and thermodynamic parameters; then, freeze some parameters: retain the general feature extraction ability; then add an adaptation layer: add a specific domain adaptation layer between the frozen layer and the prediction head to specifically learn the feature transformation under additive manufacturing conditions, and finally in the fine-tuning stage: fine-tune the pre-trained model using the additive manufacturing aluminum alloy data to obtain a prediction model dedicated to predicting the performance of additive manufacturing aluminum alloy.

[0086] S4 inputs the composition and thermodynamic parameters of the aluminum alloy to be predicted into the trained prediction model to predict the target properties of the aluminum alloy to be predicted.

[0087] The trained prediction model has learned the mapping relationship of "composition + thermodynamic parameters - target properties" through a large number of samples. At this time, inputting the data of the aluminum alloy to be predicted (including composition and thermodynamic parameters), the model captures the weight relationship between features through the self-attention module, and then completes the non-linear mapping through the feed-forward neural network to output the prediction result.

[0088] Example 2: As Figure 7 shown, this embodiment also provides an LPBF aluminum alloy performance prediction system based on the self-attention mechanism, including: A data set construction module that obtains the composition, thermodynamic parameters and their corresponding target property values of several aluminum alloys as data set samples; the composition of the aluminum alloy includes the elements constituting the aluminum alloy and the corresponding mass fractions; An encoding module for performing word embedding encoding on the elements of the aluminum alloy in the sample to obtain element vectors; performing dual-channel encoding of the main element linear embedding and trace doping element logarithmic embedding on the mass fractions of the aluminum alloy elements in the sample to obtain mass fraction vectors; A model training module for inputting the encoded samples into the prediction model to train the prediction model; the prediction model includes a self-attention module and a prediction module; A prediction module for inputting the composition and thermodynamic parameters of the aluminum alloy to be predicted into the trained prediction model to predict the target properties of the aluminum alloy to be predicted.

[0089] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0090] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a computer terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0091] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the purpose of the present invention and the scope protected by the claims. All of these are within the protection scope of the present invention.

Claims

1. A LPBF aluminum alloy performance prediction method based on self-attention mechanism, characterized in that include: Obtaining the composition, thermodynamic parameters and corresponding target performance values ​​of several aluminum alloys as data set samples; the composition of the aluminum alloy includes the elements constituting the aluminum alloy and their corresponding mass fractions; the thermodynamic parameters include crack sensitivity factor and brittle temperature range; The elements of the aluminum alloy in the sample are encoded by word embedding to obtain the element vector; the mass fraction of the aluminum alloy elements in the sample is encoded by dual-channel encoding of linear embedding of the main elements and logarithmic embedding of the trace doping elements to obtain the mass fraction vector; Inputting the encoded samples into a prediction model to train the prediction model; the prediction model includes a self-attention module and a prediction module; The composition and thermodynamic parameters of the aluminum alloy to be predicted are input into the trained prediction model to predict the target performance of the aluminum alloy to be predicted.

2. The LPBF aluminum alloy property prediction method based on the self-attention mechanism according to claim 1 is characterized in that: The word embedding encoding is a One-hot or Mat2Vec encoding method.

3. The LPBF aluminum alloy performance prediction method based on self-attention mechanism according to claim 1 is characterized in that The steps to encode the quality score include: Normalize the mass fractions of the major elements to stoichiometric values ​​and map the continuous fractions to n discrete intervals with a preset resolution; The quality scores are expressed in logarithmic scales in the range 10 -(m+1) ~10 -1 Internal trace doping elements are mapped to the 0~m interval; For the mapped interval index value x, use the formula: , Encode; where FE[i] is the feature code of the i-th position in the vector, d model is the encoding vector dimension, and 50 is the base number that controls the frequency change of the sine wave.

4. The LPBF aluminum alloy performance prediction method based on self-attention mechanism according to claim 3 is characterized in that Using the formula: , Calculate the crack sensitivity factor of aluminum alloy; where HSI is the crack sensitivity factor, T is the temperature, F s 0.5 is the solid fraction in the semisolid.

5. The LPBF aluminum alloy performance prediction method based on self-attention mechanism according to claim 3 is characterized in that Using the formula: , Calculate the brittle temperature range of aluminum alloy; where Δ T CTR is the brittle temperature range, T ZST is the zero intensity temperature, T ZDT is the zero ductility temperature.

6. The LPBF aluminum alloy property prediction method based on self-attention mechanism according to claim 1 is characterized in that The self-attention module is: ; ; ; ; Where W is the input parameter matrix of the model, Q, K, V are the query vector, key vector, and value vector in the attention module, respectively. Attention(Q,K,V ) is the attention weight matrix after the fusion of inter-element features, K T for K The transpose of the matrix, d k is the dimension of the transformation matrix.

7. The LPBF aluminum alloy performance prediction method based on self-attention mechanism according to claim 1 is characterized in that The prediction module is a feed-forward neural network.

8. The LPBF aluminum alloy property prediction method based on self-attention mechanism according to claim 1 is characterized in that The steps to train a prediction model include: Inputting the composition and thermodynamic parameters of the aluminum alloy in the sample into the prediction model to obtain a prediction value output by the prediction model; Input the predicted value and the corresponding true target performance value into the loss function to calculate the loss value; The parameters of the prediction model are optimized using a stochastic gradient descent algorithm until the loss function meets the convergence condition.

9. A LPBF aluminum alloy performance prediction system based on self-attention mechanism, characterized by include: A data set construction module is used to obtain the composition, thermodynamic parameters and corresponding target performance values ​​of several aluminum alloys as data set samples; the composition of the aluminum alloy includes the elements constituting the aluminum alloy and the corresponding mass fractions; the thermodynamic parameters include crack sensitivity factors and brittle temperature ranges; The encoding module is used to perform word embedding encoding on the aluminum alloy elements in the sample to obtain element vectors; perform dual-channel encoding of linear embedding of main elements and logarithmic embedding of trace doping elements on the mass fraction of aluminum alloy elements in the sample to obtain mass fraction vectors; A model training module, used for inputting the encoded samples into the prediction model to train the prediction model; the prediction model includes a self-attention module and a prediction module; The prediction module is used to input the composition and thermodynamic parameters of the aluminum alloy to be predicted into the trained prediction model to predict the target performance of the aluminum alloy to be predicted.

10. The LPBF aluminum alloy performance prediction system based on self-attention mechanism according to claim 9 is characterized in that The word embedding encoding is a One-hot or Mat2Vec encoding method.

Citation Information

Patent Citations

  • Alloy component determination method, system and equipment based on machine learning

    CN116052817A

  • Medium-high-entropy aluminum alloy performance prediction system and method and medium

    CN119252372A

Cited By

  • Aluminum material process recommendation method and system based on knowledge distillation

    CN120748586A