Shape prediction method for micro-nano material electrodeposition preparation based on seq2seq model
The shape prediction method for electrodeposition preparation of micro and nanomaterials constructed by the Seq2Seq model solves the problem that the electrodeposition parameters are difficult to accurately predict the shape of multi-level structured micro and nanomaterials in the existing technology, and realizes efficient and accurate material shape prediction, simplifying the operation process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2023-11-14
- Publication Date
- 2026-06-16
Smart Images

Figure CN117520967B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning technology, and in particular to a method for predicting the shape of micro and nanomaterial electrodeposition preparation based on the Seq2Seq model. Background Technology
[0002] The artificial design and synthesis of hierarchical micro / nanomaterials is a cutting-edge research field internationally, with exciting application prospects in many areas. Direct electrodeposition of hierarchical micro / nanomaterials does not rely on any templates, aiming to control the crystal growth mode and obtain structurally controllable hierarchical micro / nano structures simply by adjusting the electrodeposition conditions. However, it is currently difficult to accurately predict the shape of the prepared material using electrodeposition parameters. Previous studies have relied on empirical rules, which hinders efficient preparation. Different preparation goals require extensive experimentation to summarize preparation paradigms; predicting and constructing target shapes on demand using electrodeposition parameters is not feasible, resulting in cumbersome and inefficient operations.
[0003] The Seq2Seq (Sequence to Sequence) model is a neural network architecture for sequence-to-sequence tasks. It is widely used in many natural language processing tasks, including machine translation, text summarization, question answering systems, chatbots, and speech recognition. A major advantage of this model is its flexibility; it can be used for any task that requires transforming one sequence into another. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method for predicting the shape of micro / nanomaterial electrodeposition preparation based on the Seq2Seq model, thereby enabling the prediction of the generated shape during the electrodeposition preparation of micro / nanomaterials.
[0005] In a first aspect, the present invention provides a method for constructing a shape prediction model for the electrodeposition of micro / nano materials based on Seq2Seq, the method comprising the following steps:
[0006] S1: Summarize and classify the basic shape units that micro and nanomaterials may generate;
[0007] S2: Construct a dataset of "potential change - shape change" based on different input potential changes;
[0008] S3: Build the encoder, decoder, and prediction model;
[0009] S4: Use the dataset to train the prediction model.
[0010] Furthermore, the basic shape units in S1 are divided into six categories: "concave pyramid", "pyramid", "concave prism", "prism", "concave inverted pyramid", and "inverted pyramid".
[0011] Furthermore, the prediction model described in S3 includes an encoder and a decoder, wherein the encoder and decoder are constructed using a unidirectional recurrent neural network.
[0012] Furthermore, k-fold cross-validation is used to evaluate the performance of the prediction model.
[0013] Furthermore, the model is trained using a forced instruction method.
[0014] Furthermore, the prediction results are evaluated using BLEU, with the average BLEU used as an indicator to measure the model's prediction performance. The BLEU evaluation index is also improved based on the ambiguity of the material shape description.
[0015] Furthermore, the parameters are adjusted to train the model, and the optimal hyperparameters for the prediction model are determined.
[0016] After determining the optimal hyperparameters, a single-step "potential change-shape change" prediction model is trained using all dataset data.
[0017] Secondly, this invention provides a method for predicting the shape of micro and nanomaterials by electrodeposition based on Seq2Seq. Specifically, the input potential waveform is decomposed into multiple single-step potential changes, and the above prediction model is used cyclically to iteratively output the final material shape combination.
[0018] This invention applies a Seq2Seq model to guide the electrodeposition preparation of multi-level structured micro- and nanomaterials. It predicts the shape of the generated material based on the change in electrodeposition potential. Relying on data-driven methods, it solves the problem of difficulty in analyzing the high-dimensional features between electrodeposition parameters and the prepared structure, and accurately predicts the shape of the prepared material through electrodeposition parameters. Attached Figure Description
[0019] Figure 1 This is a flowchart of a method for predicting the shape of micro / nanomaterial electrodeposition based on the Seq2Seq model, according to the present invention.
[0020] Figure 2 This is a Seq2Seq model structure diagram of a shape prediction method for electrodeposition preparation of micro and nanomaterials based on the Seq2Seq model according to the present invention.
[0021] Figure 3 This is a system block diagram of a method for predicting the shape of micro / nano materials by electrodeposition based on a Seq2Seq model, according to the present invention, which predicts the final material shape based on multi-step potential changes. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. The following embodiments will help those skilled in the art to further understand this invention, but do not limit this invention in any way.
[0023] First, since the generated material is at the micro-nano scale, this invention does not require highly precise characterization of the generated material's shape. Therefore, it uses the arrangement and combination of basic shape units to characterize the possible shapes of the generated micro-nano materials, and categorizes these basic shape units into six types: "concave pyramid," "pyramid," "concave prism," "prism," "concave inverted pyramid," and "inverted pyramid." All possible material shapes can be derived from the arrangement and combination of these six units, such as the "pyramid-prism-concave inverted pyramid" shape.
[0024] Materials preparation experiments were conducted, during which different input potential changes resulted in micro / nanomaterials of varying shapes. Based on the results of these experiments, a "potential change-shape change" dataset was constructed. Labels such as "old potential value," "new potential value," "potential change slope," "duration," "combination of old shape units," and "combination of new shape units" were used to describe the new material shape generated by applying a potential change to the existing material shape. The sequence consisting of "old potential value," "new potential value," "potential change slope," "duration," and "combination of old shape units" was used as the input sequence, and "combination of new shape units" was used as the output sequence.
[0025] Construct the encoder. The encoder transforms a variable-length input sequence into a fixed-shape context variable and encodes information from the input sequence within that context variable. A unidirectional recurrent neural network is used to design the encoder, where the hidden state depends only on the input subsequence, which consists of the sequence from the start of the input to the time step containing the hidden state (including the time step containing the hidden state).
[0026] Construct the decoder. Use another unidirectional recurrent neural network as the decoder. At any time step on the output sequence, the recurrent neural network takes the output from the previous time step and the context variables as its input, and then transforms them and the previous hidden state into a hidden state at the current time step. After obtaining the hidden state of the decoder, the conditional probability distribution of the output at that time step can be computed using the output layer and a softmax operation.
[0027] We construct a sequence-to-sequence model. When implementing the decoder, we directly initialize the decoder's hidden state using the encoder's hidden state at the last time step. This requires the encoder and decoder, implemented using a recurrent neural network, to have the same number of layers and hidden units. To further incorporate information from the encoded input sequence, context variables are concatenated with the decoder's input at all time steps. To predict the probability distribution of output words, a fully connected layer is used in the last layer of the recurrent neural network decoder to transform the hidden state. By connecting the encoder and decoder and masking irrelevant predictions using an extended softmax cross-entropy loss function, we build the sequence-to-sequence model.
[0028] Furthermore, due to the very small size of the dataset, k-fold cross-validation is used to evaluate the performance of the prediction model. The basic idea of this method is to first randomly divide all training data into k distinct subsets (or "folds"). Then, each time, one subset is selected as the test set, and the remaining k-1 subsets are used as the training set. This process is repeated k times, selecting a different subset as the test set each time. Finally, the average of these k test results is taken as the final evaluation metric for the model. After dividing the dataset into training and test sets, a "vocabulary" and iterator are constructed based on the training set to train the model.
[0029] Furthermore, teacher forcing is employed, which involves starting specific sequences of words ("..."). <bos>") and the original output sequence (excluding the sequence end word ") <eos>The two strings are concatenated together and used as input to the decoder to train the model in a loop.
[0030] Furthermore, BLEU (bilingual evaluation understudy) is used to evaluate the sequence prediction results. For any n-gram in the predicted sequence, BLEU evaluation assesses whether this n-gram appears in the label sequence. According to the definition of BLEU, BLEU is 1 when the predicted sequence is completely identical to the label sequence. The greater the difference between the predicted sequence and the label sequence, the lower the BLEU value. In the electrodeposition preparation of micro and nanomaterials, due to the ambiguity of the material shape description, adjustments must be made to address this ambiguity in BLEU evaluation. For example, a "pyramid-prism-inverted pyramid" shape can be macroscopically approximated by a large "prism" shape. Therefore, the BLEU values for the "pyramid-prism-inverted pyramid" shape and the "prism" shape are adjusted to 1, thus not reducing the BLEU value.
[0031] Furthermore, based on the test set, the test data is input into the "potential change-shape change" model, and the average BLEU is used as an indicator to measure the model's predictive performance.
[0032] Furthermore, the parameters are adjusted to train the model and find the optimal hyperparameters. After determining the optimal hyperparameters, a single-step "potential change-shape change" model is trained using all dataset data. Based on the current shape and potential change, the generated new shape is predicted.
[0033] Furthermore, the input potential waveform, i.e., the complete and complex multi-step potential change, is decomposed into multiple single-step potential changes. The potential change input is cyclically combined with the material shape combination output by the "potential change-shape change" model to form an input sequence, which is then input into the single-step "potential change-shape change" model, and the final material shape combination is iteratively output.
[0034] The following is combined with Figure 1-3 The present invention will now be further described.
[0035] like Figure 1 As shown, experimental data for generating multi-level structured micro / nanomaterials based on potential changes were obtained, including potential change curves and images of the generated materials.
[0036] Further, data preprocessing was performed. Since the generated basic shape units of micro / nano materials can be categorized into six types—"concave pyramid," "pyramid," "concave prism," "prism," "concave inverted pyramid," and "inverted pyramid"—the experimental materials were encoded as arrangements of these basic shape units. A "potential change-shape change" dataset was constructed using labels such as "old potential value," "new potential value," "potential change slope," "duration," "old shape unit combination," and "new shape unit combination." The dataset was then divided into training and testing sets.
[0037] Furthermore, a unidirectional recurrent neural network is used to construct the encoder and decoder, which are then connected by a context vector. An extended softmax cross-entropy loss function is used to mask irrelevant predictions, thus building a Seq2Seq model. The constructed model is as follows: Figure 2 As shown, the input data includes a sequence of "old potential value," "new potential value," "potential change slope," "duration," and "old shape unit combination," while the output data includes a sequence of "new shape unit combination." The information from the input sequence is encoded into context variables by the encoder and then fed to the decoder. The decoder decodes the output sequence based on the context variables and the output of the previous time step. The output sequence represents the generated material shape.
[0038] Furthermore, the model is trained iteratively to achieve convergence. The predictions are evaluated using an improved BLEU algorithm to measure the ambiguity of the material shape description.
[0039] Furthermore, such as Figure 3 As shown, a multi-step potential change is broken down into multiple single-step potential changes, and the final generated shape is predicted using a Seq2Seq model through iterative iteration. For example, first, using an "old potential value" of 0V, a "new potential value" of 2V, a "potential change slope" of 0, a "duration" of 120s, and an empty "old shape unit combination", a "new shape unit combination" of "pyramid" is generated; then, using an "old potential value" of 2V, a "new potential value" of 6V, a "potential change slope" of 0, a "duration" of 30s, and an "old shape unit combination" of "pyramid", a "new shape unit combination" of "pyramid-concave prism" is generated; finally, using an "old potential value" of 6V, a "new potential value" of 10V, a "potential change slope" of 0, a "duration" of 10s, and an "old shape unit combination" of "pyramid-concave prism", a "new shape unit combination" of "pyramid-concave prism-concave pyramid" is generated.
[0040] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.< / eos> < / bos>
Claims
1. A method for constructing a shape prediction model for electrodeposition of micro / nano materials based on Seq2Seq, characterized in that, The method includes the following steps: S1: Summarize and classify the basic shape units that micro and nano materials may generate. The basic shape units are divided into six categories: "concave pyramid", "pyramid", "concave prism", "prism", "concave inverted pyramid", and "inverted pyramid". S2: Construct a dataset of "potential change - shape change" based on different input potential changes; S3: Construct the encoder, decoder, and prediction model; the prediction model includes an encoder and a decoder, which are constructed using a unidirectional recurrent neural network; The input data of the prediction model includes a sequence consisting of old potential values, new potential values, potential change slope, duration, and combinations of old shape units. The output data includes a sequence consisting of combinations of new shape units. The information of the input sequence is encoded into context variables by the encoder and then input to the decoder. The decoder decodes the output sequence based on the context variables and the output of the previous time step. The output sequence is the representation of the generated material shape. S4: Use the dataset to train the prediction model; use k-fold cross-validation to evaluate the performance of the prediction model; use forced teaching to train the model; and use BLEU to evaluate the prediction results, using the average BLEU as a metric to measure the model's prediction performance, and improve the BLEU evaluation metric based on the ambiguity of the material shape description. Adjust the parameters to train the model and determine the optimal hyperparameters for the prediction model; after determining the optimal hyperparameters, train a single-step "potential change-shape change" prediction model using all dataset data.
2. A method for predicting the shape of micro / nanomaterial electrodeposition based on Seq2Seq, employing the "potential change-shape change" prediction model as described in claim 1, characterized in that: The input potential waveform is decomposed into multiple single-step potential changes. The potential change input is cyclically combined with the material shape combination output by the "potential change-shape change" prediction model to form an input sequence, which is then input to the single-step "potential change-shape change" prediction model. The final material shape combination is then iteratively output.