Method for predicting and monitoring service life of mechano-electronic component based on Internet of Things
By improving the Transformer network model and parrot optimization algorithm, dynamically adjusting the network structure and hyperparameters, the multi-source feature modeling and hyperparameter optimization problems in the life prediction of mechanical and electronic components are solved, high-precision life prediction and real-time monitoring are achieved, and the operation stability and maintenance efficiency of the equipment are improved.
Patent Information
- Application Number
- CN202510581898.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing life prediction methods of mechanical electronic components lack the deep dependency modeling ability of multi-source heterogeneous timing characteristics. Traditional neural networks have problems of gradient vanishing and training instability when processing long-sequence data, and the efficiency of hyperparameter optimization is low, resulting in insufficient prediction accuracy and poor adaptability.
The improved Transformer network model is used to combine parrot optimization algorithm, and dynamically adjust the network structure and hyperparameters through adaptive depth control, dynamic self-attention and sparse attention mechanisms, and real-time monitoring and early warning are carried out in combination with the Internet of Things platform.
It realizes accurate prediction and real-time monitoring of the life of mechanical and electronic components, improves prediction accuracy and ability to adapt to complex environments, promptly triggers early warnings, optimizes equipment maintenance strategies, and reduces failure rate and maintenance costs.
Smart Images

Figure CN120448736A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things. Background Art
[0002] With the rapid development of smart manufacturing, the Industrial Internet of Things (IIoT), and remote equipment operation and maintenance (O&M) technologies, the monitoring of the operating status and remaining useful life (RUL) prediction of mechanical and electronic components, essential building blocks for critical systems such as manufacturing equipment, transportation, and energy equipment, have become crucial research areas to ensure system reliability, reduce failure rates, and optimize maintenance strategies. By collecting and analyzing component operating data in real time and predicting degradation trends and end-of-life in advance, production interruptions and equipment damage caused by unexpected failures can be effectively avoided, providing significant economic benefits and safety benefits.
[0003] Traditional methods for monitoring the lifespan of mechanical and electronic components rely primarily on rule-based management models or prediction methods based on physical modeling. Rule-based management models typically set fixed maintenance cycles based on historical experience, such as operating hours and number of operating cycles. However, this approach fails to consider the actual degree of wear on equipment under different operating conditions, which can easily lead to excessive or delayed maintenance. Physical modeling-based methods, such as fatigue crack growth models and corrosion models, require detailed mechanism modeling for each device or component and rely heavily on expert knowledge. The modeling process is complex and difficult to apply to a wide range of components in complex dynamic environments.
[0004] With the rise of data-driven approaches, remaining life prediction methods based on machine learning, particularly deep learning, have gradually become a mainstream research direction. By collecting multi-source sensor data such as current, voltage, temperature, and vibration from components during actual operation and utilizing neural network models for feature extraction and life modeling, these methods no longer rely on complex physical mechanisms and can adapt to more diverse and complex operating environments. In particular, models such as long short-term memory networks (LSTMs), one-dimensional convolutional neural networks (1D-CNNs), and autoencoders (AEs) have achieved some success in time series prediction tasks. However, these traditional deep learning methods still have some outstanding issues.
[0005] First, most of the existing life prediction methods based on deep learning are aimed at modeling data of a single feature or a single modality. They lack the ability to model the deep dependencies of multi-source heterogeneous time series features and cannot fully capture the interactions between different features under complex working conditions, resulting in insufficient prediction accuracy. Secondly, with the continuous increase in the dimension and time length of sensor data, traditional neural networks are prone to problems such as gradient vanishing and training instability when processing long sequence data, and consume huge computing resources. Especially in dynamic environments such as high-frequency vibration and sudden temperature changes, it is difficult for the model to maintain efficient time series modeling capabilities. In addition, traditional network structures generally use fixed hyperparameter configurations, such as the number of layers, the number of attention heads, and the learning rate, and fail to make adaptive adjustments to the dynamic changes in data complexity, resulting in poor adaptability and insufficient robustness of the model in different operation stages.
[0006] To this end, researchers introduced a Transformer-based time series modeling method. Transformer was originally applied in the field of natural language processing. It effectively captures long-distance dependencies through the self-attention mechanism and has good parallel computing performance. In the field of time series prediction, Transformer can model the relationship between each time step on a global scale, significantly improving the ability to model complex sequences. However, the standard Transformer model still faces two major challenges: first, it is not good at extracting local change features in time series data, and it is easy to ignore local abnormal signals during component degradation; second, the fixed depth and attention structure cannot be flexibly adjusted according to the actual data complexity, resulting in model redundancy or insufficient capabilities.
[0007] On the other hand, most existing deep learning lifespan prediction methods rely on manual hyperparameter adjustment or grid search-based hyperparameter tuning strategies, lacking efficient and intelligent hyperparameter optimization mechanisms. This not only increases training cycles but also easily leads to hyperparameter selection being limited to local optima, failing to fully unleash the model's potential. Although heuristic optimization methods such as particle swarm optimization (PSO) and genetic algorithms (GA) have been explored for hyperparameter optimization, they suffer from slow convergence and a tendency to fall into local optima, particularly in high-dimensional hyperparameter spaces.
[0008] Therefore, how to provide a method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things is an urgent problem that needs to be solved by those skilled in the art. Summary of the Invention
[0009] One purpose of the present invention is to propose a method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things. The present invention makes full use of the Internet of Things multi-source data acquisition technology, the improved Transformer time series modeling technology and the Parrot optimization algorithm. By dynamically sensing the volatility and complexity of the component operation data, the Transformer network structure and hyperparameter configuration are intelligently adjusted. The technical path for achieving accurate prediction of the remaining life and real-time health monitoring of mechanical and electronic components is described in detail. The method has the advantages of high prediction accuracy, strong ability to adapt to complex environments, timely early warning response and excellent system scalability.
[0010] According to an embodiment of the present invention, a method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things includes the following steps:
[0011] S1. Collect multi-source time series data of mechanical and electronic components, pre-process the multi-source time series data, and generate a processed time series data set;
[0012] S2. Input the time series data set into the Transformer network model, which specifically includes an Encoder and a Decoder;
[0013] S3. Use the Parrot optimization algorithm to optimize the hyperparameters of the Transformer network model. Based on the optimized Transformer network model, the real-time collected working data of the mechanical and electronic components is input, and the final remaining life prediction results of the mechanical and electronic components are generated through the Decoder.
[0014] S4. Compare the predicted final remaining life of the mechanical and electronic components with the set warning threshold. When the predicted remaining life is less than the preset threshold, trigger the warning mechanism and generate warning information;
[0015] S5. Generate feedback data based on the comparison between the actual operating data and the final remaining life prediction results, and use the feedback data to update the parameters of the optimized Transformer network model;
[0016] S6. Real-time monitoring data, final remaining life prediction results and early warning information are sent to operation and maintenance personnel through the Internet of Things platform to assist in formulating equipment maintenance and optimization strategies.
[0017] Optionally, the multi-source time series data specifically includes real-time working data of multiple sensors such as temperature, vibration, pressure and load, which are used to reflect the working status of mechanical and electronic components and perform life prediction and monitoring.
[0018] Optionally, the preprocessing of the multi-source time series data specifically includes data cleaning, denoising and standardization operations, so as to improve the quality of the multi-source time series data.
[0019] Optionally, the Encoder is used to extract features from a time series data set, and the Decoder is used to generate preliminary remaining life prediction results for mechanical and electronic components.
[0020] Optionally, the S2 specifically includes:
[0021] S21. Construct a Transformer network model, wherein the Transformer network model includes multiple Encoder and Decoder layers, wherein the Encoder is used to extract features from a time series dataset, and the Decoder is used to generate a remaining life prediction result for mechanical and electronic components, and the depth of each Encoder and Decoder layer can be dynamically adjusted according to the complexity of the input data;
[0022] S22. Dynamically adjust the number of layers of the Transformer network based on the complexity of the input data or task requirements through the adaptive depth control module. The adaptive depth control module automatically selects the appropriate number of layers based on the feedback of the Transformer network model during training, reducing the number of layers for simple tasks and increasing the number of layers for complex tasks.
[0023]
[0024] Among them, L adj is the number of layers after adjustment, L min is the minimum number of layers, L max is the maximum number of layers, α is the adaptive depth control hyperparameter, complexity is the measure of task complexity, μ is the complexity threshold, exp is the exponential function, and round is the rounding operator;
[0025] S23. In the Encoder part, a dynamic self-attention mechanism is used, and the data at each time step is adjusted by calculating a learnable adaptive attention weight:
[0026]
[0027] Among them, α ij represents the attention weight of the i-th moment to the j-th moment, sim(h i ,h j ) is the similarity score between the i-th moment and the j-th moment, σ is the activation function, w is the dynamic self-attention mechanism weight, |h i -h j | is the absolute value of the feature difference, which is used to reflect the magnitude of the change between the data, n represents the total length of the time series data, h i represents the feature representation at the i-th moment, h jrepresents the feature representation at the jth moment;
[0028] S24. Through the multi-head self-attention mechanism, calculate the correlation between the data of each time step and other time steps, generate the attention weight of each time step, and dynamically adjust the weight of each time step;
[0029] S25. Use a sparse attention mechanism to calculate the attention relationship between time steps in time series data. Through the local perception window and global key point recognition mechanism, it reduces the amount of calculation and accelerates the training process of the Transformer network model:
[0030]
[0031] in, is the attention weight in the sparse attention mechanism, N(i) represents the local neighborhood size of the sparse attention mechanism, only the time step related to the current moment will calculate the attention weight, and the weight of other positions is zero;
[0032] S26. In the decoder part, the cross-attention mechanism is combined to combine the features output by the encoder with the position information of the target sequence to decode and generate the preliminary remaining life prediction results of mechanical and electronic components;
[0033] S27. Use sparse matrix calculation to optimize the calculation process of the attention mechanism, reduce memory usage and computational complexity, and use residual connections and layer normalization for data transfer and normalization after each layer of self-attention calculation;
[0034] S28. Through the training feedback mechanism, after each round of training, the weights and parameters of the self-attention mechanism are updated based on the difference between the prediction results output by the Transformer network model and the actual data. The training feedback is used to optimize the sparse attention mechanism and the adaptive depth control module.
[0035] S29. Apply the trained Transformer network model to the real-time collected mechanical and electronic component data.
[0036] Optionally, the S3 specifically includes:
[0037] S31. Initialize the population of parrot optimization algorithms. Each parrot in the population represents a hyperparameter combination (α, w, N(i)), where α is the adaptive depth control hyperparameter, w is the dynamic self-attention mechanism weight, and N(i) is the local neighborhood size of the sparse attention mechanism.
[0038] S32. Set the search range of hyperparameters, where α∈[α min ,α max ],w∈[w min,w max ],N(i)∈[N min ,N max ], α min and α max represents the minimum and maximum values of the adaptive depth control hyperparameter, w min and w max Represents the minimum and maximum values of the dynamic self-attention mechanism weight, N min and N max Represent the minimum and maximum values of the local neighborhood size of the sparse attention mechanism and initialize the position and velocity vectors of each parrot individual;
[0039] S33. Calculate the complexity index for each input time series data sample to guide the Transformer network model structure and hyperparameter search;
[0040] S34. Calculate the fitness value for each parrot individual. The fitness function is a multi-objective function, defined as follows:
[0041]
[0042] Among them, Loss() represents the prediction error of the Transformer network model on the validation set. is the depth penalty term, λ1 and λ2 are adjustment coefficients, and L adj is the number of network layers after adjustment, L max is the maximum number of layers, Loss(α,w,N(i)) represents the prediction error of the Transformer network model, including the mean square error and mean absolute error;
[0043] S35. Update the individual historical optimal position pbest of the parrot and the global optimal position gbest of the population according to the fitness value, and record the current optimal hyperparameter combination;
[0044] S36, dynamically adjust the inertia weight ω according to the current iteration algebra k k :
[0045]
[0046] Update individual positions according to inertia weights:
[0047]
[0048] Among them, r1, r2 are random numbers, c1, c2 are acceleration constants, ω max is the maximum inertia weight, ω min is the minimum inertia weight, k max is the maximum number of iterations, is the current position of the i-th parrot in the k+1th generation, is the current position of the i-th parrot in the k-th generation, is the speed of the i-th parrot, pbest i is the best historical position of the i-th parrot;
[0049] S37. If the global optimal solution is not updated for multiple generations, or the prediction error of the Transformer network model is greater than the average error in the high-volatility time series segment, the state-aware local perturbation mechanism is activated to generate the perturbation individual x perturb :
[0050]
[0051] Where T is the number of high error time slices, e t is the prediction error of the t-th time slice, is the average error of the Transformer network model, To estimate the gradient direction, γ is the perturbation intensity coefficient;
[0052] S38, for the disturbed individual x perturb Perform fitness evaluation. If the performance is better than the current gbest, replace the global optimal hyperparameter combination; otherwise, keep the original gbest unchanged and continue iterating.
[0053] S39, when the maximum number of iterations is reached or the global optimal solution is stable, output the optimal hyperparameter combination (α * ,w * ,N(i) * ) and applied to the Transformer network model structure and parameter configuration;
[0054] S310: Train the optimized Transformer network model on the training set and generate the final remaining life prediction results of mechanical and electronic components based on real-time input data.
[0055] Optionally, the final remaining life prediction result of the mechanical and electronic components refers to the component current, voltage, temperature and vibration input at the current time step, the Encoder module in the optimized Transformer network model performs time series structure modeling, identifies the cross-time dependency between multiple variables through a multi-head dynamic self-attention mechanism, and generates a potential representation vector in combination with an adaptive deep structure. The potential representation vector is further decoded by the Decoder module into a corresponding remaining life prediction value. The remaining life prediction value represents the time period that the component can continue to work under the current operating status and historical decay trend without replacement, power outage or maintenance. In the time period prediction process, a complexity perception mechanism is introduced to dynamically adjust the Transformer network model structure and inference depth based on the standard deviation, mean change rate and spectral energy index of the current input sequence. The final output remaining life prediction result is in time slices, combined with the historical life decay trajectory and feature variation trend, to give a time prediction index for the corresponding component to continue operating under unmaintained conditions, which is used to support early warning judgment and maintenance decision-making.
[0056] Optionally, the complexity indicators specifically include the standard deviation, mean change rate and spectral energy of the samples, which are used to evaluate the volatility and complexity of time series data.
[0057] Optionally, the S4 specifically includes:
[0058] S41, receiving a final remaining life prediction result of the mechanical and electronic components from the optimized Transformer network model, wherein the final remaining life prediction result of the mechanical and electronic components is a prediction value obtained by processing the working data of the mechanical and electronic components collected in real time by the Decoder part;
[0059] S42, comparing the predicted remaining life with a set warning threshold to determine whether the predicted remaining life is less than the warning threshold;
[0060] S43. If the predicted remaining life is less than the warning threshold, the warning mechanism is triggered, indicating that the equipment may be at risk of failure or is close to being scrapped;
[0061] S44. Generate warning information based on the warning conditions, including the remaining life prediction result, warning status, and corresponding maintenance suggestions or optimization measures;
[0062] S45. The generated warning information is sent to the terminal devices of the operation and maintenance personnel in real time through the Internet of Things platform. The relevant personnel receive the warning notification in time and take appropriate response measures;
[0063] S46. Based on the feedback of actual operation results and warning effectiveness, the early warning mechanism is dynamically adjusted, the threshold settings are adjusted, and the frequency and content of early warning notifications are optimized.
[0064] The beneficial effects of the present invention are:
[0065] This invention utilizes an Internet of Things (IoT) platform to enable real-time monitoring of the operating status of mechanical and electronic components. It fully collects multi-source, heterogeneous time-series data, including information on multiple characteristic dimensions such as current, voltage, temperature, and vibration, providing a rich and accurate input data foundation for the life prediction model. Compared to traditional monitoring methods that rely on a single data source or offline sampling, this invention can fully reflect the dynamic characteristics of components under actual operating conditions, significantly improving the timeliness and data integrity of life predictions.
[0066] This paper adopts an improved Transformer network model. By introducing an adaptive depth control mechanism, a dynamic self-attention mechanism, and a sparse attention mechanism, it can dynamically adjust the network structure and flexibly change the feature attention range to address the non-stationarity, multi-scale changes, and local anomalies of time series data in complex working environments. This improves the model's stability and prediction accuracy in long-term time series data modeling. Unlike traditional time series modeling methods with fixed depth or static attention mechanisms, this paper can optimize network parameter configuration in real time based on the complexity of the input data, effectively overcoming the problems of overfitting, gradient vanishing, and insufficient modeling, allowing the model to maintain good generalization ability and convergence speed at different operating stages.
[0067] By introducing dynamic guidance of complexity indicators during the training and inference stages, the present invention can perceive the complexity of time series data based on statistical features such as standard deviation, mean change rate, and spectral energy, guide the adjustment of the number of layers and the direction of hyperparameter search of the Transformer network, and achieve adaptive coupling of model structure and data characteristics. In conjunction with the Parrot optimization algorithm, a global search optimization of the Transformer model hyperparameters (including the number of layers, self-attention weights, local neighborhood windows, etc.) is performed. During the hyperparameter optimization process, the present invention takes into account both prediction error minimization and model complexity control, effectively avoiding the problem of traditional optimization methods falling into local optimality or unreasonable hyperparameter selection, shortening model deployment time, and improving the model's ability to adapt to multiple scenarios.
[0068] In terms of the application of life prediction results, the present invention can not only generate the final remaining life prediction value of mechanical and electronic components, but also, in combination with the preset warning threshold, trigger the health warning mechanism in real time based on the prediction results, automatically generate warning information including risk level, remaining available time and maintenance recommendations, and push it to the operation and maintenance personnel terminal. In this way, the system can provide early failure risk prompts, assist operation and maintenance personnel in formulating maintenance or replacement plans in advance, and avoid the significant impact of sudden equipment failures on production. In addition, the present invention dynamically updates the model parameters through the error feedback mechanism, further optimizes subsequent prediction results, and forms a closed-loop self-learning system.
[0069] In summary, in the field of life prediction and monitoring of mechanical and electronic components, the present invention breaks through the technical limitations of traditional single feature modeling, static network structure, manual adjustment of hyperparameters and response lag, significantly improves the accuracy of life prediction, the real-time performance of the system and the intelligence level of the early warning mechanism, and has good application promotion prospects and industrial value. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0071] Figure 1 This is a flow chart of a method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things proposed by the present invention;
[0072] Figure 2 Schematic diagram of the process of optimizing the hyperparameters of the Transformer network model using the Parrot optimization algorithm of the IoT-based mechanical and electronic component life prediction and monitoring method proposed in the present invention. DETAILED DESCRIPTION
[0073] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0074] refer to Figure 1 and Figure 2 , a method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things, comprising the following steps:
[0075] S1. Collect multi-source time series data of mechanical and electronic components, pre-process the multi-source time series data, and generate a processed time series data set;
[0076] S2. Input the time series data set into the Transformer network model, which specifically includes an Encoder and a Decoder;
[0077] S3. Use the Parrot optimization algorithm to optimize the hyperparameters of the Transformer network model. Based on the optimized Transformer network model, the real-time collected working data of the mechanical and electronic components is input, and the final remaining life prediction results of the mechanical and electronic components are generated through the Decoder.
[0078] S4. Compare the predicted final remaining life of the mechanical and electronic components with the set warning threshold. When the predicted remaining life is less than the preset threshold, trigger the warning mechanism and generate warning information;
[0079] S5. Generate feedback data based on the comparison between the actual operating data and the final remaining life prediction results, and use the feedback data to update the parameters of the optimized Transformer network model;
[0080] S6. Real-time monitoring data, final remaining life prediction results and early warning information are sent to operation and maintenance personnel through the Internet of Things platform to assist in formulating equipment maintenance and optimization strategies.
[0081] In this embodiment, the multi-source time series data specifically includes real-time working data of multiple sensors such as temperature, vibration, pressure and load, which are used to reflect the working status of mechanical and electronic components and perform life prediction and monitoring.
[0082] In this embodiment, the preprocessing of multi-source time series data specifically includes data cleaning, denoising and standardization operations, which are used to improve the quality of multi-source time series data.
[0083] In this embodiment, the encoder is used to extract features from a time series data set, and the decoder is used to generate preliminary remaining life prediction results for mechanical and electronic components.
[0084] In this embodiment, S2 specifically includes:
[0085] S21. Construct a Transformer network model, wherein the Transformer network model includes multiple Encoder and Decoder layers, wherein the Encoder is used to extract features from a time series dataset, and the Decoder is used to generate a remaining life prediction result for mechanical and electronic components, and the depth of each Encoder and Decoder layer can be dynamically adjusted according to the complexity of the input data;
[0086] S22. Dynamically adjust the number of layers of the Transformer network based on the complexity of the input data or task requirements through the adaptive depth control module. The adaptive depth control module automatically selects the appropriate number of layers based on the feedback of the Transformer network model during training, reducing the number of layers for simple tasks and increasing the number of layers for complex tasks.
[0087]
[0088] Among them, L adj is the number of layers after adjustment, L min is the minimum number of layers, L max is the maximum number of layers, α is the adaptive depth control hyperparameter, complexity is the measure of task complexity, μ is the complexity threshold, exp is the exponential function, and round is the rounding operator;
[0089] S23. In the Encoder part, a dynamic self-attention mechanism is used, and the data at each time step is adjusted by calculating a learnable adaptive attention weight:
[0090]
[0091] Among them, α ij represents the attention weight of the i-th moment to the j-th moment, sim(h i ,h j ) is the similarity score between the i-th moment and the j-th moment, σ is the activation function, w is the dynamic self-attention mechanism weight, |h i -h j | is the absolute value of the feature difference, which is used to reflect the magnitude of the change between the data, n represents the total length of the time series data, h i represents the feature representation at the i-th moment, h j represents the feature representation at the jth moment;
[0092] S24. Through the multi-head self-attention mechanism, calculate the correlation between the data of each time step and other time steps, generate the attention weight of each time step, and dynamically adjust the weight of each time step;
[0093] S25. Use a sparse attention mechanism to calculate the attention relationship between time steps in time series data. Through the local perception window and global key point recognition mechanism, it reduces the amount of calculation and accelerates the training process of the Transformer network model:
[0094]
[0095] in, is the attention weight in the sparse attention mechanism, N(i) represents the local neighborhood size of the sparse attention mechanism, only the time step related to the current moment will calculate the attention weight, and the weight of other positions is zero;
[0096] S26. In the decoder part, the cross-attention mechanism is combined to combine the features output by the encoder with the position information of the target sequence to decode and generate the preliminary remaining life prediction results of mechanical and electronic components;
[0097] S27. Use sparse matrix calculation to optimize the calculation process of the attention mechanism, reduce memory usage and computational complexity, and use residual connections and layer normalization for data transfer and normalization after each layer of self-attention calculation;
[0098] S28. Through the training feedback mechanism, after each round of training, the weights and parameters of the self-attention mechanism are updated based on the difference between the prediction results output by the Transformer network model and the actual data. The training feedback is used to optimize the sparse attention mechanism and the adaptive depth control module.
[0099] S29. Apply the trained Transformer network model to the real-time collected mechanical and electronic component data.
[0100] In this embodiment, S3 specifically includes:
[0101] S31. Initialize the population of parrot optimization algorithms. Each parrot in the population represents a hyperparameter combination (α, w, N(i)), where α is the adaptive depth control hyperparameter, w is the dynamic self-attention mechanism weight, and N(i) is the local neighborhood size of the sparse attention mechanism.
[0102] S32. Set the search range of hyperparameters, where α∈[α min ,α max ],w∈[w min ,w max ],N(i)∈[N min ,N max ], α min and α max represents the minimum and maximum values of the adaptive depth control hyperparameter, w min and w max Represents the minimum and maximum values of the dynamic self-attention mechanism weight, N min and N max Represent the minimum and maximum values of the local neighborhood size of the sparse attention mechanism and initialize the position and velocity vectors of each parrot individual;
[0103] S33. Calculate the complexity index for each input time series data sample to guide the Transformer network model structure and hyperparameter search;
[0104] S34. Calculate the fitness value for each parrot individual. The fitness function is a multi-objective function, defined as follows:
[0105]
[0106] Among them, Loss() represents the prediction error of the Transformer network model on the validation set. is the depth penalty term, λ1 and λ2 are adjustment coefficients, and L adj is the number of network layers after adjustment, L max is the maximum number of layers, Loss(α,w,N(i)) represents the prediction error of the Transformer network model, including the mean square error and mean absolute error;
[0107] S35. Update the individual historical optimal position pbest of the parrot and the global optimal position gbest of the population according to the fitness value, and record the current optimal hyperparameter combination;
[0108] S36, dynamically adjust the inertia weight ω according to the current iteration algebra k k :
[0109]
[0110] Update individual positions according to inertia weights:
[0111]
[0112] Among them, r1, r2 are random numbers, c1, c2 are acceleration constants, ω max is the maximum inertia weight, ω min is the minimum inertia weight, k max is the maximum number of iterations, is the current position of the i-th parrot in the k+1th generation, is the current position of the i-th parrot in the k-th generation, is the speed of the i-th parrot, pbest i is the best historical position of the i-th parrot;
[0113] S37. If the global optimal solution is not updated for multiple generations, or the prediction error of the Transformer network model is greater than the average error in the high-volatility time series segment, the state-aware local perturbation mechanism is activated to generate the perturbation individual x perturb :
[0114]
[0115] Where T is the number of high error time slices, e t is the prediction error of the t-th time slice, is the average error of the Transformer network model, To estimate the gradient direction, γ is the perturbation intensity coefficient;
[0116] S38, for the disturbed individual x perturb Perform fitness evaluation. If the performance is better than the current gbest, replace the global optimal hyperparameter combination; otherwise, keep the original gbest unchanged and continue iterating.
[0117] S39, when the maximum number of iterations is reached or the global optimal solution is stable, output the optimal hyperparameter combination (α * ,w * ,N(i) * ) and applied to the Transformer network model structure and parameter configuration;
[0118] S310: Train the optimized Transformer network model on the training set and generate the final remaining life prediction results of mechanical and electronic components based on real-time input data.
[0119] In this embodiment, the final remaining life prediction result of the mechanical and electronic components refers to the component current, voltage, temperature and vibration input at the current time step. The encoder module in the optimized Transformer network model performs time series structure modeling, identifies the cross-temporal dependencies between multiple variables through a multi-head dynamic self-attention mechanism, and generates a latent representation vector in combination with an adaptive deep structure. The latent representation vector is further decoded by the decoder module into the corresponding remaining life prediction value. The remaining life prediction value represents the time period that the component can continue to operate under the premise of not being replaced, powered off, or repaired under the current operating state and historical decay trends. Among them, the complexity perception mechanism is introduced into the time period prediction process. The Transformer network model structure and inference depth are dynamically adjusted according to the standard deviation, mean change rate and spectral energy index of the current input sequence. The final output remaining life prediction result is in time slices. Combined with the historical life decay trajectory and feature variation trend, it provides a prediction index for the time period for the corresponding component to continue to operate under unmaintained conditions, which is used to support early warning judgment and maintenance decision-making.
[0120] In this embodiment, the complexity indicators specifically include the standard deviation, mean change rate and spectrum energy of the samples, which are used to evaluate the volatility and complexity of time series data.
[0121] In this embodiment, the S4 specifically includes:
[0122] S41, receiving a final remaining life prediction result of the mechanical and electronic components from the optimized Transformer network model, wherein the final remaining life prediction result of the mechanical and electronic components is a prediction value obtained by processing the working data of the mechanical and electronic components collected in real time by the Decoder part;
[0123] S42, comparing the predicted remaining life with a set warning threshold to determine whether the predicted remaining life is less than the warning threshold;
[0124] S43. If the predicted remaining life is less than the warning threshold, the warning mechanism is triggered, indicating that the equipment may be at risk of failure or is close to being scrapped;
[0125] S44. Generate warning information based on the warning conditions, including the remaining life prediction result, warning status, and corresponding maintenance suggestions or optimization measures;
[0126] S45. The generated warning information is sent to the terminal devices of the operation and maintenance personnel in real time through the Internet of Things platform. The relevant personnel receive the warning notification in time and take appropriate response measures;
[0127] S46. Based on the feedback of actual operation results and warning effectiveness, the early warning mechanism is dynamically adjusted, the threshold settings are adjusted, and the frequency and content of early warning notifications are optimized.
[0128] Example 1:
[0129] To verify the feasibility of this invention, it was applied to a large-scale automobile manufacturing plant. The equipment on the production line utilizes a large number of critical mechanical and electronic components, such as motor bearings, high-precision temperature sensors, power relay modules, and hydraulic actuators. These components are constantly exposed to high-frequency starts and stops, heavy vibration loads, and complex temperature and humidity environments. Traditional maintenance methods based on manual experience and regular inspections cannot accurately reflect the actual degradation of these components. This results in a high rate of sudden equipment failures, rising maintenance costs, and an increasing risk of production interruptions, severely restricting overall production capacity and equipment utilization.
[0130] To address these issues, this factory implemented an IoT-based lifespan prediction and monitoring method for mechanical and electronic components. IoT sensor modules were deployed on key equipment, integrating real-time data collection for multiple parameters, including current, voltage, vibration, and temperature. Data sampling was set at a rate of every five seconds to ensure complete capture of equipment operating status. All sensor data was aggregated in real time via a 5G industrial private network to a central IoT platform for centralized preprocessing and storage.
[0131] In the data modeling stage, the improved Transformer network of the present invention is used for life prediction modeling. This model not only introduces a dynamic self-attention mechanism to better capture the correlation between various time series features, but also introduces an adaptive depth adjustment mechanism to dynamically control the number of network layers and the number of attention heads according to the standard deviation, mean change rate and spectral energy of the collected data, solving the problem of insufficient model adaptability in scenarios of different complexity. At the same time, the hyperparameters of the model (such as the number of layers, learning rate, number of attention heads, sparse perception window, etc.) are globally and dynamically searched by the Parrot optimization algorithm to ensure that each round of training finds the optimal configuration based on the current data characteristics, effectively avoiding the performance bottleneck caused by traditional manual parameter adjustment.
[0132] In practice, the platform generates real-time hourly predictions of the remaining life of each component. When the predicted remaining life falls below different preset thresholds, a health alert is automatically triggered. A complete report, including the estimated remaining life, failure risk level, and recommended maintenance window, is generated and pushed to the operations team. By introducing a closed-loop prediction-alert-maintenance mechanism, factories can dynamically schedule maintenance based on the true health status of each component, significantly improving the accuracy and timeliness of maintenance.
[0133] To validate the effectiveness of the proposed method, the factory conducted a six-month comparative test on two production lines. One line used traditional scheduled maintenance (routine inspections every 1,000 hours of operation), while the other fully applied the proposed method for lifespan prediction-driven intelligent maintenance. Throughout the testing period, statistics were collected on the number of equipment failures, planned maintenance requirements, overall downtime, average component remaining life utilization, and maintenance costs.
[0134] Comparative results show that applying the method of the present invention significantly reduces the equipment's sudden failure rate, improves maintenance planning, improves overall equipment availability, and significantly reduces maintenance costs. Particularly under high-load, high-frequency vibration conditions, the method of the present invention can promptly identify components that are about to degrade and fail, allowing for their replacement in advance. This avoids the blindness and lag inherent in traditional scheduled maintenance, significantly reducing production interruptions and spare parts inventory pressures.
[0135] Table 1 Comparison of the effects of traditional periodic maintenance and the life prediction method of the present invention
[0136]
[0137] A comparison in Table 1 clearly shows that during the six-month test period from January to June 2025, the production line using traditional regular maintenance experienced an average of four equipment failures per month. However, the production line using the IoT-based mechanical and electronic component life prediction and monitoring method of the present invention saw the number of sudden failures significantly reduced to one per month. This demonstrates that the method of the present invention can effectively identify potential component failure risks in advance, significantly reducing the frequency of sudden downtime events and significantly improving the stability and continuity of the production line.
[0138] In terms of planned maintenance, the traditional scheduled maintenance model schedules an average of one routine inspection per month. However, with the implementation of the present invention, the number of planned maintenance inspections has increased to two per month, thanks to the ability to dynamically schedule maintenance based on real-time prediction results. While this may appear to be a slight increase in the frequency of planned maintenance, the precise early warning and flexible scheduling have prevented a large number of unexpected failures, significantly improving overall operational efficiency.
[0139] In terms of downtime, traditional maintenance methods result in an average of 12 hours of downtime per machine per month. However, machines using the method described in this invention experience an average of only 3 hours of downtime per month, a reduction of over 75%. This significant reduction in downtime not only directly improves machine availability but also effectively reduces production losses and resource waste caused by equipment downtime.
[0140] Comparing component lifespan utilization, the traditional method achieved an average remaining lifespan utilization of only 65% for individual components. Many components were replaced prematurely despite still performing well, resulting in wasted resources. However, the method proposed in this paper, through real-time prediction and accurate understanding of component degradation, increased the average remaining lifespan utilization to 90%, significantly improving component utilization, extending the effective lifespan of components, and reducing spare parts inventory and procurement costs.
[0141] The present invention also demonstrates significant advantages in terms of maintenance costs. Under traditional maintenance models, the average direct cost of a single maintenance session is 3,500 yuan. Using the present invention's method, this direct cost drops to 2,400 yuan, a 31.4% reduction in overall maintenance costs. This reduction in maintenance costs is primarily due to the reduction in emergency repair costs associated with sudden failures, as well as the rational scheduling of maintenance time windows, which avoids unplanned overtime and high emergency procurement expenses.
[0142] Furthermore, the overall availability of equipment using the method of the present invention increased by approximately 11.2% compared to traditional methods. This improvement demonstrates that the method of the present invention can maximize equipment operating efficiency through more scientific and accurate lifespan prediction and health management, helping manufacturers to further optimize operating costs and resource allocation while ensuring production safety.
[0143] Comprehensive analysis shows that the IoT-based life prediction and monitoring method for mechanical and electronic components proposed in the present invention, with its comprehensive perception of the working status of components, accurate modeling of complex timing characteristics by the improved Transformer network, dynamic tuning of hyperparameters by the Parrot optimization algorithm, and real-time health warning based on life prediction results, not only effectively solves the problems of high sudden failure rate, waste of maintenance resources and low equipment availability in the traditional regular maintenance mode, but also achieves obvious economic benefits and operational optimization in actual industrial applications. It has extremely high promotion value and broad application prospects.
[0144] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things, characterized in that: The steps include: S1. Collect multi-source time series data of mechanical and electronic components, pre-process the multi-source time series data, and generate a processed time series data set; S2. Input the time series data set into the Transformer network model, which specifically includes an Encoder and a Decoder; S3. Use the Parrot optimization algorithm to optimize the hyperparameters of the Transformer network model. Based on the optimized Transformer network model, the real-time collected working data of the mechanical and electronic components is input, and the final remaining life prediction results of the mechanical and electronic components are generated through the Decoder. S4. Compare the predicted final remaining life of the mechanical and electronic components with the set warning threshold. When the predicted remaining life is less than the preset threshold, trigger the warning mechanism and generate warning information; S5. Generate feedback data based on the comparison between the actual operating data and the final remaining life prediction results, and use the feedback data to update the parameters of the optimized Transformer network model; S6. Real-time monitoring data, final remaining life prediction results and early warning information are sent to operation and maintenance personnel through the Internet of Things platform to assist in formulating equipment maintenance and optimization strategies.
2. The method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things according to claim 1, characterized in that: The multi-source time series data specifically includes real-time working data of multiple sensors such as temperature, vibration, pressure and load, which are used to reflect the working status of mechanical and electronic components and perform life prediction and monitoring.
3. The method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things according to claim 1, characterized in that: The preprocessing of multi-source time series data specifically includes data cleaning, denoising and standardization operations, which are used to improve the quality of multi-source time series data.
4. The method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things according to claim 1, characterized in that: The encoder is used to extract features from a time series data set, and the decoder is used to generate preliminary remaining life prediction results for mechanical and electronic components.
5. The method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things according to claim 1, characterized in that: The S2 specifically includes: S21. Construct a Transformer network model, wherein the Transformer network model includes multiple Encoder and Decoder layers, wherein the Encoder is used to extract features from a time series dataset, and the Decoder is used to generate a remaining life prediction result for mechanical and electronic components, and the depth of each Encoder and Decoder layer can be dynamically adjusted according to the complexity of the input data; S22. Dynamically adjust the number of layers of the Transformer network based on the complexity of the input data or task requirements through the adaptive depth control module. The adaptive depth control module automatically selects the appropriate number of layers based on the feedback of the Transformer network model during training, reducing the number of layers for simple tasks and increasing the number of layers for complex tasks. Among them, L adj is the number of layers after adjustment, L min is the minimum number of layers, L max is the maximum number of layers, α is the adaptive depth control hyperparameter, complexity is the measure of task complexity, μ is the complexity threshold, exp is the exponential function, and round is the rounding operator; S23. In the Encoder part, a dynamic self-attention mechanism is used, and the data at each time step is adjusted by calculating a learnable adaptive attention weight: Among them, α ij represents the attention weight of the i-th moment to the j-th moment, sim(h i ,h j ) is the similarity score between the i-th moment and the j-th moment, σ is the activation function, w is the dynamic self-attention mechanism weight, |h i -h j | is the absolute value of the feature difference, which is used to reflect the magnitude of the change between the data, n represents the total length of the time series data, h i represents the feature representation at the i-th moment, h j represents the feature representation at the jth moment; S24. Through the multi-head self-attention mechanism, calculate the correlation between the data of each time step and other time steps, generate the attention weight of each time step, and dynamically adjust the weight of each time step; S25. Use a sparse attention mechanism to calculate the attention relationship between time steps in time series data. Through the local perception window and global key point recognition mechanism, it reduces the amount of calculation and accelerates the training process of the Transformer network model: in, is the attention weight in the sparse attention mechanism, N(i) represents the local neighborhood size of the sparse attention mechanism, only the time step related to the current moment will calculate the attention weight, and the weight of other positions is zero; S26. In the decoder part, the cross-attention mechanism is combined to combine the features output by the encoder with the position information of the target sequence to decode and generate the preliminary remaining life prediction results of mechanical and electronic components; S27. Use sparse matrix calculation to optimize the calculation process of the attention mechanism, reduce memory usage and computational complexity, and use residual connections and layer normalization for data transfer and normalization after each layer of self-attention calculation; S28. Through the training feedback mechanism, after each round of training, the weights and parameters of the self-attention mechanism are updated based on the difference between the prediction results output by the Transformer network model and the actual data. The training feedback is used to optimize the sparse attention mechanism and the adaptive depth control module. S29. Apply the trained Transformer network model to the real-time collected mechanical and electronic component data.
6. The method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things according to claim 1, characterized in that: The S3 specifically includes: S31. Initialize the population of parrot optimization algorithms. Each parrot in the population represents a hyperparameter combination (α, w, N(i)), where α is the adaptive depth control hyperparameter, w is the dynamic self-attention mechanism weight, and N(i) is the local neighborhood size of the sparse attention mechanism. S32. Set the search range of hyperparameters, where α∈[α min ,α max ],w∈[w min ,w max ],N(i)∈[N min ,N max ], α min and α max represents the minimum and maximum values of the adaptive depth control hyperparameter, w min and w max Represents the minimum and maximum values of the dynamic self-attention mechanism weight, N min and N max Represent the minimum and maximum values of the local neighborhood size of the sparse attention mechanism and initialize the position and velocity vectors of each parrot individual; S33. Calculate the complexity index for each input time series data sample to guide the Transformer network model structure and hyperparameter search; S34. Calculate the fitness value for each parrot individual. The fitness function is a multi-objective function, defined as follows: Among them, Loss() represents the prediction error of the Transformer network model on the validation set. is the depth penalty term, λ1 and λ2 are adjustment coefficients, and L adj is the number of network layers after adjustment, L max is the maximum number of layers, Loss(α,w,N(i)) represents the prediction error of the Transformer network model, including the mean square error and mean absolute error; S35. Update the individual historical optimal position pbest of the parrot and the global optimal position gbest of the population according to the fitness value, and record the current optimal hyperparameter combination; S36, dynamically adjust the inertia weight ω according to the current iteration algebra k k : Update individual positions according to inertia weights: Among them, r1, r2 are random numbers, c1, c2 are acceleration constants, ω max is the maximum inertia weight, ω min is the minimum inertia weight, k max is the maximum number of iterations, is the current position of the i-th parrot in the k+1th generation, is the current position of the i-th parrot in the k-th generation, is the speed of the i-th parrot, pbest i is the best historical position of the i-th parrot; S37. If the global optimal solution is not updated for multiple generations, or the prediction error of the Transformer network model is greater than the average error in the high-volatility time series segment, the state-aware local perturbation mechanism is activated to generate the perturbation individual x perturb : Where T is the number of high error time slices, e t is the prediction error of the t-th time slice, is the average error of the Transformer network model, To estimate the gradient direction, γ is the perturbation intensity coefficient; S38, for the disturbed individual x perturb Perform fitness evaluation. If the performance is better than the current gbest, replace the global optimal hyperparameter combination; otherwise, keep the original gbest unchanged and continue iterating. S39, when the maximum number of iterations is reached or the global optimal solution is stable, output the optimal hyperparameter combination (α * ,w * ,N(i) * ) and applied to the Transformer network model structure and parameter configuration; S310: Train the optimized Transformer network model on the training set and generate the final remaining life prediction results of mechanical and electronic components based on real-time input data.
7. The method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things according to claim 6, characterized in that: The final remaining life prediction result of the mechanical and electronic components refers to the time series structure modeling performed by the Encoder module in the optimized Transformer network model based on the component current, voltage, temperature, and vibration input at the current time step. The multi-head dynamic self-attention mechanism is used to identify the cross-temporal dependencies between multiple variables. The adaptive deep structure is combined to generate a latent representation vector. The latent representation vector is further decoded by the Decoder module into the corresponding remaining life prediction value. The remaining life prediction value represents the time period that the component can continue to operate under the premise of not being replaced, powered off, or repaired, under the current operating state and historical degradation trends. The complexity perception mechanism is introduced into the time period prediction process. The Transformer network model structure and inference depth are dynamically adjusted according to the standard deviation, mean change rate, and spectral energy indicators of the current input sequence. The final remaining life prediction result is output in time slices. Combined with the historical life decay trajectory and feature variation trend, it provides a prediction indicator of the time period for the corresponding component to continue to operate under unmaintained conditions, which is used to support early warning judgment and maintenance decision-making.
8. The method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things according to claim 5, characterized in that: The complexity indicators specifically include the standard deviation, mean change rate and spectral energy of the samples, which are used to evaluate the volatility and complexity of time series data.
9. The method for predicting and monitoring the life of mechanical and electronic components based on the Internet of Things according to claim 1, characterized in that: The S4 specifically includes: S41, receiving a final remaining life prediction result of the mechanical and electronic components from the optimized Transformer network model, wherein the final remaining life prediction result of the mechanical and electronic components is a prediction value obtained by processing the working data of the mechanical and electronic components collected in real time by the Decoder part; S42, comparing the predicted remaining life with a set warning threshold to determine whether the predicted remaining life is less than the warning threshold; S43. If the predicted remaining life is less than the warning threshold, the warning mechanism is triggered, indicating that the equipment may be at risk of failure or is close to being scrapped; S44. Generate warning information based on the warning conditions, including the remaining life prediction result, warning status, and corresponding maintenance suggestions or optimization measures; S45. The generated warning information is sent to the terminal devices of the operation and maintenance personnel in real time through the Internet of Things platform. The relevant personnel receive the warning notification in time and take appropriate response measures; S46. Based on the feedback of actual operation results and warning effectiveness, the early warning mechanism is dynamically adjusted, the threshold settings are adjusted, and the frequency and content of early warning notifications are optimized.
Citation Information
Cited By
Equipment health state monitoring method
CN121234319A
Mini module service life prediction method and device based on operation data driving and storage medium
CN121580651A