An intelligent prediction method for coating degradation based on LSTM neural network
Through the intelligent prediction method of coating degradation optimized by LSTM neural network and genetic algorithm, the peak position offset problem caused by oxidative degradation of metal elements is solved, and the accurate prediction of the metal content of the coating is achieved, and the accuracy and reliability of the coating protection life evaluation is improved.
Patent Information
- Application Number
- CN202510807471.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-06-17
AI Technical Summary
In the process of X-ray fluorescence spectrum analyzing the metal pigment content of coatings, the peak position shifts due to the oxidation and degradation of metal elements, which leads to deviations in the estimated metal element content, which affects the coating performance evaluation and service life judgment.
The intelligent prediction method of coating degradation based on LSTM neural network is adopted. By monitoring the dynamic characteristic data of metal oxidation degradation, iterative constraints are constructed, the model is optimized using genetic algorithms, error redundancy value range and mean square error evaluation mechanism are set, spectrum peak displacement is adaptively identified and corrected, 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 CN120340667B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of coatings, and in particular to an intelligent prediction method for coating degradation based on an LSTM neural network. Background Art
[0002] Metal-based coatings are widely used in protective, functional, and decorative coatings for various industrial corrosion protection, building protection, traffic signage, and marine protection applications. To enhance corrosion resistance, reflectivity, or coloration, various metal or metal oxide pigments, such as zinc, iron, aluminum, titanium, and copper, are often incorporated into these coatings. The content of these metal pigments in the coating directly determines its protective effectiveness and service life. Coating degradation refers to the time-dependent degradation of its physical and chemical properties under environmental stresses such as temperature, humidity, and ultraviolet light. X-ray fluorescence spectroscopy (XRF) detects characteristic X-rays emitted by materials under stimulation, enabling qualitative and quantitative elemental analysis. Peak decomposition algorithms are a common processing step in XRF data, resolving overlapping spectral peaks. Since measured XRF spectra often contain multiple overlapping peaks, accompanied by background radiation and noise, accurate analysis cannot be achieved through simple peak identification. Peak decomposition algorithms are required to mathematically model and fit the spectra to separate and quantify the overlapping peaks. The traditional seam segmentation algorithm processing mainly includes multiple processes such as background radiation removal, characteristic peak detection and overlapping peak decomposition in sequence.
[0003] During the coating degradation process, metallic pigments (such as zinc and iron) may undergo oxidative degradation, which can cause a dynamic shift in the energy position of the characteristic peaks in the coating's X-ray fluorescence spectrum. Peak separation algorithms pre-set fixed peak position parameters, but metal oxidation causes the peak positions to shift toward lower energy levels. In this case, existing peak separation algorithms typically still fit the initial peak positions, resulting in incorrect integration of the shifted peaks, an underestimated metallic pigment content, and consequently, a miscalculation of the peak area. For example, after zinc undergoes oxidative degradation, conventional algorithms, due to fixed peak position parameters, mistakenly include a portion of the shifted peak area in adjacent peaks or background noise, leading to an underestimated zinc content. Since zinc acts as a sacrificial anode, an underestimated zinc content can lead users to misjudge the coating's protective properties, resulting in an overestimation of the coating's predicted service life. This, in turn, leads to an overestimation of the coating's protective lifespan, increasing the risk of damage to the target maintenance facility and the cost of facility maintenance. 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 X-ray fluorescence spectroscopy analysis of the metallic pigment content of coatings by the existing peak separation algorithm, the peak position shifts due to the oxidation degradation of the metal elements, which in turn leads to deviations in the estimation of the metal element content.
[0005] The present invention is achieved through the following technical solutions:
[0006] An intelligent prediction method for coating degradation based on LSTM neural network, the method comprising:
[0007] Step S1: collecting initial spectral data including a timestamp for metal detection for a target coating, 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 coating;
[0008] 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 iterative constraints for the neural network model to iterate;
[0009] Step S3: inputting the initial content value as an input value into the neural network model, performing prediction iterations on the initial content value based on the iteration constraint condition, and marking the final generated output value as a predicted content value representing the predicted metal content in the target coating;
[0010] 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.
[0011] During the degradation of the coating, the metallic pigment may undergo oxidative degradation, 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 in turn 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 an overestimation of the estimated result of the coating protection life, increasing the damage risk of the target maintenance facility and the maintenance cost of the facility. Based on this, the present invention provides a method for intelligent prediction of coating degradation based on an LSTM neural network, which solves the problem that in the process of analyzing the metallic pigment content of the coating by the existing peak separation algorithm through X-ray fluorescence spectroscopy, the peak position shifts due to the oxidative degradation of the metal element, which in turn leads to the problem that the estimation of the metal element content is prone to deviation.
[0012] Furthermore, the dynamic characteristic data includes a peak offset value, a humidity change value and an ultraviolet radiation value; the peak 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 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.
[0013] Furthermore, the neural network model includes an input coding layer, an LSTM iteration layer, and a fully connected output layer; the construction content of the neural network model includes:
[0014] The input coding layer receives the initial content value and the effective dynamic data through normalization preprocessing, performs full connection coding on the initial content value, performs time embedding coding on the effective dynamic data, and transmits the initial content value and the effective dynamic data to the LSTM iterative layer in the form of vectors;
[0015] The LSTM iteration layer includes a bidirectional LSTM layer and an iterative prediction layer. The bidirectional LSTM layer receives the initial content value to complete the forward and backward hidden state splicing of the initial content value, and then transmits the initial content value to the iterative prediction layer. The iterative optimization algorithm is used to iterate the initial content value based on the effective dynamic data, and then the iteration result is transmitted to the fully connected output layer.
[0016] The fully connected output layer repairs the high-dimensional features of the iteration results into the target dimension through mapping compression, denormalizes the iteration results, labels the generated data as predicted content values, and outputs the predicted content values from the neural network model.
[0017] Furthermore, the process of iterating the initial content value by the iterative optimization method includes:
[0018] Step A1: Referring to the form of the initial content value, randomly initialize and generate a set of genetic populations containing a number of individuals, each genetic population containing a plurality of individuals, each individual representing a set of candidate predicted content values consistent with the form of the initial content value;
[0019] Step A2: Preset the number of iterations. In each iteration, all individuals in each genetic population are reproduced iteratively using a random crossover calculation method, and a perturbation parameter representing mutation reproduction is randomly added to each pair of reproductive paired individuals.
[0020] Step A3: Use valid 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 score of the population, and screen out all individuals that reach above the fitness score threshold;
[0021] Step A4: After each iteration, the fitness score is screened. When the last iteration is completed, the individual with the highest fitness score is selected as the optimal solution for the initial content value. The optimal solution is output and marked as the predicted content value.
[0022] Furthermore, the construction of the fitness function includes:
[0023] Assume that the fitness function is represented by F, the individual is represented by C, and the individual ordinal is represented by i, then the construction form of the fitness function F is expressed as: ,
[0024] Wherein Er represents the peak position shift value, Pe represents the humidity change value, and Qy represents the ultraviolet radiation value;
[0025] The α, β and γ represent the fitness weight parameters corresponding to the effective dynamic data, and the D Penal Represents a penalty constraint term that prevents abnormal rate of change of values.
[0026] Furthermore, the dynamic fitness score threshold is set in the following manner:
[0027] The fitness score threshold includes a maximum threshold T representing the threshold value range. max and the minimum threshold T min , let the total number of iterations be M, the iteration number be k, and the fitness score threshold of the current number of iterations be T k ,
[0028] Then the fitness score threshold T k The calculation formula is expressed as: .
[0029] Furthermore, the disturbance parameter is set as a dynamic negative feedback disturbance term, and different negative feedback disturbance terms are set for different metal elements; the ultraviolet radiation value and the humidity change value are set to be positively correlated with the disturbance parameter.
[0030] Furthermore, the negative feedback disturbance term is expressed as σ,
[0031] Then the calculation formula of the negative feedback disturbance term σ is expressed as: ,
[0032] Wherein, Pe represents the humidity change value, Qy represents the ultraviolet radiation value, σ0 represents the initial disturbance term without external dynamic influence, λ1 represents the first disturbance parameter of the influence of the humidity change amplitude on the disturbance amplitude, and λ2 represents the second disturbance parameter of the influence of the ultraviolet accumulation amount on the disturbance amplitude.
[0033] Furthermore, the confidence interval is used to represent the error margin value range, which includes:
[0034] Set the confidence interval as CI, the predicted content value as y, the standard deviation of the predicted content value as ω, and the confidence coefficient under the standard normal distribution as Z.
[0035] Then the error redundancy value range is expressed by the confidence interval CI as: .
[0036] Furthermore, the confidence level of the confidence coefficient is set to between 90% and 99%.
[0037] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0038] 1. This invention uses an LSTM neural network model, taking the dynamic characteristics of metal element oxidation degradation as input, to enable the model to adaptively identify and correct peak displacements, thereby improving the accuracy of peak position fitting. This dynamic adjustment capability effectively avoids the deviation caused by fixed peak positions and can accurately capture the changing trends of metal content.
[0039] 2. The present invention uses an error margin range and a mean square error (MSE) evaluation mechanism to perform real-time evaluation of the model output during the prediction process. This feedback mechanism not only improves the prediction accuracy of metal content but also ensures the accuracy and reliability of the prediction results when encountering unexpected degradation changes such as extreme metal oxidation rates, thus avoiding the limitations of traditional methods that may not be able to automatically adjust.
[0040] 3. The present invention uses precise prediction iteration and dynamic feature modeling in the neural network model, which can continuously learn the changing patterns under different degradation environments during the training process, so that the underestimation or overestimation of the metal element content can be effectively avoided, thereby improving the accuracy of the coating protection life assessment and reducing the maintenance risks and costs caused by misjudgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0042] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION
[0043] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with examples and drawings. The exemplary embodiments of the present invention and their descriptions are only used to explain the present invention and are not intended to limit the present invention.
[0044] Example 1, as Figure 1 As shown, this embodiment is a coating degradation intelligent prediction method based on LSTM neural network, which includes:
[0045] Step S1: collecting initial spectral data including a timestamp for metal detection for a target coating, 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 coating;
[0046] 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 iterative constraints for the neural network model to iterate;
[0047] Step S3: inputting the initial content value as an input value into the neural network model, performing prediction iterations on the initial content value based on the iteration constraint condition, and marking the final generated output value as a predicted content value representing the predicted metal content in the target coating;
[0048] 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.
[0049] The metallic pigments in the coating are prone to oxidation reactions when exposed to the environment for a long time. Metal oxidation will cause energy shifts in the characteristic peaks in the X-ray fluorescence spectrum, making it impossible for traditional peak separation algorithms to accurately identify the shifted peaks, and deviations are likely to occur after content detection. This shift will lead to misestimation of the metal content, thereby affecting the performance evaluation of the coating. X-ray fluorescence spectroscopy is a non-destructive analysis technology based on the characteristic energy spectrum presented by the material when stimulated to emit X-rays. It is widely used in the 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 spectroscopy in existing conventional technology. As a feasible specific application, the initial peak separation method can use peak separation algorithms such as Voigt function fitting peak separation method, Lorentz peak fitting method, nonlinear least squares fitting method and Raman spectrum peak decomposition algorithm. The initial spectral data refers to the spectral data of a paint sample obtained using X-ray fluorescence spectroscopy (XRF) technology before the paint has undergone significant degradation. This data primarily includes the peak position, peak intensity, background noise, and timestamp information of the metal elements. It represents the metal composition and concentration of the paint under normal conditions, and provides baseline data for subsequent analysis of changes during metal oxidation degradation. The use of the initial peak separation method to perform peak detection on the initial spectral data refers to extracting the characteristic peaks of the metal elements from a complex spectrum. Each metal element has a specific fluorescence characteristic peak in the XRF spectrum, and its peak corresponds to the characteristic X-ray energy of the element. The peak separation algorithm obtains the content of the metal element in the target paint through peak detection and fitting. For example, in a specific implementation, the characteristic peak position of zinc is detected, and the algorithm matches the peak area or intensity with a predetermined calibration curve to calculate the initial zinc content.
[0050] The timestamp is used to record the time of data acquisition, allowing the collected spectral data to be arranged and compared in chronological order. In actual applications, coatings undergo different life cycles, and over time, the metallic pigments in the coating may undergo oxidative degradation. By timestamping each set of spectral data, the changing trends of the metallic elements can be tracked, thereby better reflecting the degradation process of the coating. In specific implementations, the dynamic feature data can also be displayed in a time series format by timestamping discrete data points. The initial content value refers to the estimated metallic element content obtained by fitting a conventional initial peak separation method using X-ray fluorescence spectroscopy at the beginning of coating degradation, or before significant degradation occurs. It represents the metallic content of the coating in the absence of oxidizing environmental factors. In specific implementations, because the number of metallic elements being processed is not unique and may be one or more, the initial content value may be a single number or a set of data, both of which are processed in vector form in the neural network model. The dynamic feature data represents a data set that describes the changes in the spectral response of the metal during coating degradation, coupled with changes in environmental conditions. The LSTM neural network model, a long short-term memory neural network model, is a recurrent neural network (RNN) variant used to process and predict time series data. It effectively captures long-term dependencies in sequential data. The predicted content value represents a speculative estimate of the mass or concentration of a metal element in the target coating at the current or future time, using the LSTM neural network model and incorporating dynamic feature data as iteration constraints.
[0051] The error redundancy value range refers to the deviation or error within a certain range allowed between the predicted result and the actual observed value, that is, the error redundancy value range is a tolerance standard for determining whether the predicted result is close enough to the actual value. The mean square error is a common method for measuring 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 predicted result. When the authenticity assessment of the prediction result is within the set error redundancy value range, the prediction result can be considered valid and reasonable; on the contrary, if the authenticity assessment exceeds the redundancy value range, it means that there is a large error in the prediction. At this time, the model needs to be corrected or retrained, and the iterative step of the model needs to be returned to optimize the prediction.
[0052] Furthermore, as a feasible implementation method, the dynamic characteristic data includes a peak offset value, a humidity change value and an ultraviolet radiation value; the peak 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 in the humidity value of the target metal element per unit time, and the ultraviolet radiation value represents the total cumulative exposure of the target coating to ultraviolet rays 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.
[0053] The term "unit time" refers to the time interval corresponding to a complete data collection and update operation, i.e., the basic time window within which the system monitors and records coating degradation data (such as humidity, UV, and peak position changes). Each dynamic feature data item is limited to a value within a unit time, meaning that the dynamic feature data ultimately used in the neural network model is the coating degradation data collected within a single time interval. The peak shift value represents the energy position change of the characteristic spectral peak of a metal element in X-ray fluorescence spectroscopy when affected by external factors. This change quantifies the peak shift caused by these factors, and the magnitude of the shift is calculated by comparing it with the original, unaffected peak position. The shift occurs because the oxidation reaction changes the oxidation state and chemical environment of the metal, thereby affecting the energy of its X-ray emission. Therefore, the magnitude of the peak shift value linearly reflects the degree of oxidation of the metal element in the current environment and the coating. The humidity change value represents the change in relative humidity in the coating environment of the target metal element per unit time. It is used to quantify fluctuations in ambient humidity and reflect the impact of humidity on metal oxidation during coating degradation. High humidity or drastic humidity changes can easily aggravate the oxidation process of metallic pigments, especially easily oxidized metals such as zinc and iron. The greater the humidity change value, the more unstable the environment is, the greater the potential for affecting the metal content, and the higher the attention weight should be given to the model. The ultraviolet radiation value is expressed as 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 time of ultraviolet exposure, that is, the total amount of ultraviolet radiation received by the coating per unit time. It is often described in terms of radiation energy, which can be the total radiation energy per unit time. Ultraviolet radiation can promote photochemical reactions of chemical substances in the coating, leading to metal oxidation, coating color changes, structural damage, etc. Especially in an environment with strong ultraviolet radiation, the influence of ultraviolet rays significantly accelerates the degradation process of the coating, thereby affecting the protective effect of the coating.
[0054] The dynamic threshold of the dynamic characteristic data refers to the threshold used to determine and screen which characteristic data is of practical significance in time series or environmental changes and can have a significant impact on the neural network model. It is used to determine which dynamic characteristic data has a practical impact on the neural network model of paint degradation, thereby eliminating irrelevant small fluctuations or noise, and ensuring that the data processed by the model is critical and meaningful. In a specific implementation, the setting method of the dynamic threshold can use empirical rules combined with environmental conditions, such as adjusting it in combination with the humidity and ultraviolet intensity of the environment where the target paint is located; if it is in a conventional environment where the humidity and ultraviolet intensity are not high, the standard deviation of the monitored historical environmental data can also be calculated to set the dynamic threshold.
[0055] Example 2: In this example, the neural network model includes an input coding layer, an LSTM iteration layer, and a fully connected output layer; the construction content of the neural network model includes:
[0056] The input coding layer receives the initial content value and the effective dynamic data through normalization preprocessing, performs full connection coding on the initial content value, performs time embedding coding on the effective dynamic data, and transmits the initial content value and the effective dynamic data to the LSTM iterative layer in the form of vectors;
[0057] The LSTM iteration layer includes a bidirectional LSTM layer and an iterative prediction layer. The bidirectional LSTM layer receives the initial content value to complete the forward and backward hidden state splicing of the initial content value, and then transmits the initial content value to the iterative prediction layer. The iterative optimization algorithm is used to iterate the initial content value based on the effective dynamic data, and then the iteration result is transmitted to the fully connected output layer.
[0058] The fully connected output layer repairs the high-dimensional features of the iteration results into the target dimension through mapping compression, denormalizes the iteration results, labels the generated data as predicted content values, and outputs the predicted content values from the neural network model.
[0059] The fully connected encoding transforms the initial content values, enabling them to be fully represented and processed in the high-dimensional space of the neural network. Even for complex paint metal compositions, the model can extract important features from the initial content values that may influence metal oxidation behavior. The high-dimensional features of the initial content values can be simplified and mapped into a vector form suitable for subsequent LSTM processing, ensuring efficient data transmission and processing within the neural network. The fully connected encoding provides the neural network with initial metal content information, which provides a stable starting value for subsequent prediction iterations based on dynamic features. The time embedding encoding transforms these time-series, effective dynamic data into a time-sensitive vector representation, enabling the neural network to understand the impact of time on paint degradation. The same humidity value at different times may have different effects on metal oxidation. For example, in the presence of high levels of accumulated UV radiation, even a minor humidity fluctuation can trigger significant changes. Each dynamic data item is timestamped, then mapped into a vector using an embedding layer, and then concatenated or added to the original features to achieve time-series awareness. The initial content value and effective dynamic data are transmitted to the LSTM iterative layer in the form of vectors. This is used to standardize the input format, ensure that the neural network can effectively process data under a unified computing framework, simplify the structure of the data input layer, and avoid complex preprocessing and splitting operations.
[0060] The bidirectional LSTM layer creates two independent LSTM paths: one that takes the input sequence forward in time, and one that takes the input sequence backward in time. The hidden states in these two directions are then concatenated and merged for the next task processing or output prediction. During the paint degradation process, changes in metal content depend not only on past states but also on future changes. The bidirectional LSTM network is able to simultaneously understand this forward and backward temporal information, making the model's predictions of metal content more comprehensive and enabling subsequent iterative predictions to be based on more accurate initial values.
[0061] The mapping compression of the high-dimensional features is used after the LSTM iteration layer, and the output is usually a high-dimensional time series feature representation. In specific applications, it may contain input information, historical status, dynamic feature response and other information, and "compress" the high-dimensional features into a dimension that meets the task output requirements. The target dimension generally refers to the number and format of the metal content values that need to be output in the end, which can be a vector or the 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 repairing 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.
[0062] Furthermore, as a feasible implementation method, the process of iterating the initial content value by the iterative optimization method includes:
[0063] Step A1: Referring to the form of the initial content value, randomly initialize and generate a set of genetic populations containing a number of individuals, each genetic population containing a plurality of individuals, each individual representing a set of candidate predicted content values consistent with the form of the initial content value;
[0064] Step A2: Preset the number of iterations. In each iteration, all individuals in each genetic population are reproduced iteratively using a random crossover calculation method, and a perturbation parameter representing mutation reproduction is randomly added to each pair of reproductive paired individuals.
[0065] Step A3: Use valid 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 score of the population, and screen out all individuals that reach above the fitness score threshold;
[0066] Step A4: After each iteration, the fitness score is screened. When the last iteration is completed, the individual with the highest fitness score is selected as the optimal solution for the initial content value. The optimal solution is output and marked as the predicted content value.
[0067] The initial content value is used as the initial reference value for predicting the metal elements in the coating in the neural network model, which is the starting point for genetic algorithm optimization. The population in the genetic algorithm is a set of multiple individuals, each of which represents a potential solution. In this embodiment, the individual represents a set of candidate predicted content values. Each individual is part of the search space of the genetic algorithm in the current generation, and is a predicted content value that is "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 for optimization in subsequent genetic algorithm iterations, and ultimately 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 a diverse initial population, the algorithm can search in a wider solution space and avoid falling into a local optimal solution.
[0068] Crossover is an iterative behavior in genetic algorithms that simulates the gene exchange in natural selection. In each iteration, individuals in each population are randomly paired using methods such as roulette wheel selection or tournament selection, followed by a crossover operation to generate new individuals. Each pair of parent individuals exchanges certain components, such as predicted values or parameters, to generate new offspring. The crossover operation combines the different characteristics of individuals, exploring a wider range of solution spaces. The selection of individuals for each pairing and crossover is random, not deterministic. This avoids fixed selection patterns, thereby increasing population diversity and preventing regression into local optima. The mutation operation simulates the phenomenon of sudden change in biological evolution. This means that within each generation, individuals have a certain probability of undergoing small, random changes, known as mutations. In this embodiment, mutation is primarily achieved by adding a perturbation parameter. The perturbation parameter refers to a small, random perturbation term applied to certain individuals during each crossover. This perturbation is typically applied by setting a small perturbation value to adjust the individual's predicted value or model parameters.
[0069] The fitness function is used to evaluate the quality or adaptability of each individual in the current environment based on valid dynamic data, and is used to measure the consistency between the prediction results and the actual environmental change data; the fitness function converts the performance of each predicted value into a score. The higher the score, the more consistent the predicted value is with the actual environmental changes. The fitness score threshold is a standard used to determine which individuals are considered qualified in the current iteration. Setting the threshold dynamically means that this threshold can also be changed and adjusted as the environmental data changes or as the algorithm iterates. According to the output of the fitness function, the quality of each individual is evaluated, a fitness score is assigned, and according to the set dynamic fitness score threshold, those individuals with fitness scores greater than or equal to the threshold are screened out. In each round of iteration, individuals with higher fitness scores will continue to be retained in the population, while those individuals that do not meet the requirements will be eliminated. In this way, the optimal solution is gradually approached, and the optimal solution is output and marked as the predicted content value required by the neural network model.
[0070] Example 3: In this example, the construction of the fitness function includes:
[0071] Assume that the fitness function is represented by F, the individual is represented by C, and the individual ordinal is represented by i, then the construction form of the fitness function F is expressed as: ,
[0072] Wherein Er represents the peak position shift value, Pe represents the humidity change value, and Qy represents the ultraviolet radiation value;
[0073] The α, β and γ represent the fitness weight parameters corresponding to the effective dynamic data, and the D PenalRepresents a penalty constraint term that prevents abnormal rate of change of values.
[0074] 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 certain predicted individuals from changing too drastically during the iteration process, resulting in unstable or abnormal fluctuations in the prediction results. For example, certain environmental parameters may fluctuate abnormally, and directly using these data may lead to unreasonable predictions. The introduction of the penalty term allows the model to automatically adjust, limit such unreasonable changes, and maintain the smoothness and stability of the prediction results.
[0075] Furthermore, as a feasible implementation, the dynamic fitness score threshold is set in the following manner:
[0076] The fitness score threshold includes a maximum threshold T representing the threshold value range. max and the minimum threshold T min , let the total number of iterations be M, the iteration number be k, and the fitness score threshold of the current number of iterations be T k ,
[0077] Then the fitness score threshold T k The calculation formula is expressed as: .
[0078] During the iteration process, the fitness threshold will gradually tighten, indicating that in the initial stage, the genetic method has looser requirements on individuals and can accept more populations to enter the next round of iteration. As the number of iterations increases, the algorithm will gradually increase the requirements for individual fitness, screen out better individuals, thereby accelerating convergence and avoiding falling into local optimum. The method of gradually lowering the threshold ensures diversity in the search process and prevents the algorithm from falling into local optimal solutions too early. If the fitness threshold is very high at the beginning, it may lead to the elimination of most individuals in the early stage, causing the search space to be too narrow, 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 ratio value will increase, thereby affecting the variation range of the fitness score threshold. This embodiment enhances the adaptability and flexibility of the genetic algorithm iterative process, improves the prediction accuracy under complex environmental conditions, and avoids the problems of early convergence and local optimal solutions.
[0079] Furthermore, as a feasible implementation method, the disturbance parameter is set as a dynamic negative feedback disturbance term, and different negative feedback disturbance terms are set for different metal elements; the ultraviolet radiation value and the humidity change value are set to be positively correlated with the disturbance parameter;
[0080] Wherein, the negative feedback disturbance term is represented by σ,
[0081] Then the calculation formula of the negative feedback disturbance term σ is expressed as: ,
[0082] Wherein, Pe represents the humidity change value, Qy represents the ultraviolet radiation value, σ0 represents the initial disturbance term without external dynamic influence, λ1 represents the first disturbance parameter of the influence of the humidity change amplitude on the disturbance amplitude, and λ2 represents the second disturbance parameter of the influence of the ultraviolet accumulation amount on the disturbance amplitude.
[0083] The negative feedback disturbance term σ is used to adjust the model for the effects of humidity and UV radiation, two environmental factors. This disturbance term is a key factor in the metal degradation process, helping to dynamically adjust the accuracy of the predicted metal content within the prediction model. Negative feedback refers to the system's use of a feedback mechanism to mitigate the impact of external disturbances. Here, changes in humidity and UV radiation affect the metal degradation rate. The negative feedback mechanism helps adjust the magnitude of the disturbance term to reflect the environmental influence. λ1 represents the coefficient of humidity change on the disturbance term, indicating the extent to which humidity changes affect the metal oxidation degradation process. λ1∙Pe dynamically adjusts the disturbance intensity based on humidity. Humidity changes directly affect the oxidation reaction rate of metallic pigments in the coating. Significant increases in humidity can accelerate oxidation of metallic elements, resulting in a low metallic pigment content. In this case, the disturbance term σ increases, adjusting the prediction results. λ2 represents the coefficient of UV radiation on the disturbance term, indicating the extent to which changes in UV exposure affect the metal oxidation degradation process. λ2∙Qy adjusts the search amplitude based on UV radiation. Increased UV radiation typically increases the oxidation rate of metallic pigments in the coating material, thus affecting the change in metal content. By adding the disturbance term corresponding to UV exposure, the model can more accurately reflect the actual changes in metal content.
[0084] Furthermore, as a feasible implementation method, a confidence interval is used to represent the error margin value range, and its contents include:
[0085] Set the confidence interval as CI, the predicted content value as y, the standard deviation of the predicted content value as ω, and the confidence coefficient under the standard normal distribution as Z.
[0086] Then the error redundancy value range is expressed by the confidence interval CI as: ; wherein the confidence level of the confidence coefficient is set between 90% and 99%.
[0087] The confidence interval is a range that indicates the range within which the true value of the predicted value is likely to fall, or the probability that the predicted value will fall within that interval, given a given confidence level. The confidence interval provides upper and lower bounds for the predicted value, reflecting 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, which means the confidence interval is wider, indicating greater uncertainty in the model's prediction. The standard deviation reflects the volatility of the predicted content, that is, the dispersion of the estimated error in the prediction result. A larger standard deviation indicates a lower reliability of the prediction result, resulting in a wider confidence interval; a smaller standard deviation indicates a more precise prediction result, resulting in a narrower confidence interval. When the predicted content value falls within the confidence interval, it can be considered accurate, meaning that the error margin range is valid. However, if the predicted value falls outside this range, it indicates a significant deviation in the prediction result, and the prediction method may need to be adjusted or the iteration process may need to be repeated. Z∙ω represents the error margin and is used to determine the width of the interval. In practice, a confidence level between 90% and 99% is set. Users can choose different confidence interval widths to determine whether to accept a prediction. For example, a 99% confidence level results in a wider confidence interval, allowing for greater error tolerance; a 90% confidence level results in a narrower interval, requiring a more precise prediction. Using confidence intervals to represent the margin of error effectively quantifies the error range of predictions and provides a measure of reliability.
[0088] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A coating degradation intelligent prediction method based on LSTM neural network, characterized in that: The method includes: Step S1: collecting initial spectral data including a timestamp for metal detection for a target coating, 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 coating; 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 iterative constraints for the neural network model to iterate; Step S3: inputting the initial content value as an input value into the neural network model, performing prediction iterations on the initial content value based on the iteration constraint condition, and marking the final generated output value as a predicted content value representing the predicted metal content in the target coating; Step S4: Set the error redundancy value range and 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, the predicted content value is marked as the true value of the final detected metal content. When the predicted content value is outside the error redundancy value range, return to step S2; 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 dynamic characteristic data whose value exceeds the dynamic threshold is marked as valid dynamic data.
2. A coating degradation intelligent prediction method based on LSTM neural network according to claim 1, characterized in that: The neural network model includes an input encoding layer, an LSTM iteration layer, and a fully connected output layer. The construction of the neural network model includes: The input coding layer receives the initial content value and the effective dynamic data through normalization preprocessing, performs full connection coding on the initial content value, performs time embedding coding on the effective dynamic data, and transmits the initial content value and the effective dynamic data to the LSTM iterative layer in the form of vectors; The LSTM iteration layer includes a bidirectional LSTM layer and an iterative prediction layer. The bidirectional LSTM layer receives the initial content value to complete the forward and backward hidden state splicing of the initial content value, and then transmits the initial content value to the iterative prediction layer. The iterative optimization algorithm is used to iterate the initial content value based on the effective dynamic data, and then the iteration result is transmitted to the fully connected output layer. The fully connected output layer repairs the high-dimensional features of the iteration results into the target dimension through mapping compression, denormalizes the iteration results, labels the generated data as predicted content values, and outputs the predicted content values from the neural network model.
3. A coating degradation intelligent prediction method based on LSTM neural network according to claim 2, characterized in that, The process of iterating 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 set of genetic populations containing a number of individuals, each genetic population containing a plurality of individuals, each individual representing 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, all individuals in each genetic population are reproduced iteratively using a random crossover calculation method, and a perturbation parameter representing mutation reproduction is randomly added to each pair of reproductive paired individuals. Step A3: Use valid 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 score of the population, and screen out all individuals that reach above the fitness score threshold; Step A4: After each iteration, the fitness score is screened. When the last iteration is completed, the individual with the highest fitness score is selected as the optimal solution for the initial content value. The optimal solution is output and marked as the predicted content value.
4. A coating degradation intelligent prediction method based on LSTM neural network according to claim 3, characterized in that: The construction content of the fitness function includes: Assume that the fitness function is represented by F, the individual is represented by C, and the individual ordinal is represented by i, then the construction form of the fitness function F is expressed as: , Wherein Er represents the peak position shift value, Pe represents the humidity change value, and 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 that prevents abnormal rate of change of values.
5. The method for intelligent prediction of coating degradation based on LSTM neural network according to claim 3, characterized in that: The dynamic fitness score threshold is set as follows: The fitness score threshold includes a maximum threshold T representing the threshold value range. max and the minimum threshold T min , let the total number of iterations be M, the iteration number be k, and the fitness score threshold of the current number of iterations be T k , Then the fitness score threshold T k The calculation formula is expressed as: .
6. A coating degradation intelligent prediction method based on LSTM neural network according to claim 4, characterized in that: The disturbance parameter is set as a dynamic negative feedback disturbance term, and different negative feedback disturbance terms are set for different metal elements; the ultraviolet radiation value and the humidity change value are set to be positively correlated with the disturbance parameter.
7. The method for intelligent prediction of coating degradation based on LSTM neural network according to claim 6, characterized in that: The negative feedback disturbance term is denoted as σ, Then the calculation formula of the negative feedback disturbance term σ is expressed as: , Wherein, Pe represents the humidity change value, Qy represents the ultraviolet radiation value, σ0 represents the initial disturbance term without external dynamic influence, λ1 represents the first disturbance parameter of the influence of the humidity change amplitude on the disturbance amplitude, and λ2 represents the second disturbance parameter of the influence of the ultraviolet accumulation amount on the disturbance amplitude.
8. The method for intelligent prediction of coating degradation based on LSTM neural network according to claim 1, characterized in that: The confidence interval is used to express the error margin value range, which includes: Set the confidence interval as CI, the predicted content value as y, the standard deviation of the predicted content value as ω, and the confidence coefficient under the standard normal distribution as Z. Then the error redundancy value range is expressed as confidence interval CI: .
9. The method for intelligent prediction of coating degradation based on LSTM neural network according to claim 8, 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