Method and device for determining dyeing time in anodic oxidation process and dyeing control method
Through the combination of LSTM and XGBoost machine learning algorithms, the problem of difficulty in precise control of anodized dyeing time is solved, and the precise control and quality improvement of product coloring time is achieved.
Patent Information
- Application Number
- CN202510498413.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-08-15
AI Technical Summary
In the existing anodized dyeing technology, the dyeing time is difficult to accurately control, resulting in inconsistent coloring effects of the product and affecting product quality.
The method of combining LSTM and XGBoost machine learning algorithm is used to predict the staining time by training machine learning models, and the preliminary staining time is determined by combining a variety of influencing factor analysis methods and production experience.
It realizes precise control of anodized dyeing time, improves the accuracy and consistency of product coloring, reduces labor costs, and improves production efficiency.
Smart Images

Figure CN120485909A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of anodizing, and in particular to a method and device for determining dyeing time in an anodizing process, and a dyeing control method. Background Art
[0002] Anodizing and dyeing aluminum alloys is a common surface treatment technique that improves the corrosion and wear resistance of aluminum alloys and achieves coloration. Anodizing is the electrochemical process of forming an oxide layer on the surface of aluminum alloys. Dyeing is achieved by placing the aluminum alloy with the formed oxide layer in a dyeing tank.
[0003] Existing dyeing technology relies on experienced technicians to determine dyeing time based on their experience. This requires them to strictly adhere to the dyeing time, placing extremely high demands on their skills. Deviations in dyeing time can ultimately affect the coloring of the aluminum alloy, resulting in a color difference from the desired color. This empirical determination of dyeing time by technicians is subject to significant subjective factors and lacks precise measurement methods, leading to frequent misjudgments. Furthermore, due to the uncertainty and inaccuracy of manual operation, it is difficult to ensure consistent dyeing quality across batches of products, resulting in poor product consistency and negatively impacting product quality.
[0004] The existing anodizing dyeing technology has problems such as difficulty in accurately controlling the dyeing time and low product quality, which has become a technical problem that needs to be solved urgently in the industry. Summary of the Invention
[0005] The present invention provides a method and device for determining the dyeing time in an anodic oxidation process and a dyeing control method, so as to solve the problem that the dyeing time is difficult to accurately determine in the existing anodic oxidation dyeing technology, thereby improving the accuracy of the anodic oxidation dyeing process.
[0006] According to one aspect of the present invention, a method for determining dyeing time in an anodizing process is provided, comprising:
[0007] Obtain the parameters affecting dyeing time in the anodizing dyeing process;
[0008] Training the first machine learning algorithm and the second machine learning algorithm respectively according to the influencing parameters to obtain a first machine learning model and a second machine learning model;
[0009] Predicting a first dyeing time according to the first machine learning model, and predicting a second dyeing time according to the second machine learning model;
[0010] A preliminary staining time is determined according to the first staining time and the second staining time.
[0011] Optionally, obtaining the influencing parameters of the dyeing time in the anodizing dyeing process includes:
[0012] Acquire multiple historical data features of the anodizing process; wherein each of the historical data features includes information related to the anodizing process and corresponding historical dyeing time, and the information related to the oxidation process includes raw material information and data related to slots of the anodizing production line;
[0013] Determining, according to at least two influencing factor analysis methods, information related to the anodizing process that affects the dyeing time under each of the influencing factor analysis methods;
[0014] The influencing parameters are determined according to information related to the anodizing process that affects the dyeing time under at least two of the influencing factor analysis methods.
[0015] Optionally, determining the anodizing process-related information that affects the dyeing time under each of the at least two influencing factor analysis methods includes:
[0016] Determining the order of the degree of influence of the anodizing process-related information affecting the dyeing time under each of the influencing factor analysis methods according to at least two of the influencing factor analysis methods;
[0017] According to the ranking of the influence degree of the anodizing process related information, a preset number of the anodizing process related information affecting the dyeing time under each of the influencing factor analysis methods are selected.
[0018] Optionally, determining the influencing parameters based on information related to the anodizing process that affects the dyeing time under at least two of the influencing factor analysis methods includes:
[0019] Receive input of setting factors that affect the dyeing time of the anodizing process;
[0020] The setting factors and at least two pieces of information related to the anodizing process that affect the dyeing time under the influencing factor analysis methods are determined as the influencing factors.
[0021] Optionally, the first machine learning algorithm is an LSTM algorithm, and the second machine learning algorithm is an XGBoost algorithm; in the process of training the first machine learning algorithm according to the influencing parameters, an improved forget gate function is adopted, where the improved forget gate function is equal to the product of a preset original forget gate function and a preset modulation term, wherein the output range of the preset modulation term is [-1, 1];
[0022] The improved forget gate function formula is:
[0023] f t =σ(W f [ht-1 , x t ]+b f )⊙tanh(U f [h t-1 , x t ]+c f );
[0024] Among them, f t is the improved forget gate function, ⊙ represents element-by-element multiplication, W f is the weight of the original forget gate function, b f is the bias of the original forget gate function, U f is the weight of the tanh function, c f is the bias of the tanh function, h t-1 is the hidden state at the previous moment, x t The input at the current moment.
[0025] Optionally, determining a preliminary dyeing time according to the first dyeing time and the second dyeing time includes:
[0026] The preliminary dyeing time is determined according to the first dyeing time and the corresponding first preset weight and the second dyeing time and the corresponding second preset weight; wherein the sum of the first preset weight and the second preset weight is equal to 1.
[0027] Optionally, the calculation formula for the preliminary dyeing time is:
[0028]
[0029] Among them, T1 is the initial staining time, T l is the first dyeing time predicted by the improved first machine learning model, T x The second dyeing time predicted by the second machine learning model.
[0030] Optionally, after determining the preliminary dyeing time according to the first dyeing time and the second dyeing time, the method further includes:
[0031] Determining a slot to be compensated according to the preliminary dyeing time and the historical dyeing time;
[0032] Obtaining the compensation rule corresponding to the slot to be compensated;
[0033] Compensating the initial dyeing time of the slot to be compensated according to the compensation rule to determine the final dyeing time;
[0034] The compensation rule is related to the soaking time, which is equal to the actual washing time of the tank to be compensated minus the set washing time.
[0035] According to another aspect of the present invention, there is provided a device for determining dyeing time in an anodic oxidation process, a parameter acquisition module for acquiring parameters influencing the dyeing time in an anodic oxidation dyeing process;
[0036] A model training module, configured to train the first machine learning algorithm and the second machine learning algorithm according to the influencing parameters to obtain a first machine learning model and a second machine learning model;
[0037] a first time determination module, configured to predict a first dyeing time according to the first machine learning model, and to predict a second dyeing time according to the second machine learning model;
[0038] A second time determination module is configured to determine a preliminary dyeing time according to the first dyeing time and the second dyeing time.
[0039] According to another aspect of the present invention, a method for controlling dyeing in an anodizing process is provided, comprising:
[0040] The anodic dyeing process in the anodic oxidation process is performed according to the dyeing time, and the dyeing time is determined by using any of the above-mentioned methods for determining the dyeing time in the anodic oxidation process.
[0041] The technical solution of the embodiment of the present invention first obtains the influencing parameters of the dyeing time in the anodizing dyeing process, and trains the first machine learning algorithm and the second machine learning algorithm according to the influencing parameters to obtain the first machine learning model and the second machine learning model, and then predicts the first dyeing time according to the first machine learning model, and predicts the second dyeing time according to the second machine learning model, and finally determines the preliminary dyeing time according to the first dyeing time and the human dyeing time. The embodiment of the present invention uses the first machine learning model and the second machine learning model to jointly predict the dyeing time of the aluminum alloy in the anodizing process, so that the obtained dyeing time is more accurate, and then realizes the precise control of the product dyeing time in the anodizing process, improves the accuracy of product coloring, improves the quality of the product, makes up for the shortcomings of the traditional reliance on manual experience judgment, and realizes fully automatic control of the dyeing time, improves production efficiency, and reduces labor costs.
[0042] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 A flow chart of a method for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention;
[0045] Figure 2 A flow chart of another method for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention;
[0046] Figure 3 A flow chart of another method for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention;
[0047] Figure 4 A schematic diagram of the ranking of the degree of influence on dyeing time under the Random Forest algorithm provided in an embodiment of the present invention;
[0048] Figure 5 A schematic diagram of the ranking of the degree of influence on dyeing time under the RFE algorithm provided in an embodiment of the present invention;
[0049] Figure 6 A schematic diagram showing the ranking of the degree of influence on dyeing time under the Variance Threshold algorithm provided in an embodiment of the present invention;
[0050] Figure 7 A schematic diagram showing the ranking of the degree of influence on dyeing time using the Correlation Coefficient algorithm provided in an embodiment of the present invention;
[0051] Figure 8 Schematic diagram of the frequency of occurrence of anodizing process related information under the above four algorithms;
[0052] Figure 9 A flow chart of another method for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention;
[0053] Figure 10 A flow chart of another method for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention;
[0054] Figure 11 This is a schematic structural diagram of a device for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0056] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0057] Figure 1 This is a flowchart of a method for determining the dyeing time in an anodizing process, provided in an embodiment of the present invention. This embodiment of the present invention is applicable to determining the dyeing time in an anodizing process for aluminum alloys. This method can be performed by a device for determining the dyeing time in an anodizing process, which can be implemented in hardware and / or software.
[0058] like Figure 1 As shown, the method for determining the dyeing time in the anodizing process provided by the embodiment of the present invention includes:
[0059] S110, obtaining parameters influencing dyeing time in an anodic oxidation dyeing process.
[0060] Specifically, the aluminum alloy anodizing process involves placing the aluminum alloy in an electrolytic cell, with the aluminum alloy acting as the anode. A certain voltage and current are applied to oxidize the aluminum alloy, forming an oxide layer. The oxidized aluminum alloy is then washed in a water washing tank. Finally, the washed and dried aluminum alloy is placed in a dyeing tank for dyeing. Before dyeing the aluminum alloy oxide layer, it is necessary to first determine the various parameters that influence the dyeing time during the anodizing process.
[0061] S120. Train the first machine learning algorithm and the second machine learning algorithm according to the influencing parameters to obtain a first machine learning model and a second machine learning model.
[0062] Specifically, after obtaining multiple influencing parameters that affect the dyeing time of aluminum alloy in the anodizing dyeing process, it is necessary to train the first machine learning algorithm and the second machine learning algorithm respectively according to the multiple influencing parameters that affect the dyeing time, and then obtain the first machine learning model and the second machine learning model. Among them, the first machine learning algorithm can be an LSTM algorithm, and the second machine learning algorithm can be an XGBoost algorithm. The LSTM algorithm is a special time-recurrent neural network. Its core is to introduce cell states and three gate structures, namely, a forget gate, an input gate, and an output gate. By finely controlling the flow of information, it can achieve effective learning of long-term dependencies, thereby alleviating the gradient vanishing and gradient explosion problems of traditional RNN when processing long sequences. Before training the LSTM algorithm, it is necessary to first obtain a data set and multiple influencing parameters that affect the dyeing time. Then it is necessary to select a deep learning framework and build an LSTM network. Then, it is necessary to set the training parameters and configure each parameter in the LSTM algorithm. The parameter configuration of the LSTM algorithm is shown in Table (1). Finally, the influencing parameters are input into the model for training.
[0063] Table (1): Parameter configuration of LSTM algorithm
[0064]
[0065]
[0066] Among them, the XGBoost algorithm is the first efficient machine learning algorithm based on the gradient boosting framework, which is widely used in classification, regression and ranking tasks of structured data. Its core is to gradually correct the errors of the previous model by integrating multiple weak learners (decision trees) and finally generate a strong prediction model. The first step in training the XGBoost algorithm is to divide the obtained influencing parameters, then select the loss function and the configuration parameters of XGBoost. The configuration parameters include the maximum depth of the tree, the learning rate, the regularization parameter, etc. Among them, the parameter configuration of the XGBoost algorithm is shown in Table (2). Finally, the initialization model is determined and training is performed according to the influencing parameters.
[0067] Table (2): Parameter configuration of XGBoost algorithm
[0068]
[0069]
[0070] S130. Predicting a first dyeing time based on the first machine learning model, and predicting a second dyeing time based on the second machine learning model.
[0071] Specifically, after the first and second machine learning models are trained and evaluated, predictions can be made based on the first machine learning model. The trained first machine learning model is used to make predictions on a test set, and the parameter features of the test set are input into the first machine learning model to obtain a first dyeing time in the aluminum alloy anodizing process. The trained second machine learning model is then used to make predictions on the test set, and the parameter features of the test set are input into the second machine learning model to determine a second dyeing time in the aluminum alloy anodizing process.
[0072] S140: Determine a preliminary dyeing time according to the first dyeing time and the second dyeing time.
[0073] Specifically, after the first dyeing time is predicted according to the first machine learning model and the second dyeing time is predicted according to the second machine learning model, the preliminary dyeing time of the aluminum alloy in the anodizing process can be calculated according to the first dyeing time, the second dyeing time and the corresponding weighted values. In some embodiments, the preliminary dyeing time in the anodizing process can be determined based on the first dyeing time and the corresponding weighted value and the second dyeing time and the corresponding weighted value. In other embodiments, when the first dyeing time differs greatly from the second dyeing time, for example, when the difference between the first dyeing time and the second dyeing time is greater than a set threshold, it means that the error of one of the dyeing times is large, and based on the historical dyeing time, the one of the first dyeing time and the second dyeing time that is closer to the historical dyeing time can be used as the preliminary dyeing time.
[0074] It should be noted that in other optional embodiments of the present invention, more machine learning algorithms can be trained according to the influencing parameters to obtain more machine learning models, and then the preliminary dyeing time can be determined based on the dyeing times predicted by the more machine learning models.
[0075] The embodiment of the present invention provides a method for determining the dyeing time in an anodizing process. First, an influencing parameter of the dyeing time in the anodizing dyeing process is obtained. A first machine learning algorithm and a second machine learning algorithm are trained according to the influencing parameters to obtain a first machine learning model and a second machine learning model. Then, a first dyeing time is predicted according to the first machine learning model, and a second dyeing time is predicted according to the second machine learning model. Finally, a preliminary dyeing time is determined according to the first dyeing time and the human dyeing time. The embodiment of the present invention uses an LSTM model and an XGBoost model to jointly predict the dyeing time of an aluminum alloy in an anodizing process, so that the obtained dyeing time is more accurate, thereby achieving precise control of the product dyeing time in the anodizing process, improving the accuracy of product coloring, and improving the quality of the product. This makes up for the shortcomings of the traditional method of relying on manual experience and judgment, improves production efficiency, and reduces labor costs.
[0076] Optional, Figure 2 Flowchart of another method for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention. Figure 2 , the method for determining the dyeing time in the anodizing process includes:
[0077] S210: Acquire multiple historical data features in the anodizing process.
[0078] Specifically, in the process of obtaining the influencing parameters of the dyeing time in the anodizing dyeing process, it is necessary to first obtain multiple historical data features in the anodizing process, and all raw material information of each rod material and relevant data of all slots on the anodizing production line within at least one year can be collected. Among them, each historical data feature includes information related to the anodizing process and the corresponding historical dyeing time. The information related to the oxidation process may include raw material information and relevant data of the anodizing production line slots. The historical dyeing time is the corresponding dyeing time under the information related to the anodizing process. The raw material information may include the composition of the aluminum alloy, the type of aluminum alloy, and information provided by the aluminum alloy manufacturer, etc. The relevant data of the anodizing production line slots may include the pH, temperature, composition, concentration and other data of the dyeing tank.
[0079] S220. Determine, based on at least two influencing factor analysis methods, information related to the anodizing process that affects the dyeing time under each influencing factor analysis method.
[0080] Specifically, after obtaining multiple historical data features in the anodizing process, the anodizing process-related information that affects the dyeing time under each influencing factor analysis method is determined according to multiple influencing factor analysis methods. Among them, the influencing factor analysis methods include but are not limited to four analysis methods: Random Forest, Recursive Feature Elimination (RFE), Variance Threshold, and Correlation Coefficient. Optionally, the above four influencing factor analysis methods are used to determine the anodizing process-related information that has a greater impact on the dyeing time.
[0081] S230. Determine influencing parameters based on information related to the anodizing process that affects the dyeing time using at least two influencing factor analysis methods.
[0082] Specifically, after determining the anodizing process-related information that has a greater impact on the dyeing time based on multiple influencing factor analysis methods, the anodizing process-related information under each influencing factor analysis method can be summarized according to the degree of influence of the anodizing process-related information under each influencing factor analysis method to determine the influencing parameters of the dyeing time in the anodizing dyeing process.
[0083] S240. Train the first machine learning algorithm and the second machine learning algorithm according to the influencing parameters to obtain a first machine learning model and a second machine learning model.
[0084] S250. Predicting a first dyeing time based on the first machine learning model, and predicting a second dyeing time based on the second machine learning model.
[0085] S260: Determine a preliminary dyeing time according to the first dyeing time and the second dyeing time.
[0086] Optional, Figure 3 A flowchart of another method for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention, Figure 4 This is a schematic diagram of the ranking of the degree of influence on dyeing time under the Random Forest algorithm provided by an embodiment of the present invention. Figure 5 This is a schematic diagram of the ranking of the degree of influence on dyeing time under the RFE algorithm provided in an embodiment of the present invention. Figure 6 This is a schematic diagram of the ranking of the degree of influence on dyeing time under the Variance Threshold algorithm provided in an embodiment of the present invention. Figure 7 This is a schematic diagram of the ranking of the degree of influence on dyeing time under the Correlation Coefficient algorithm provided in an embodiment of the present invention. Figure 8 Schematic diagram of the frequency of occurrence of information related to the anodizing process under the above four algorithms. Figure 3-Figure 8 , the method for determining the dyeing time in the anodizing process includes:
[0087] S310: Acquire multiple historical data features in the anodizing process.
[0088] S320. Determine, based on at least two influencing factor analysis methods, the ranking of the degree of influence of the anodizing process-related information affecting the dyeing time under each influencing factor analysis method.
[0089] Specifically, after obtaining all the raw material information of the material and the relevant data of all the slots on the anodizing production line, a variety of influencing factor analysis methods are used to rank the degree of influence of different data features on the dyeing time, and different influencing factor analysis methods are used to rank the dyeing time for different data features. The influencing factor analysis methods that can be used include Random Forest, RFE, Variance Threshold, and Correlation Coefficient. For example, the Random Forest algorithm is used to rank the degree of influence of different data features on the dyeing time. Figure 4 As shown, the RFE algorithm is used to rank the degree of influence of different data features on the staining time. Figure 5 As shown in the figure, the Variance Threshold algorithm is used to rank the degree of influence of different data features on the staining time. Figure 6 As shown, the Correlation Coefficient algorithm is used to rank the degree of influence of different data features on the staining time. Figure 7 shown.
[0090] S330. Selecting a preset number of anodizing process related information influencing the dyeing time under each influencing factor analysis method according to the order of the influence of the anodizing process related information.
[0091] Specifically, after obtaining the ranking of the degree of influence on the dyeing time under each influencing factor analysis method, a preset number of anodizing process related information with the highest degree of influence is selected according to the ranking of the degree of influence under different influencing factor analysis methods, and the frequency of occurrence of different anodizing process related information under the four influencing factor analysis methods is counted. Among them, the preset number is also set according to actual needs, and the embodiment of the present invention does not make specific restrictions on this. For example, under the RandomForest algorithm, the 10 anodizing process related information with the highest degree of influence are selected, under the RFE algorithm, the 10 anodizing process related information with the highest degree of influence are selected, under the Variance Threshold algorithm, the 10 anodizing process related information with the highest degree of influence are selected, and under the Correlation Coefficient algorithm, the 10 anodizing process related information with the highest degree of influence are selected. The top 10 anodizing process related information under different algorithms are summarized, such as Figure 8 As shown, the information is sorted according to the frequency of occurrence, and the information related to the anodizing process that appears more frequently is placed in the front. The more frequently it appears, the higher the ranking of the information related to the anodizing process.
[0092] S340: Receive input of setting factors affecting dyeing time of anodizing process.
[0093] Specifically, after obtaining information related to the anodizing process with a greater degree of influence under multiple influencing factor analysis methods, in order to further improve the control accuracy of the dyeing time, it is also necessary to combine the actual production experience of technical personnel and production personnel and the technical conditions in the production process, and additionally select setting factors that have a greater impact on the dyeing time. That is, the input setting factors can be the actual production experience of technical personnel and production personnel and the technical conditions in the production process.
[0094] S350. Determine the set factors and information related to the anodizing process that affects the dyeing time under at least two influencing factor analysis methods as influencing factors.
[0095] Specifically, after the technicians select additional setting factors and select the anodizing process-related information that has a greater impact on the dyeing time based on the multiple influencing factor analysis method, the setting factors selected by the technicians and the anodizing process-related information selected by the multiple influencing factor analysis method are jointly determined as the influencing factors affecting the dyeing time in the aluminum alloy anodizing process.
[0096] S360. Train the first machine learning algorithm and the second machine learning algorithm according to the influencing parameters to obtain an LSTM model and an XGBoost model.
[0097] S370. Predict a first dyeing time based on the first machine learning model, and predict a second dyeing time based on the second machine learning model.
[0098] S380: Determine a preliminary dyeing time according to the first dyeing time and the second dyeing time.
[0099] The method for determining dyeing time in an anodizing process, provided by the present invention, uses multiple influencing factor analysis methods and the production experience of experienced technicians to select factors that have a significant impact on dyeing time. Based on these factors, the initial dyeing time in the anodizing process is determined. This method not only improves the precise control of the dyeing process and the accuracy of product coloring, thereby enhancing product quality, but also avoids the problem of single dyeing time determination methods with low accuracy, reduces labor costs, and improves production efficiency.
[0100] Optionally, the first machine learning algorithm is an LSTM algorithm, and the second machine learning algorithm is an XGBoost algorithm; in the process of training the first machine learning algorithm according to the influencing parameters, an improved forgetting gate function is used, and the improved forgetting gate function is equal to the product of a preset original forgetting gate function and a preset modulation term, wherein the output range of the preset modulation term is [-1,1].
[0101] Specifically, during the LSTM algorithm training process, training is performed based on an improved forget gate function. In traditional LSTM algorithms, the forget gate function is usually activated by a sigmoid function, and its output value ranges from 0 to 1. The improved forget gate function is based on the original forget gate function, multiplied by a preset modulation term to form a finer-grained control. The original forget gate function first gives a coarse-grained retention ratio, and then the tanh modulation term is used to further scale or correct this part of the information for finer-grained control.
[0102] The improved forget gate function formula is:
[0103] f t =σ(W f [h t-1 , x t ]+b f )⊙tanh(U f [h t-1 , x t ]+c f );
[0104] Among them, f t is the improved forget gate function, ⊙ represents element-by-element multiplication, W f is the weight of the original forget gate function, b f is the bias of the original forget gate function, U f is the weight of the tanh function, c f is the bias of the tanh function, h t-1 is the hidden state at the previous moment, x t The input at the current moment.
[0105] The method for determining the dyeing time in an anodizing process provided by the present invention adopts an improved forget gate function. By adding a tanh modulation term, the forget gate can perform more fine-grained control over information retention / discarding, thereby improving the stability of the LSTM model and enabling the LSTM to capture more complex sequence patterns. This can significantly enhance the performance and adaptability of the model, making it more efficient and accurate in processing long sequence data, thereby improving the accuracy of determining the dyeing time.
[0106] Optional, Figure 9 A flowchart of another method for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention is shown in FIG. Figure 9 , the method for determining the dyeing time in the anodizing process includes:
[0107] S410: Obtain parameters influencing dyeing time in an anodic oxidation dyeing process.
[0108] S420. Train the first machine learning algorithm and the second machine learning algorithm according to the influencing parameters to obtain a first machine learning model and a second machine learning model.
[0109] S430. Predicting a first dyeing time based on the first machine learning model, and predicting a second dyeing time based on the second machine learning model.
[0110] S440 : Determine a preliminary dyeing time according to the first dyeing time and the corresponding first preset weight and the second dyeing time and the corresponding second preset weight.
[0111] Specifically, after predicting the first dyeing time using the LSTM model and the second dyeing time using the XGBoost model, it is necessary to obtain the weight of the first dyeing time and the weight of the second dyeing time. A preliminary dyeing time is determined based on the first dyeing time and its corresponding first preset weight, and the second dyeing time and its corresponding second preset weight. The sum of the first preset weight and the second preset weight is equal to 1. The first preset weight and the second preset weight can be obtained through experiments and simulations, and this is not specifically limited in this embodiment of the present invention.
[0112] Among them, the initial dyeing time can be calculated using the following formula:
[0113]
[0114] Among them, T1 is the initial staining time, T l is the first dyeing time predicted by the improved first machine learning model, T x The second dyeing time predicted by the first machine learning model.
[0115] Optional, Figure 10 A flowchart of another method for determining dyeing time in an anodic oxidation process provided by an embodiment of the present invention is shown in FIG. Figure 10 , the method for determining the dyeing time in the anodizing process includes:
[0116] S510: Obtain parameters influencing dyeing time in an anodic oxidation dyeing process.
[0117] S520. Train the first machine learning algorithm and the second machine learning algorithm according to the influencing parameters to obtain a first machine learning model and a second machine learning model.
[0118] S530. Predict a first dyeing time according to the first machine learning model, and predict a second dyeing time according to the second machine learning model.
[0119] S540 : Determine a preliminary dyeing time according to the first dyeing time and the corresponding first preset weight and the second dyeing time and the corresponding second preset weight.
[0120] S550: Determine the slot to be compensated according to the initial dyeing time and the historical dyeing time.
[0121] Specifically, an anodizing production line may include multiple washing tanks and multiple dyeing tanks. During the anodizing process, the raw materials are dyed in the dyeing tanks. Prior to dyeing, the raw materials must be washed in the washing tanks. The initial dyeing times corresponding to different dyeing tanks may be equal or unequal. After determining the initial dyeing time based on the first dyeing time and its corresponding first preset weight, the initial dyeing time for the same dyeing tank is compared with the historical dyeing time. This may reveal inaccuracies in the initial dyeing time prediction for some tanks. The historical dyeing time may be the actual dyeing time required for the anodizing process, as recorded in the dyeing tank prior to the current time. A Pareto chart analysis revealed that approximately 94% of abnormal predictions are caused by material bubbling in the washing tank, i.e., due to a wash timeout. This abnormal initial dyeing time may be caused by aluminum alloy bubbling in the washing tank. Therefore, compensation for the initial dyeing time is applied. The dyeing tanks requiring compensation can be determined based on the initial dyeing time and historical dyeing time. For example, a dyeing slot corresponding to a preliminary dyeing time that is inconsistent with a historical dyeing time is determined as a slot to be compensated.
[0122] S560: Obtain the compensation rule corresponding to the slot to be compensated.
[0123] Specifically, after obtaining the slot to be compensated that needs to be compensated, it is also necessary to obtain the compensation rules for the slot to be compensated. Different slots to be compensated may correspond to the same or different washing tanks. Different washing tanks have different compensation rules for the slots to be compensated. The slot to be compensated corresponding to the washing tank is the dyeing tank that the raw materials need to enter after being washed in the washing tank. The compensation rules are related to the soaking time, which is equal to the actual washing time of the slot to be compensated minus the set washing time. The compensation rules for different washing tanks are shown in Table (3).
[0124] Table (3): Compensation rules for different washing tanks
[0125]
[0126] S570: Compensate the initial dyeing time of the slot to be compensated according to the compensation rule to determine the final dyeing time.
[0127] Specifically, after determining the compensation rule for the slot to be compensated, the initial dyeing time of the slot to be compensated is compensated according to the compensation rule, and the final dyeing time is then determined. For example, if the slot to be compensated is washed in water tank No. 63, and the actual washing time is 50 seconds, then the soaking time is 10 seconds. Then, the final dyeing time corresponding to the slot to be compensated is the initial dyeing time minus 5 seconds. If the slot to be compensated is washed in water tank No. 77, and the actual washing time is 40 seconds, then the soaking time is 15 seconds. Then, the final dyeing time corresponding to the slot to be compensated is the initial dyeing time plus 10 seconds.
[0128] The method for determining the dyeing time in the anodizing process provided by the present invention determines the soaking time according to the actual water washing time and the preset water washing time, and determines the compensation rule of the preliminary dyeing time according to the soaking time, thereby further improving the accuracy of the dyeing time, enhancing the quality of the product, and improving the accuracy of the anodizing dyeing process.
[0129] An embodiment of the present invention further provides a device for determining dyeing time in an anodic oxidation process. Figure 11 The schematic diagram of the structure of the device for determining the dyeing time in the anodizing process provided by the embodiment of the present invention. Figure 11 As shown, the dyeing time determination device 100 in the anodizing process includes:
[0130] Parameter acquisition module 10, for obtaining parameters affecting the dyeing time in the anodizing dyeing process.
[0131] The model training module 20 is used to train the first machine learning algorithm and the second machine learning algorithm according to the influencing parameters to obtain the first machine learning model and the second machine learning model.
[0132] The first time determination module 30 is used to predict the first dyeing time according to the first machine learning model, and to predict the second dyeing time according to the second machine learning model.
[0133] The second time determination module 40 is configured to determine a preliminary dyeing time according to the first dyeing time and the second dyeing time.
[0134] The device for determining the dyeing time in the anodizing process provided by the embodiment of the present invention obtains the influencing parameters of the dyeing time in the anodizing dyeing process through a parameter acquisition module, trains the LSTM algorithm and the XGBoost algorithm through a parameter training module to obtain the LSTM model and the XGBoost model, then predicts the first dyeing time and the second dyeing time through a first time determination module, and finally obtains the preliminary dyeing time through a second time determination module, thereby realizing fully automatic control of the dyeing time, improving the precise control of the product dyeing process and the accuracy of product coloring, improving the quality of the product, making up for the shortcomings of the traditional reliance on manual experience judgment, improving production efficiency, and reducing labor costs.
[0135] The device for determining the dyeing time in an anodic oxidation process provided by an embodiment of the present invention can execute the method for determining the dyeing time in an anodic oxidation process provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0136] An embodiment of the present invention also provides a dyeing control method in an anodizing process, comprising: performing an anodizing dyeing process in the anodizing process according to a dyeing time, wherein the dyeing time is determined using the dyeing time determination method in an anodizing process provided in any of the above embodiments, and has the corresponding beneficial effects of executing the dyeing time determination method in an anodizing process.
[0137] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for determining dyeing time in an anodizing process, characterized in that: include: Obtain the parameters affecting dyeing time in the anodizing dyeing process; Training the first machine learning algorithm and the second machine learning algorithm respectively according to the influencing parameters to obtain a first machine learning model and a second machine learning model; Predicting a first dyeing time according to the first machine learning model, and predicting a second dyeing time according to the second machine learning model; A preliminary staining time is determined according to the first staining time and the second staining time.
2. The method for determining dyeing time in an anodic oxidation process according to claim 1, wherein: The method of obtaining the influencing parameters of the dyeing time in the anodizing dyeing process includes: Acquire multiple historical data features of the anodizing process; wherein each of the historical data features includes information related to the anodizing process and corresponding historical dyeing time, and the information related to the oxidation process includes raw material information and data related to slots of the anodizing production line; Determining, according to at least two influencing factor analysis methods, information related to the anodizing process that affects the dyeing time under each of the influencing factor analysis methods; The influencing parameters are determined according to information related to the anodizing process that affects the dyeing time under at least two of the influencing factor analysis methods.
3. The method for determining dyeing time in an anodic oxidation process according to claim 2, wherein: Determining, according to at least two influencing factor analysis methods, information related to the anodizing process that affects the dyeing time under each of the influencing factor analysis methods, including: Determining the order of the degree of influence of the anodizing process-related information affecting the dyeing time under each of the influencing factor analysis methods according to at least two of the influencing factor analysis methods; According to the ranking of the influence degree of the anodizing process related information, a preset number of the anodizing process related information affecting the dyeing time under each of the influencing factor analysis methods are selected.
4. The method for determining dyeing time in an anodic oxidation process according to claim 2, wherein: Determining the influencing parameters according to at least two of the anodizing process-related information that affects the dyeing time under the influencing factor analysis methods includes: Receive input of setting factors that affect the dyeing time of the anodizing process; The setting factors and at least two pieces of information related to the anodizing process that affect the dyeing time under the influencing factor analysis methods are determined as the influencing factors.
5. The method for determining dyeing time in an anodic oxidation process according to claim 1, wherein: The first machine learning algorithm is an LSTM algorithm, and the second machine learning algorithm is an XGBoost algorithm; in the process of training the first machine learning algorithm according to the influencing parameters, an improved forget gate function is adopted, wherein the improved forget gate function is equal to the product of a preset original forget gate function and a preset modulation term, wherein the output range of the preset modulation term is [-1, 1]; The improved forget gate function formula is: f t =σ(W f [h t-1 ,x t ]+b f )⊙tanh(U f [h t-1 ,x t ]+c f ); Among them, f t is the improved forget gate function, ⊙ represents element-by-element multiplication, W f is the weight of the original forget gate function, b f is the bias of the original forget gate function, U f is the weight of the tanh function, c f is the bias of the tanh function, h t-1 is the hidden state at the previous moment, x t The input at the current moment.
6. The method for determining dyeing time in an anodic oxidation process according to claim 1, wherein: Determining a preliminary dyeing time according to the first dyeing time and the second dyeing time includes: The preliminary dyeing time is determined according to the first dyeing time and the corresponding first preset weight and the second dyeing time and the corresponding second preset weight; wherein the sum of the first preset weight and the second preset weight is equal to 1.
7. The method for determining dyeing time in an anodic oxidation process according to claim 6, wherein: The calculation formula for the preliminary dyeing time is: Among them, T1 is the initial staining time, T l is the first dyeing time predicted by the improved first machine learning model, T x The second dyeing time predicted by the second machine learning model.
8. The method for determining dyeing time in an anodic oxidation process according to claim 2, wherein: After determining a preliminary dyeing time according to the first dyeing time and the second dyeing time, the method further includes: Determining a slot to be compensated according to the preliminary dyeing time and the historical dyeing time; Obtaining the compensation rule corresponding to the slot to be compensated; Compensating the initial dyeing time of the slot to be compensated according to the compensation rule to determine the final dyeing time; The compensation rule is related to the soaking time, which is equal to the actual washing time of the tank to be compensated minus the set washing time.
9. A device for determining dyeing time in an anodic oxidation process, characterized in that: include: Parameter acquisition module, used to obtain the influencing parameters of dyeing time in the anodizing dyeing process; A model training module, configured to train the first machine learning algorithm and the second machine learning algorithm according to the influencing parameters to obtain a first machine learning model and a second machine learning model; a first time determination module, configured to predict a first dyeing time according to the first machine learning model, and to predict a second dyeing time according to the second machine learning model; A second time determination module is configured to determine a preliminary dyeing time according to the first dyeing time and the second dyeing time.
10. A method for controlling dyeing in an anodic oxidation process, characterized in that: include: The anodic dyeing process in the anodic oxidation process is performed according to the dyeing time, and the dyeing time is determined by the method for determining the dyeing time in the anodic oxidation process according to any one of claims 1 to 8.