Intelligent paint degradation prediction method based on LSTM neural network
Through the intelligent prediction method of coating degradation based on LSTM neural network, the content prediction of metal elements in the coating is dynamically adjusted, and the peak offset problem caused by metal oxidation degradation is solved, and the accuracy and prediction accuracy of coating protection life evaluation are improved.
Patent Information
- Application Number
- CN202510807471.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-06-17
AI Technical Summary
In the process of X-ray fluorescence spectroscopy to analyze the metal pigment content of coatings, the peak position shifts caused by the oxidation and degradation of metal elements, which leads to deviations in the metal element content estimates, which affects the coating performance evaluation and service life prediction.
The intelligent prediction method of coating degradation based on LSTM neural network is adopted. By collecting initial spectral data and dynamic feature data, an LSTM neural network model is constructed, and the predicted content value is evaluated using iterative optimization algorithm and error redundant value range, the spectral peak displacement is dynamically adjusted, and the metal content prediction accuracy is improved.
It effectively avoids deviations caused by fixed peak positions, improves the accuracy of metal content prediction and the accuracy of coating protection life evaluation, and reduces maintenance risks and costs caused by misjudgment.
Smart Images

Figure CN120340667A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of coatings, and specifically relates to an intelligent prediction method for coating degradation based on an LSTM neural network. Background Art
[0002] In various fields of industrial anti-corrosion, building protection, traffic signs, and marine protection, metal-based coatings are widely used in protective coatings, functional coatings, and decorative coatings. Among them, to enhance the corrosion resistance, reflectivity, or coloring property of the coating, various metal or metal oxide pigments are usually incorporated, such as zinc, iron, aluminum, titanium, copper, etc. The content of these metal pigments in the coating directly determines its protective effect and service life. Coating degradation refers to the process in which the physical and chemical properties of the coating degrade over time under the action of environmental stresses such as temperature, humidity, and ultraviolet rays. X-ray fluorescence spectroscopy (XRF) realizes qualitative and quantitative analysis of elements by detecting the characteristic X-rays emitted by the excited material; among them, the peak separation algorithm is a conventional processing step for the core data of X-ray fluorescence spectroscopy, which is used to analyze overlapping spectral peaks. Since the actually measured XRF spectrum often has multiple spectral peaks overlapping and accompanied by background radiation and noise interference, it is difficult to complete accurate analysis through simple peak identification. At this time, it is necessary to use the peak separation algorithm to perform mathematical modeling and fitting on the spectrum to achieve the separation and quantification of overlapping peaks. The traditional peak separation algorithm processing process mainly includes multiple processes such as removing background radiation, characteristic peak detection, and overlapping peak decomposition performed sequentially.
[0003] During the coating degradation process, metal pigments (such as zinc and iron) may undergo oxidative degradation, which will cause a dynamic shift in the energy position of the characteristic peaks of the X-ray fluorescence spectrum on the coating. The peak separation algorithm presets fixed peak position parameters, and the peak position shifts towards the low-energy end due to metal oxidation. At this time, the existing peak separation algorithms in the prior art usually still fit according to the initial peak position, resulting in the uncorrect integration of the shifted peak, leading to an underestimation of the content of metal pigments, and thus causing an incorrect calculation of the peak area. For example, after zinc undergoes oxidative degradation, the traditional algorithm, due to the fixed peak position parameters, miscounts the shifted peak area part into the adjacent peak or the background noise, resulting in an underestimation of the zinc content; and zinc is used as a sacrificial anode, and the underestimation of its actual content will cause users to misjudge that the coating still has a protective ability, resulting in a higher predicted service life of the coating layer, and thus leading to a higher estimated result of the coating protection life, increasing the damage risk of the target maintenance facility and the facility maintenance cost. Summary of the Invention
[0004] The present invention provides an intelligent prediction method for coating degradation based on an LSTM neural network, which solves the problem that in the process of analyzing the metal pigment content of coatings by the existing peak separation algorithm in X-ray fluorescence spectroscopy, the peak position shifts due to the oxidative degradation of metal elements, and thus the estimation of metal element content is prone to deviation.
[0005] The present invention is achieved through the following technical solutions: An intelligent prediction method for coating degradation based on LSTM neural network, the method comprising: Step S1: collecting initial spectral data including time stamps for metal detection for target coatings, performing peak detection on the initial spectral data using an initial peak separation method, and generating an initial content value representing the initial detected metal content in the target coatings; Step S2: monitoring and collecting dynamic characteristic data of oxidation degradation of target metal elements in the target coating, constructing a neural network model based on LSTM, and setting the dynamic characteristic data as an iteration constraint condition for iteration of the neural network model; Step S3: inputting the initial content value as an input value into the neural network model, predicting and iterating the initial content value based on the iteration constraint condition, and marking the output value finally generated as the predicted content value representing the predicted metal content in the target coating; Step S4: Set the error redundancy value range, use the mean square error method to evaluate the authenticity of the predicted content value, and when the predicted content value is within the error redundancy value range, mark the predicted content value as the true value of the final detected metal content. When the predicted content value is outside the error redundancy value range, return to execute step S2.
[0006] During the degradation of the coating, the metallic pigment may be oxidatively degraded, which will cause a dynamic shift in the energy position of the characteristic peak of the X-ray fluorescence spectrum on the coating. The peak separation algorithm presets fixed peak position parameters, and metal oxidation causes the peak position to shift to the low-energy end. At this time, the peak position algorithm in the prior art will usually still fit according to the initial peak position, resulting in the peak after the shift not being correctly integrated, resulting in an underestimated content of the metallic pigment, which leads to a miscalculation of the peak area, causing the user to misjudge that the coating still has protective capabilities, and the predicted service life of the coating layer is too high, which leads to a high estimate of the protective life of the coating, increasing the damage risk of the target maintenance facility and the maintenance cost of the facility. Based on this, the present invention provides a coating degradation intelligent prediction method based on an LSTM neural network to solve the problem that the existing peak separation algorithm, in the process of analyzing the metallic pigment content of the coating by X-ray fluorescence spectroscopy, causes the peak position to shift due to the oxidation and degradation of the metal element, which in turn causes the metal element content estimation to be prone to deviation.
[0007] Furthermore, the dynamic characteristic data includes a peak shift value, a humidity change value and an ultraviolet radiation value; the peak shift value is used to quantify the X-ray fluorescence spectrum energy shift caused by metal oxidation per unit time, the humidity change value represents the change in the humidity value of the target metal element per unit time, and the ultraviolet radiation value represents the total cumulative ultraviolet exposure of the target coating per unit time; a dynamic threshold is set separately for each item of dynamic characteristic data, and the dynamic characteristic data whose value reaches above the dynamic threshold is marked as valid dynamic data.
[0008] Further, the neural network model includes an input encoding layer, an LSTM iterative layer, and a fully connected output layer; the construction content of the neural network model includes: The input encoding layer receives the initial content value and effective dynamic data through normalization preprocessing, performs fully connected encoding on the initial content value, performs time embedding encoding on the effective dynamic data, and transmits both the initial content value and the effective dynamic data to the LSTM iterative layer in vector form; The LSTM iterative layer includes a bidirectional LSTM layer and an iterative prediction layer. The bidirectional LSTM layer is used to receive the initial content value to complete the splicing of the forward and backward hidden states of the initial content value and then transmit the initial content value to the iterative prediction layer. The iterative optimization algorithm is used to iteratively process the initial content value based on the effective dynamic data and then transmit the iterative result to the fully connected output layer; The fully connected output layer repairs the high-dimensional features of the iterative result to the target dimension through mapping compression, performs denormalization processing on the iterative result, and then labels the generated data as the predicted content value and outputs the predicted content value from the neural network model.
[0009] Further, the process of the iterative optimization method for iteratively processing the initial content value includes: Step A1: Referring to the form of the initial content value, randomly initialize and generate a genetic population containing a number of individuals. Each genetic population contains multiple individuals, and each individual represents a set of candidate predicted content values consistent with the form of the initial content value; Step A2: Preset the number of iterations. In each iteration process, all individuals in each genetic population are iteratively reproduced through random cross-calculation, and a perturbation parameter representing mutant reproduction is randomly added to each pair of reproduced paired individuals; Step A3: Use the effective dynamic data to construct a fitness function, set a dynamic fitness score threshold for the fitness function, use the fitness function to evaluate the fitness scores of the population, and screen out all individuals that reach above the fitness score threshold; Step A4: Perform fitness score screening after each iteration. When the last iteration is completed, select the individual with the highest fitness score screened out as the optimal solution of the initial content value, output the optimal solution, and label it as the predicted content value.
[0010] Further, the construction content of the fitness function includes: Let the fitness function be expressed as F, the individual be expressed as C, and the individual ordinal number be expressed as i. Then the construction form of the fitness function F is expressed as: , where the Er represents the peak position offset value, the Pe represents the humidity change value, and the Qy represents the ultraviolet radiation value; where α, β, and γ represent fitness weight parameters corresponding to the effective dynamic data, and D Penal represents a penalty constraint term for preventing abnormal numerical change rates.
[0011] Furthermore, the setting method of the dynamic fitness score threshold includes: The fitness score threshold includes a maximum threshold T max representing the threshold value range and a minimum threshold T min . Let the total number of iterations be represented as M, the iteration ordinal number be represented as k, and the fitness score threshold of the current iteration number be represented as T k . Then the calculation formula of the fitness score threshold T k is expressed as: .
[0012] Furthermore, the perturbation parameter is set as a dynamic negative feedback perturbation term, and different negative feedback perturbation terms are correspondingly set for different metal elements; the ultraviolet radiation value and the humidity change value are both set to be positively correlated with the perturbation parameter.
[0013] Furthermore, the negative feedback perturbation term is represented as σ, then the calculation formula of the negative feedback perturbation term σ is expressed as: . where Pe represents the humidity change value, Qy represents the ultraviolet radiation value, σ0 represents the initial perturbation term without external dynamic influence, λ1 represents the first perturbation parameter of the influence of the humidity change amplitude on the perturbation amplitude, and λ2 represents the second perturbation parameter of the influence of the ultraviolet accumulation amount on the perturbation amplitude.
[0014] Furthermore, the confidence interval is used to represent the error redundancy value range, and its content includes: The confidence interval is set as CI, the predicted content value is represented as y, the standard deviation of the predicted content value is represented as ω, and the confidence coefficient under the standard normal distribution is set as Z. Then the error redundancy value range is represented by the confidence interval CI as: .
[0015] Furthermore, the confidence level of the confidence coefficient is set between 90% and 99%.
[0016] Compared with the prior art, the present invention has the following advantages and beneficial effects: 1. The present invention sets up an LSTM neural network model, taking the dynamic characteristics of the oxidation degradation of metal elements as input conditions, enabling the model to adaptively identify and correct the displacement of spectral peaks, thereby improving the accuracy of peak position fitting. This dynamic adjustment ability effectively avoids the deviation caused by fixed peak positions and can accurately capture the change trend of metal content; 2. The present invention uses the error redundancy value range and mean square error evaluation mechanism to evaluate the output of the model in real time during the prediction process. This feedback mechanism can not only improve the prediction accuracy of metal content, but also ensure the accuracy and reliability of the prediction results when encountering unexpected degradation changes such as extreme metal oxidation rates, avoiding the limitations that may not be automatically adjusted in traditional methods; 3. The present invention uses precise prediction iteration and dynamic feature modeling in the neural network model, which can continuously learn the change laws under different degradation environments during the training process, effectively avoiding the underestimation or overestimation of metal element content, thereby improving the accuracy of coating protection life evaluation and reducing the maintenance risks and costs caused by misjudgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, form a part of this application, and do not limit the embodiments of the present invention. In the drawings: Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] To make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in combination with the embodiments and the drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and do not limit the present invention.
[0019] Embodiment 1, as Figure 1 shown, this embodiment is an intelligent prediction method for coating degradation based on an LSTM neural network, and the method includes: Step S1: Collect initial spectral data including time stamps for metal detection for the target coating, and use the initial peak splitting method to detect peaks in the initial spectral data to generate an initial content value representing the initial detected metal content in the target coating; Step S2: Monitor and collect dynamic characteristic data of the oxidation degradation of the target metal element in the target coating, construct an LSTM-based neural network model, and set the dynamic characteristic data as the iterative constraint condition for the neural network model to iterate; Step S3: Input the initial content value as the input value into the neural network model, perform prediction iteration on the initial content value based on the iterative constraint condition, and label the finally generated output value as the predicted content value representing the predicted metal content in the target coating; Step S4: Set the range of error redundancy values, and use the mean square error method to evaluate the authenticity of the predicted content value. When the predicted content value is within the range of error redundancy values, mark the predicted content value as the true value of the finally detected metal content. When the predicted content value is outside the range of error redundancy values, return to execute Step S2.
[0020] When the metal pigments in the coating are exposed to the environment for a long time, oxidation reactions are likely to occur. Metal oxidation can cause an energy shift in the characteristic peaks in the X-ray fluorescence spectrum, making it impossible for traditional peak separation algorithms to accurately identify the shifted spectral peaks, and there are likely to be deviations after content detection. This shift will lead to an incorrect estimation of the metal content, thus affecting the performance evaluation of the coating. X-ray fluorescence spectroscopy is a non-destructive analysis technique based on the characteristic energy spectrum presented when materials emit X-rays under excitation, and is widely used in qualitative and quantitative analysis of the elemental composition of materials. The initial peak separation method is the peak separation algorithm used for X-ray fluorescence spectra in existing conventional technologies. As a feasible specific application, the initial peak separation method can use peak separation algorithms such as the Voigt function fitting peak separation method, the Lorentz peak separation fitting method, the non-linear least squares fitting method, and the Raman spectrum peak decomposition algorithm. The initial spectral data refers to the spectral data of the coating sample obtained by X-ray fluorescence spectroscopy (XRF) technology before the coating undergoes obvious degradation. These data mainly include the peak positions, peak intensities, background noise, and timestamp information of metal elements, representing the metal composition and its concentration in the coating under normal conditions, and providing reference data for subsequent analysis of the changes during the metal oxidation degradation process. The use of the initial peak separation method to perform peak detection on the initial spectral data means extracting the characteristic peaks of metal elements from the complex spectrum. Each metal element has a specific fluorescence characteristic peak in the XRF spectrum, and its peak value corresponds to the characteristic X-ray energy of the element. The peak separation algorithm obtains the content of metal elements in the target coating through peak detection and fitting. For example, in a specific implementation, the characteristic peak position of zinc is detected, and the algorithm matches the area or intensity of the peak with a predetermined calibration curve to calculate the initial content of zinc.
[0021] The time stamp is used to record the time of data collection, so that the collected spectral data can be arranged and compared in chronological order. In actual applications, coatings will go through different usage cycles. Over time, the metal pigments in the coating may undergo oxidative degradation. By labeling each set of spectral data with a time stamp, the changing trend of metal elements can be tracked, thus better reflecting the degradation process of the coating. In a specific implementation, the dynamic feature data can also label discrete data points with time stamps for presentation in a time series manner. The meaning of the initial content value is the estimated content value of the metal element obtained by fitting using a conventional initial peak splitting method through X-ray fluorescence spectroscopy in the early stage of coating degradation or when no obvious degradation has occurred, representing the metal component content of the coating without the influence of oxidative environmental factors. In a specific implementation, since the number of metal elements for target processing is not unique, it may be one or multiple, resulting in the initial content value being either a single value or a set of data, which are all processed in vector form in the neural network model. The dynamic feature data represents a set of data that describes the coupled changes in the spectral response and environmental conditions exhibited by the metal during the coating degradation process. The LSTM neural network model refers to a long short-term memory neural network model, which is a variant of the recurrent neural network (RNN) used for processing and predicting time series data and can effectively capture long-term dependencies in sequential data. The predicted content value represents the speculative mass or concentration numerical estimation result of a certain metal element in the target coating at the current or future moment based on the LSTM neural network model with the introduction of dynamic feature data as an iterative constraint condition.
[0022] The error redundancy value range refers to a certain range of deviation or error allowed between the prediction result and the actual observation value, that is, the error redundancy value range is a tolerance standard for determining whether the prediction result is close enough to the actual value. Mean square error is a commonly used method to measure the error between the predicted value and the true value. By calculating the square of the difference between the predicted value and the actual value, it reflects the degree of deviation of the prediction result. When the authenticity evaluation of the prediction result is within the set error redundancy value range, it can be considered that the prediction result is valid and reasonable; conversely, if the authenticity evaluation exceeds the redundancy value range, it indicates that there is a large error in the prediction. At this time, the model needs to be corrected or retrained, and return to the iterative steps of the model to optimize the prediction.
[0023] Further, as a feasible implementation manner, the dynamic characteristic data includes a peak position offset value, a humidity change value, and an ultraviolet radiation value; the peak position offset value is used to quantify the energy offset of the X-ray fluorescence spectrum caused by metal oxidation per unit time, the humidity change value represents the change amount of the humidity value of the target metal element per unit time, and the ultraviolet radiation value represents the total amount of ultraviolet cumulative exposure of the target coating per unit time; dynamic thresholds are separately set for each item of dynamic characteristic data, and the dynamic characteristic data with a numerical value above the dynamic threshold is marked as valid dynamic data.
[0024] The meaning of the per unit time is the time interval period corresponding to one complete data collection and update operation, that is, the basic time window for the system to perform a single monitoring record of the data on the coating degradation state (such as the humidity, ultraviolet ray, peak position change, etc.). Each item of dynamic characteristic data is limited to a numerical value per unit time, which means that the dynamic characteristic data finally used in the neural network model is the coating degradation data collected within a single time interval period. The peak position offset value represents the change in the energy position of the characteristic spectral peak of the metal element during X-ray fluorescence spectrum analysis when affected by external factors. This change amount is used to quantify the spectral peak displacement caused by these factors and calculate the offset amplitude by comparing with the original, unaffected peak position. The offset is because the oxidation reaction changes the oxidation state and chemical environment of the metal, thus affecting the energy of its X-ray emission. Therefore, the magnitude of the peak position offset value can linearly reflect the degree of oxidation of the metal element in the current environment and the coating. The humidity change value represents the change amount of the relative humidity in the coating environment where the target metal element is located per unit time, used to quantify the fluctuation of the environmental humidity and reflect the influence of humidity on the metal oxidation during the coating degradation process. High humidity or drastic humidity changes are likely to exacerbate the oxidation process of metal pigments, especially easily oxidized metals such as zinc and iron. The larger the humidity change value, the more unstable the environment and the greater the potential impact on the metal content, and a higher attention weight should be given to the model. The ultraviolet radiation value represents the total amount of ultraviolet radiation energy received by the coating surface per unit time. The ultraviolet radiation value includes not only the radiation intensity but also the exposure time of ultraviolet rays, that is, the total amount of ultraviolet radiation received by the coating per unit time. It is often described by radiation energy and can be the total radiation energy per unit time. Ultraviolet radiation can promote photochemical reactions of chemical substances in the coating, resulting in metal oxidation, coating color change, structural damage, etc. Especially in an environment with strong ultraviolet radiation, the influence of ultraviolet rays significantly accelerates the coating degradation process, thereby affecting the protective effect of the coating.
[0025] The dynamic threshold of the dynamic feature data refers to the threshold used to determine and screen which feature data are of practical significance and can have an important impact on the neural network model in time series or environmental changes. It is used to judge which dynamic feature data have an actual impact on the neural network model of coating degradation, so as to exclude irrelevant minor fluctuations or noises and ensure that the data processed by the model is crucial and meaningful. In specific implementation, the dynamic threshold can be set by using an empirical rule combined with environmental conditions, such as adjusting it in combination with the humidity and ultraviolet intensity of the environment where the target coating is located; if it is in a conventional environment with low humidity and ultraviolet intensity, the standard deviation of the monitored historical environmental data can also be calculated to set the dynamic threshold.
[0026] Example 2. In this example, the neural network model includes an input encoding layer, an LSTM iterative layer, and a fully connected output layer; the construction content of the neural network model includes: The input encoding layer receives the initial content value and effective dynamic data through normalization preprocessing, performs fully connected encoding on the initial content value, performs time embedding encoding on the effective dynamic data, and transmits both the initial content value and the effective dynamic data to the LSTM iterative layer in vector form; The LSTM iterative layer includes a bidirectional LSTM layer and an iterative prediction layer. The bidirectional LSTM layer is used to receive the initial content value to complete the splicing of the forward and backward hidden states of the initial content value and then transmit the initial content value to the iterative prediction layer. The iterative optimization algorithm is used to perform iteration on the initial content value based on the effective dynamic data and then transmit the iteration result to the fully connected output layer; The fully connected output layer repairs the high-dimensional features of the iteration result to the target dimension through mapping compression, performs anti-normalization processing on the iteration result, labels the generated data as the predicted content value, and outputs the predicted content value from the neural network model.
[0027] The fully connected encoding converts the initial content value so that it can be fully expressed and processed in the high-dimensional space of the neural network. Even for complex coating metal components, the model can extract important features from the initial content value that may affect the metal oxidation behavior. The high-dimensional features of the initial content value can be simplified and mapped into a vector form suitable for subsequent LSTM processing, ensuring efficient transmission and processing of data in the neural network. The fully connected encoding provides the neural network with the initial metal content information, which provides a stable initial value for subsequent prediction iterations based on dynamic features. The role of the time embedding encoding is to convert these effective dynamic data with temporality into time-sensitive vector expressions, enabling the neural network to understand the action path of time on coating degradation. Because the same humidity value appears at different time points, the resulting impact on metal oxidation may be different. For example, in the context of a relatively high accumulation of ultraviolet radiation, even a slight humidity fluctuation may cause significant changes. Each piece of dynamic data is timestamped, then mapped into a vector through the embedding layer, and then concatenated or added to the original features to achieve time series awareness. The initial content value and the effective dynamic data are both transmitted to the LSTM iteration layer in vector form, which standardizes the input format to ensure that the neural network can effectively process data within a unified computational framework, simplifies the structure of the data input layer, and avoids complex preprocessing and splitting operations.
[0028] The bidirectional LSTM layer creates two independent LSTM paths, one for the forward input sequence in time and one for the backward input sequence in time, and then concatenates and merges the hidden states in these two directions for the next task processing or output prediction. During the coating degradation process, the change in metal content not only depends on the past state but is also affected by future changes. Through the bidirectional LSTM network, the time information in both the past forward and future backward directions can be understood simultaneously, making the model's prediction of metal content more comprehensive and enabling the model to make inferences based on a more accurate initial content value during subsequent iterative predictions.
[0029] The mapping and compression of high-dimensional features are used after the LSTM iteration layer. The output is usually a high-dimensional time series feature representation, which may include information such as input information, historical state, and dynamic feature response in specific applications. The high-dimensional features are "compressed" into a dimension that meets the task output requirements. The target dimension generally refers to the quantity and format of the metal content values that need to be output finally, which can be a vector or predicted values of multiple elements. In specific applications, if the model predicts the content value of a certain metal, the target dimension may be a vector containing a single real number; if multiple metal elements are predicted, the target dimension is in the form of a multi-dimensional vector. The process of restoring the iteration result to the target dimension is used to align the model output result with the task requirements, ensuring that the output format can be directly used or evaluated.
[0030] Furthermore, as a feasible implementation manner, the process of iteratively optimizing the initial content value by the iterative optimization method includes: Step A1: Referring to the form of the initial content value, randomly initialize and generate a genetic population including a number of individuals. Each genetic population contains multiple individuals, and each individual represents a group of candidate predicted content values consistent with the form of the initial content value. Step A2: Preset the number of iterations. In each iteration process, all individuals in each genetic population are iteratively reproduced by a random crossover calculation method, and a perturbation parameter representing variant reproduction is randomly added to each pair of reproduced paired individuals. Step A3: Use effective dynamic data to construct a fitness function, set a dynamic fitness score threshold for the fitness function, use the fitness function to evaluate the fitness scores of the population, and screen out all individuals that reach above the fitness score threshold. Step A4: Conduct fitness score screening after each iteration. When the last iteration is completed, select the individual with the highest fitness score screened out as the optimal solution of the initial content value, output the optimal solution and label it as the predicted content value.
[0031] The initial content value is used as the initial reference value for predicting the metal elements of the coating in the neural network model, which is the starting point for the optimization of the genetic algorithm. The population in the genetic algorithm is a set composed of multiple individuals, and each individual represents a potential possible solution. In this embodiment, the individual represents a group of candidate predicted content values. Each individual is a part of the search space of the genetic algorithm in the current generation, and is a predicted content value "consistent with the form of the initial content value"; these individuals are candidate solutions generated according to the format of the initial predicted value and are used to optimize in the subsequent genetic algorithm iterations, and finally the optimal solution is evolved through iteration. The main purpose of randomly initializing the population is to increase the diversity of the genetic algorithm. Through the diverse initial population, the algorithm can search in a wider solution space and avoid falling into local optimal solutions.
[0032] The crossover is an iterative behavior in genetic algorithms, used to simulate gene exchange in natural selection. In each iteration, individuals in each population are randomly paired through methods such as roulette wheel selection, tournament selection, etc., and then the crossover operation is performed to generate new individuals. Each pair of parent individuals exchange certain parts, such as prediction values or parameters, to generate new offspring. The crossover operation combines different characteristics of individuals, attempting to explore more solution spaces. The selection of individuals for each pairing and crossover is random, not deterministic, which can avoid fixed-pattern selection, thereby increasing population diversity and avoiding being trapped in local optimal solutions. The mutation operation simulates the mutation phenomenon in biological evolution, meaning that in each generation, there is a certain probability that an individual will undergo small-scale random changes, and this change is called mutation. In this embodiment, mutation is mainly achieved by adding perturbation parameters. The perturbation parameter refers to that in each crossover and reproduction process, a perturbation term representing a small random change will be randomly applied to certain individuals, and this perturbation is usually adjusted by setting a small perturbation amount to adjust the prediction value or model parameters of the individual.
[0033] The fitness function is used to evaluate the goodness or adaptability of each individual in the current environment according to effective dynamic data, and is used to measure the degree of conformity between the prediction result and the actual environmental change data; the fitness function converts the performance of each prediction value into a score, and the higher this score, the more the prediction value conforms to the actual environmental change. The fitness score threshold is a criterion used to determine which individuals are considered qualified in the current iteration. Setting the threshold to be dynamic means that as the environmental data changes, or as the algorithm iterates, this threshold can also be changed and adjusted. According to the output of the fitness function, evaluate the advantages and disadvantages of each individual, assign a fitness score, and screen out those individuals whose fitness scores are greater than or equal to the threshold according to the set dynamic fitness score threshold. In each round of iteration, individuals with higher fitness scores will be continuously retained in the population, while those that do not meet the requirements will be eliminated. In this way, the optimal solution will be gradually approached, and the optimal solution will be output and marked as the prediction content value required by the neural network model.
[0034] Embodiment 3. In this embodiment, the construction content of the fitness function includes: Let the fitness function be represented as F, the individual be represented as C, and the individual ordinal number be represented as i, then the construction form of the fitness function F is represented as: , where the Er represents the peak position offset value, the Pe represents the humidity change value, and the Qy represents the ultraviolet radiation value; The α, β, and γ represent the fitness weight parameters corresponding to the effective dynamic data, and the D Penal represents a penalty constraint term to prevent abnormal numerical change rates.
[0035] The weight parameters in the fitness function can be adjusted according to different environmental factors and experimental requirements to adapt to different prediction scenarios. The penalty constraint term is used to prevent the numerical values of some prediction individuals from changing too violently during the iteration process, resulting in unstable or abnormal fluctuations in the prediction results. For example, some environmental parameters may show abnormal fluctuations. If these data are directly used, it may lead to unreasonable predictions. The introduction of the penalty term enables the model to automatically adjust and limit such unreasonable changes, maintaining the smoothness and stability of the prediction results.
[0036] Further, as a feasible implementation manner, the setting method of the dynamic fitness score threshold includes: The fitness score threshold includes the maximum threshold T representing the threshold value range max and the minimum threshold T min , let the total number of iterations be represented as M, the iteration ordinal number be represented as k, and let the fitness score threshold of the current iteration be represented as T k , Then the calculation formula of the fitness score threshold T k is expressed as: .
[0037] During the process of iteration, the fitness threshold will gradually tighten, indicating that in the initial stage, the genetic method has relatively loose requirements for individuals and can accept more populations to enter the next round of iteration. As the number of iterations increases, the algorithm will gradually raise the requirements for individual fitness, screening out better individuals, thereby accelerating convergence and avoiding falling into local optima. The method of gradually decreasing the threshold ensures the diversity in the search process and avoids the algorithm from falling into local optimal solutions prematurely. If the fitness threshold is very high at the beginning, it may lead to the elimination of most individuals in the initial stage, resulting in an overly narrow search space and causing the algorithm to converge prematurely. The k / M represents the proportion of the current iteration in all iterations, indicating the progress of the current iteration in the total number of iterations. As k increases, the proportion value will increase, thereby affecting the change range of the fitness score threshold. This implementation manner enhances the self-adaptability and flexibility of the genetic algorithm iteration process, improves the prediction accuracy under complex environmental conditions, and at the same time avoids the troubles of early convergence and local optimal solutions.
[0038] Further, as a feasible implementation manner, the perturbation parameter is set as a dynamic negative feedback perturbation term, and different negative feedback perturbation terms are correspondingly set for different metal elements; the ultraviolet radiation value and the humidity change value are set to be positively correlated with the perturbation parameter; wherein, the negative feedback perturbation term is represented as σ, then the calculation formula of the negative feedback perturbation term σ is expressed as: , Wherein, Pe represents the humidity change value, Qy represents the ultraviolet radiation value, σ0 represents the initial perturbation term without external dynamic influence, λ1 represents the first perturbation parameter of the influence of the humidity change amplitude on the perturbation amplitude, and λ2 represents the second perturbation parameter of the influence of the ultraviolet cumulative amount on the perturbation amplitude.
[0039] The negative feedback perturbation term σ is used to adjust the influence related to humidity and ultraviolet radiation in the environment factor in the model; the perturbation term is an important adjustment factor in the metal degradation process, which helps to dynamically adjust the prediction accuracy of the predicted metal content in the prediction model. The negative feedback means that the system weakens the influence of external perturbations through a feedback mechanism. Here, the changes in humidity and ultraviolet radiation will affect the metal degradation rate, and the negative feedback mechanism can help adjust the amplitude of the perturbation term to reflect the influence of environmental factors. λ1 represents the coefficient of the influence of humidity change on the perturbation term, indicating the degree of influence of the humidity change value on the metal oxidation degradation process. λ1∙Pe represents dynamically adjusting the perturbation intensity according to humidity, and the humidity change value directly affects the oxidation reaction rate of the metal pigment in the coating. If the humidity change increases significantly, the metal element may accelerate oxidation, resulting in a low content of the metal pigment. At this time, the perturbation term σ increases, thereby adjusting the prediction result. λ2 represents the influence coefficient of ultraviolet radiation on the perturbation term, indicating the degree of influence of the change in ultraviolet exposure on the metal oxidation degradation process. λ2∙Qy represents adjusting the search amplitude according to ultraviolet rays. The increase in ultraviolet radiation usually causes an increase in the oxidation rate of the metal pigment in the coating material, thereby affecting the change in the metal content. By increasing the perturbation term corresponding to the ultraviolet exposure, the model can more accurately reflect the actual change in the metal content.
[0040] Furthermore, as a feasible implementation manner, a confidence interval is used to represent the error redundancy value range, and its content includes: Set the confidence interval to be represented as CI, the predicted content value to be represented as y, set the standard deviation of the predicted content value to be represented as ω, and set the confidence coefficient under the standard normal distribution to be represented as Z. Then the error redundancy value range is represented by the confidence interval CI as: ; wherein the confidence level of the confidence coefficient is set between 90% and 99%.
[0041] The confidence interval is a range that indicates the range within which the true value of the predicted value may fall or the likelihood that the predicted value will fall within that interval at a given confidence level. The confidence interval provides an upper and lower bound for the predicted value, and these bounds reflect the uncertainty of the predicted value. The confidence coefficient corresponds to the value under the standard normal distribution and reflects the width of the confidence interval. A higher confidence level corresponds to a larger confidence coefficient, meaning the confidence interval will be wider, indicating a higher level of uncertainty in the predicted value by the model. The standard deviation reflects the degree of fluctuation of the predicted content value, that is, the degree of dispersion of the estimation error of the prediction result. The larger the standard deviation, the lower the reliability of the prediction result and the wider the confidence interval; the smaller the standard deviation, the more accurate the prediction result and the narrower the confidence interval. When the predicted content value is within the confidence interval range, it can be considered accurate, that is, the error redundancy value range is valid. If the predicted value exceeds this interval, it indicates that there is a large deviation in the prediction result, and it may be necessary to readjust the prediction method or re-execute the iterative process. The Z∙ω represents the margin of error and is used to determine the interval width. In a specific implementation, a confidence level between 90% and 99% is set, and the user can select different confidence interval widths according to their needs to decide whether to accept the predicted value. For example, when using a 99% confidence level, the confidence interval will be wider and the allowable error will be larger; when using a 90% confidence level, the interval will be narrower and more precise prediction results are required. Using the confidence interval to represent the error redundancy value range can effectively quantify the error range of the prediction result and provide a reliability measure.
[0042] The specific implementation manners described above further elaborate on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above description is only the specific implementation manners of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An intelligent prediction method for coating degradation based on LSTM neural network, characterized in that, The method includes: Step S1: Collect initial spectral data including timestamps for metal detection for the target coating, perform peak detection on the initial spectral data using the initial peak splitting method, and generate an initial content value representing the initial detected metal content in the target coating; Step S2: Monitor and collect dynamic characteristic data of the oxidative degradation of the target metal element in the target coating, construct an LSTM-based neural network model, and set the dynamic characteristic data as the iterative constraint condition for the neural network model to iterate; Step S3: Input the initial content value as the input value into the neural network model, perform predictive iteration on the initial content value based on the iterative constraint condition, and label the finally generated output value as the predicted content value representing the predicted metal content in the target coating; Step S4: Set the error redundancy value range, use the mean square error method to evaluate the authenticity of the predicted content value. When the predicted content value is within the error redundancy value range, label the predicted content value as the true value of the finally detected metal content. When the predicted content value is outside the error redundancy value range, return to execute Step S2.
2. The intelligent prediction method for coating degradation based on the LSTM neural network according to claim 1, characterized in that The dynamic characteristic data includes peak position offset value, humidity change value, and ultraviolet radiation value; the peak position offset value is used to quantify the X-ray fluorescence spectrum energy offset caused by metal oxidation per unit time, the humidity change value represents the change amount of the humidity value of the target metal element per unit time, and the ultraviolet radiation value represents the total cumulative ultraviolet exposure of the target coating per unit time; separately set dynamic thresholds for each item of dynamic characteristic data, and label the dynamic characteristic data with a numerical value above the dynamic threshold as valid dynamic data.
3. The intelligent prediction method for coating degradation based on the LSTM neural network according to claim 2, wherein, The neural network model includes an input encoding layer, an LSTM iterative layer, and a fully connected output layer; the construction content of the neural network model includes: The input encoding layer receives the initial content value and valid dynamic data through normalization preprocessing, performs fully connected encoding on the initial content value, performs time embedding encoding on the valid dynamic data, and transmits both the initial content value and the valid dynamic data to the LSTM iterative layer in vector form; The LSTM iterative layer includes a bidirectional LSTM layer and an iterative prediction layer. Use the bidirectional LSTM layer to receive the initial content value to complete the splicing of the forward and backward hidden states of the initial content value and then transmit the initial content value to the iterative prediction layer. Use the iterative optimization algorithm to perform iteration on the initial content value based on the valid dynamic data and then transmit the iteration result to the fully connected output layer; The fully connected output layer repairs the high-dimensional features of the iteration result to the target dimension through mapping compression, performs denormalization processing on the iteration result, and labels the generated data as the predicted content value, and outputs the predicted content value from the neural network model.
4. The intelligent prediction method for coating degradation based on the LSTM neural network according to claim 3, characterized in that, The process of performing iteration on the initial content value by the iterative optimization method includes: Step A1: Referring to the form of the initial content value, randomly initialize and generate a genetic population containing a number of individuals. Each genetic population contains multiple individuals, and each individual represents a group of candidate predicted content values in the same form as the initial content value; Step A2: Preset the number of iterations. In each iteration, all individuals in each genetic population are iteratively reproduced by means of random crossover calculation, and a perturbation parameter representing variant reproduction is randomly added to each pair of reproduced mating individuals. Step A3: Construct a fitness function using valid dynamic data, set a dynamic fitness score threshold for the fitness function, evaluate the fitness scores of the population using the fitness function, and screen out all individuals that reach above the fitness score threshold. Step A4: Conduct fitness score screening after each iteration. When the last iteration is completed, select the individual with the highest fitness score screened out as the optimal solution for the initial content value, output the optimal solution and label it as the predicted content value.
5. The intelligent prediction method for coating degradation based on an LSTM neural network according to claim 4, characterized in that, The construction content of the fitness function includes: Let the fitness function be denoted as F, the individual be denoted as C, and the individual ordinal number be denoted as i. Then the construction form of the fitness function F is expressed as: , where Er represents the peak position offset value, Pe represents the humidity change value, and Qy represents the ultraviolet radiation value. wherein α, β, and γ represent fitness weight parameters corresponding to valid dynamic data, and D Penal represents a penalty constraint term for preventing abnormal numerical change rates.
6. The intelligent prediction method for coating degradation based on the LSTM neural network according to claim 4, wherein The setting method of the dynamic fitness score threshold includes: The fitness score threshold includes a maximum threshold T representing the threshold value range max and a minimum threshold T min , let the total number of iterations be denoted as M, the iteration ordinal number be denoted as k, and let the fitness score threshold of the current iteration number be denoted as T k , Then the fitness score threshold T k is calculated as follows: .
7. A smart prediction method for coating degradation based on the LSTM neural network according to claim 5, characterized in that, The perturbation parameter is set as a dynamic negative feedback perturbation term, and different negative feedback perturbation terms are correspondingly set for different metal elements; the ultraviolet radiation value and the humidity change value are set to be positively correlated with the perturbation parameter.
8. A method for intelligent prediction of coating degradation based on an LSTM neural network according to claim 7, characterized in that, The negative feedback perturbation term is denoted as σ. The calculation formula of the negative feedback disturbance term σ is expressed as: , where Pe represents the humidity change value, Qy represents the ultraviolet radiation value, σ0 represents the initial perturbation term without external dynamic influence, λ1 represents the first perturbation parameter of the humidity change amplitude on the perturbation amplitude, and λ2 represents the second perturbation parameter of the ultraviolet cumulative amount on the perturbation amplitude.
9. A smart prediction method for coating degradation based on an LSTM neural network according to claim 1, characterized in that, Use the confidence interval to represent the error redundancy value range, and its content includes: Set the confidence interval as CI, the predicted content value as y, set the standard deviation of the predicted content value as ω, and set the confidence coefficient under the standard normal distribution as Z. Then the error redundancy value range is expressed as a confidence interval CI as follows: .
10. A method for intelligent prediction of coating degradation based on an LSTM neural network according to claim 9, characterized in that, The confidence level of the confidence coefficient is set between 90% and 99%.
Citation Information
Patent Citations
Soil heavy metal content spatial distribution prediction method based on genetic algorithm and BP neural network
CN118966306A
XRF quantitative analysis method of heavy metal elements based on LLE-svr
US20240035991A1
Neural network model optimization method based on stainless steel ultra-thin strip annealing process
WO2023168916A1