Method and device for predicting service life of optical module
Through the improved iTransformer model combined with self-supervised and supervised training, the optical module index data is used to generate feature vectors, which solves the problem of difficult to identify the sub-health status of the optical module, realizes accurate prediction of the optical module life, reduces operation and maintenance costs, and improves the stability of network services.
Patent Information
- Application Number
- CN202510805884.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-17
AI Technical Summary
The existing technology cannot effectively identify the sub-health status of optical modules, resulting in degradation of network service quality and intermittent interruption. Traditional operation and maintenance methods cannot identify the risk of optical module aging in a timely manner, which increases the challenges of network operation and maintenance.
Using the improved iTransformer model, through a combination of self-supervised training and supervised training, the index data of the optical module is used to generate feature vectors to predict the remaining life of the optical module, reduce the dependence on labeled training samples, and improve prediction accuracy.
It realizes accurate prediction of optical module life, reduces the demand for faulty optical module data, saves training time, improves the reliability and accuracy of prediction, and avoids unnecessary maintenance work.
Smart Images

Figure CN120357962A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technologies, and in particular, to a method and device for predicting the lifespan of optical modules. Background Art
[0002] Data transmission and reception on network interfaces both require optical modules. Long-term operation of optical modules can cause performance degradation of optical devices, resulting in unstable links. This unstable "sub-healthy" state will affect the integrity of data transmission and reception. Traditional operation and maintenance means cannot identify risks and give early warnings in time before the aging and failure of optical modules. This "sub-healthy" state of optical modules will lead to a decline in the service quality provided by the network to services, making the network in a critical state of intermittent interruption between "usable" and "unusable", greatly affecting the perception of service quality.
[0003] Therefore, how to quickly and effectively perform operation and maintenance on a large number of optical modules in the network has become a challenge for network operation and maintenance. Summary of the Invention
[0004] To overcome the problems existing in the related art, this application provides a method and device for predicting the lifespan of optical modules.
[0005] According to the first aspect of the embodiments of this application, a method for predicting the lifespan of an optical module is provided. The method includes: Performing self-supervised training on the original iTransformer model using unlabeled training samples; Modifying the prediction head of the iTransformer model after self-supervised training into a regression head to obtain an improved iTransformer model; Performing supervised training on the improved iTransformer model using labeled training samples to obtain a lifespan prediction model; Wherein, the lifespan prediction model is used to predict the remaining lifespan of the optical module. The unlabeled training samples include feature vectors of the optical module within a first time span. The labeled training samples include feature vectors of the optical module within a first time span and the remaining lifespan label of the optical module at the last time point within the first time span. The feature vectors within the first time span include feature vectors at multiple time points, and each time point's feature vector is calculated based on the index data of the optical module.
[0006] According to the second aspect of the embodiments of this application, a device for predicting the lifespan of an optical module is provided. The device includes: A self-supervised training module, configured to perform self-supervised training on the original iTransformer model using unlabeled training samples; A model modification module, configured to modify the prediction head of the iTransformer model after self-supervised training into a regression head, so as to obtain an improved iTransformer model; A supervised training module, configured to perform supervised training on the improved iTransformer model by using labeled training samples, so as to obtain a remaining life prediction model; Wherein, the remaining life prediction model is used to predict the remaining life of the optical module, the unlabeled training samples include feature vectors of the optical module within a first time span, and the labeled training samples include feature vectors of the optical module within the first time span and the remaining life label of the optical module at the last time point within the first time span; the feature vectors within the first time span include feature vectors at multiple time points, and the feature vector at each time point is calculated based on the index data of the optical module.
[0007] According to a third aspect of the embodiments of the present application, there is provided an electronic device, including: A memory and one or more processors; the memory is coupled to the processor; wherein, computer program code is stored in the memory, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described above.
[0008] According to a fourth aspect of the embodiments of the present application, there is provided a computer-readable storage medium, including computer instructions, and when the computer instructions are run on an electronic device, the electronic device is caused to execute the method as described above.
[0009] According to a fifth aspect of the embodiments of the present application, there is provided a computer program product, and when the computer program product is run on a computer, the computer is caused to execute the method as described above.
[0010] The technical solutions provided by the embodiments of the present application may include the following beneficial effects: In the embodiments of the present application, first, the remaining life of the optical module is predicted based on the index data of the optical module itself. On the one hand, the accuracy of the remaining life prediction is improved, and on the other hand, different types of maintenance work on the optical module are avoided. In addition, considering that the distribution of each index data of the optical module over time is equivalent to a time series, it is innovatively proposed to use a time series algorithm to solve the remaining life prediction problem, fully mining the long-distance dependence relationship of each index of the optical module, and improving the accuracy and reliability of the remaining life prediction.
[0011] Finally, aiming at the difficulty in obtaining a large number of labeled training samples and the fact that the training method and output results of the original iTransformer model are not applicable to solving the lifespan prediction problem, the embodiments of this application implement model training in the following manner: Two training steps are adopted. First, the original iTransformer model is self-supervised trained using a large number of unlabeled training samples. Then, the prediction head of the model is modified to a regression head to obtain an improved iTransformer model. Finally, the improved iTransformer model is supervised trained using a small number of labeled training samples to obtain a lifespan prediction model. Through the above training method, the dependence on labeled training samples is significantly reduced, so that good training results can be achieved with only a small number of labeled training samples, ensuring the reliability and accuracy of the optical module lifespan prediction.
[0012] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this application. Brief Description of the Drawings
[0013] The drawings here are incorporated into the specification and constitute a part of this application, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0014] Figure 1 It is the first process schematic diagram of the optical module lifespan prediction method provided by the embodiments of this application; Figure 2 It is the second process schematic diagram of the optical module lifespan prediction method provided by the embodiments of this application; Figure 3 It is the third process schematic diagram of the optical module lifespan prediction method provided by the embodiments of this application; Figure 4 It is the fourth process schematic diagram of the optical module lifespan prediction method provided by the embodiments of this application; Figure 5 It is the fifth process schematic diagram of the optical module lifespan prediction method provided by the embodiments of this application; Figure 6 It is the sixth process schematic diagram of the optical module lifespan prediction method provided by the embodiments of this application; Figure 7 It is the functional schematic diagram of the optical module lifespan prediction device provided by the embodiments of this application; Figure 8 It is the structural schematic diagram of the electronic device provided by the embodiments of this application. Detailed Description of the Embodiments
[0015] The following describes the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0016] The current optical module life prediction scheme does not consider the actual index data of each optical module and only relies on the statistical data of the same type of modules. Therefore, the accuracy is relatively low and the reference significance is not great. Moreover, the algorithm requires the training data set to be updated in a timely manner and also needs to continuously add support for new optical module types, resulting in a relatively high maintenance cost.
[0017] In view of the above problems, the present application provides an optical module life prediction method and device. Actively monitor the health status of the optical module and predict the remaining life of the optical module (i.e., the time when the optical module fails), assisting network managers to find potential link failures before the system performance is affected, so as to discover and eliminate potential failure hazards in advance. Through the remaining life alarm, the network administrator can switch the service to the backup link or replace the suspicious device, so as to repair the system without interrupting the service.
[0018] Specifically, the present application realizes the optical module life prediction goal based on the improved iTransformer model, and through two innovative training steps, reduces the demand for large-scale faulty optical module data, effectively saves the training time, and improves the training effect.
[0019] It should be pointed out here that the failure modes of optical modules can be roughly divided into two types: natural aging and internal faults. The latter is an internal sudden fault, which cannot be predicted. The present application mainly aims at the former, the situation caused by the aging of the laser.
[0020] The following details the embodiments of the present application.
[0021] The embodiments of the present application provide an optical module life prediction method, as Figure 1 shown, the method may include the following steps: Step 110: Perform self-supervised training on the original iTransformer model using unlabeled training samples; Step 120: Modify the prediction head of the iTransformer model after self-supervised training into a regression head to obtain an improved iTransformer model; Step 130: Perform supervised training on the improved iTransformer model using labeled training samples to obtain a life prediction model; Among them, the remaining life prediction model is used to predict the remaining life of the optical module. The unlabeled training samples include the feature vectors of the optical module within the first time span, and the labeled training samples include the feature vectors of the optical module within the first time span and the remaining life label of the optical module at the last time point within the first time span; the feature vectors within the first time span include the feature vectors of multiple time points, and the feature vector of each time point is calculated based on the index data of the optical module.
[0022] In the embodiments of the present application, the feature vector of the optical module at any time point is obtained by performing feature engineering on the index data of the optical module, and the embodiments of the present application will periodically collect the index data of the optical module.
[0023] Exemplarily, the index data of the optical module can be continuously collected through network devices such as switches. Common index data includes data based on interface statistics, such as voltage (Voltage), etc., and also includes data based on channel statistics, such as temperature (Temp), bias current (Current Bias), received power (Rx Power), transmitted power (Tx Power), etc.
[0024] Suppose there is currently a 4-channel optical module, then its index data includes: Voltage + 4 channel x (Temp, Current Bias, Rx Power, Tx power) In addition, the port data of the optical module is also very valuable for life prediction. Therefore, as a preferred embodiment, the embodiments of the present application further collect some data based on port statistics from the optical module, such as port error packet data, FEC (Forward Error Correction) data, etc. Among them, the port error packet data can specifically include the number of port error packets, and the FEC data can specifically include the number of error packets corrected by FEC and the number of error packets that cannot be corrected by FEC.
[0025] Therefore, combining the data based on port statistics, the index data of the optical module includes: Voltage + #Channel x (Temp, Current Bias, Rx Power, Tx power) + in_error_packets + FEC_Correctable + FEC_UnCorrectable Exemplarily, the metric data of the optical module is collected every 6 hours, and the metric data at 4 time points can be collected in one day. Assuming that the first time span is 3 months (90 days), then the first time span includes 360 time points, and the feature vectors within the first time span are 360 feature vectors.
[0026] As a specific implementation manner, after collecting the metric data of the optical module, for each item of metric data, in the embodiments of the present application, by calculating the eigenvalue presented within a period of time, such as gradient Gradient, mean value mean, standard deviation STD, minimum value Min, maximum value Max, etc., the feature vectors of the optical module are obtained.
[0027] Therefore, the feature vector of the optical module at any time point can be expressed as follows: [Voltage + #Channel x (Temp, Current Bias, Rx Power, Tx power) + in_error_packets + FEC_Correctable + FEC_UnCorrectable] x [Gradient, mean, std, min, max] In the above formula, in_error_packets represents the number of mispackets at the port, FEC_Correctable represents the number of mispackets that can be automatically corrected by the FEC technology, and FEC_unCorrectable represents the number of mispackets that cannot be automatically corrected by the FEC technology.
[0028] Exemplarily, in the embodiments of the present application, according to the metric data of the optical module within the second time span, its feature vector is calculated, and the second time span can be set to 3 days.
[0029] It can be understood that in practical applications, the dimension size of the feature vector needs to be set in advance. Considering that the maximum number of channels of the optical module is 4, exemplarily, in the embodiments of the present application, the dimension of the feature vector of the optical module is set to 100.
[0030] It is worth mentioning that in practical applications, some optical modules may have only one channel, and some optical modules may not support FEC data. In this case, zero values are taken at the corresponding positions of the feature vector. In this way, it is ensured that the dimensions of the feature vectors of the optical module at each time point are equal.
[0031] In summary, the feature vector of the optical module at any time point can be generated in the manner as Figure 2 shown: Step 210: For the current time point, obtain the metric data of the optical module within the second time span closest to the current time point, where the current time point is the last time point within the second time span; The above-mentioned current time point can be any time point, but within the second time span, the current time point is the last time point within the second time span.
[0032] Step 220: Calculate the characteristic values presented by each item of metric data within the second time span; The above-mentioned characteristic values include at least one of change rate, mean value, mean square deviation, minimum value, and maximum value.
[0033] Step 230: Generate a feature vector of the optical module at the current time point based on the characteristic values.
[0034] Exemplarily, generate a feature vector of the optical module at the current time point according to a preset characteristic dimension size, such as 100.
[0035] As described above, the feature vectors within the first time span are 360 feature vectors. Since the metric data of the optical module is collected periodically, each dimension of the 360 feature vectors generated according to the metric data can be regarded as a time series of a variable. Assuming that the dimension of the feature vector is 100, then these 360 feature vectors can be regarded as time series of 100 variables. That is to say, the model input can be regarded as time series of 100 variables. Therefore, the embodiments of the present application consider using a time series algorithm to achieve the life prediction goal. Specifically, the embodiments of the present application achieve the life prediction goal based on an improved iTransformer model.
[0036] iTransformer is a multi-variable time series prediction model algorithm, which has a strong ability to capture long-distance dependence relationships. In terms of the model architecture, iTransformer uses MPL Projection (Multi-Layer Perceptron Projection Layer) to output the prediction results. However, this algorithm is a prediction algorithm and cannot be directly used for classification, and its training method adopts a self-supervised method. These are not applicable to the life prediction goal of the embodiments of the present application.
[0037] Therefore, the embodiments of this application make the following modifications to the network structure of the iTransformer model: modify the Prediction Header (MPL Projection), which is the last prediction head for prediction, to a Regression Header. The difference between the prediction head and the regression head is that the former maps the feature vector extracted by the backbone network to the output format required for the prediction task, generally a sequence of numbers; the latter is specifically used for the regression task and is used to map the feature vector to a continuous numerical output. For example, in the embodiments of this application, the model output is a predicted numerical value of the remaining useful life.
[0038] In addition, for the improved iTransformer model, the embodiments of this application adopt a supervised training method.
[0039] As a specific implementation manner, the embodiments of this application perform supervised training through the steps as Figure 3 shown below: Step 310: Construct an objective loss function, and use the objective loss function to calculate the mean squared error between the predicted life value and the remaining useful life label, where the predicted life value is predicted by the improved iTransformer model according to the labeled training samples; Step 320: Update the weight parameters of the improved iTransformer model in a backward propagation manner of gradients according to the mean squared error calculated by the objective loss function.
[0040] It should be noted that deep learning algorithms generally need to learn a large amount of training data to obtain excellent actual effects, while the data of faulty optical modules is very precious, and it is very difficult to collect an extremely large amount of such data. Therefore, the embodiments of this application propose two training steps: First, perform self-supervised training on the original iTransformer model using unlabeled training samples. In this step, neither faulty optical module data nor data labeling is required, which can enable the network to well learn the temporal features of multivariate time series and discover the correlations between different variables.
[0041] Second, on the basis of the previous step, modify the last prediction head of the network model to a regression head to obtain an improved iTransformer model. Perform supervised training on the improved iTransformer model using labeled training samples to obtain a remaining useful life prediction model.
[0042] Through this training method, the requirement for a large amount of faulty optical module data can be reduced, the training time can be effectively saved, and the training effect can be improved.
[0043] Exemplarily, a large amount of basic training data (unlabeled training samples) is first collected and made for offline self-supervised training; then, using a small amount of data of faulty optical modules, labeled training samples are made for offline supervised training to obtain a life prediction model; during model deployment, new data of faulty optical modules are generated by network operation and maintenance, and incremental training data (labeled training samples) are made in real time based on these data for online tuning to improve the adaptability of the model to the actual scenario and the prediction accuracy.
[0044] The process of collecting optical module metric data is described below.
[0045] Generally, the collection frequency of optical module metric data is relatively high, usually set to once every 30 seconds, once every 5 minutes, etc. Considering that the aging of optical modules is gradual and slow, in the context of life prediction, there is no need to monitor these metric data particularly frequently.
[0046] Therefore, exemplarily, in the embodiments of the present application, the metric data of the optical module are collected once every 6 hours, so the data of the optical module are collected at 4 time points every day, and the metric data of the optical module are collected at 188 * 4 = 752 time points in half a year.
[0047] To achieve life prediction, in the embodiments of the present application, the metric data of the optical module at each time point within the most recent third time span are cyclically maintained, and the third time span needs to be guaranteed to be greater than half a year.
[0048] It is worth mentioning that emphasizing a time greater than half a year here is because based on statistics and experience in practical applications, it can be known that optical modules with a remaining life of more than half a year generally work well. By cyclically maintaining the metric data of the optical module in the most recent half year in the embodiments of the present application, the long-term change trend of these metrics can be observed, so as to more accurately judge the health status of the optical module. For example, if it is found that the transmitted optical power of the optical module gradually decreases or the extinction ratio gradually decreases within half a year, this may be an early signal that the optical module is about to fail.
[0049] That is to say, if the indicators of an optical module remain stable within half a year, it means that its performance is reliable and it can continue to be used; on the contrary, if the indicators show obvious fluctuations or decreases, the probability of failure may be relatively high. From the perspective of cost-effectiveness, saving data for half a year can provide sufficient effective information for life prediction and fault diagnosis without excessively increasing the storage cost.
[0050] Exemplarily, the above-mentioned third time span can be set to 300 days. In the embodiments of the present application, the metric data of the optical module at each time point within the most recent 300 days are cyclically maintained, that is, the metric data of the most recent 1200 time points are maintained.
[0051] The training process of the life prediction model will be described below.
[0052] Exemplarily, the model training process may include two stages, an offline training stage and an online training stage.
[0053] In the offline training stage, as Figure 1 shown, the offline training process includes: performing self-supervised training on the original iTransformer model using unlabeled training samples; modifying the prediction head of the iTransformer model after self-supervised training into a regression head to obtain an improved iTransformer model; performing supervised training on the improved iTransformer model using labeled training samples to obtain a life prediction model.
[0054] After that, the life prediction model is deployed to the operating environment to enter the online training stage. In the online training stage, as Figure 4 shown, the online training process includes: Step 410: Circularly maintain the metric data of the optical module within the most recent third time span; Step 420: If it is monitored that the optical module fails, generate new labeled training samples according to the circularly maintained metric data and the time of failure; Step 430: Use the newly added labeled training samples to perform online tuning on the life prediction model.
[0055] Specifically, the network operation and maintenance system monitors the status of each optical module. The failure of the optical module usually corresponds to a sharp deterioration of the health indicators, such as a sharp rise in the packet error rate and abnormal verification of key indicators, and the associated services are affected. After it is monitored that the optical module fails, step 420 is executed to extract the recent metric data of the failed optical module and the time of failure for making labeled training samples.
[0056] Exemplarily, circularly maintain the metric data of the optical module at the most recent 1200 time points. The goal is to use the metric data of the optical module in the most recent 3 months (90 days) to predict its remaining life. The metric data for 90 days corresponds to 90x4 = 360 time points. Then, the specific method for making training samples is as follows: For the index data of 1,200 time points of a faulty optical module, every 360 consecutive time points are grouped into one set. The remaining life label value corresponding to this set is the number of days from the last time point of this set to the time of failure. Then, 1200 - 360 = 840 sets can be divided. For the first set, its remaining life label = 840 / 4 = 210, indicating that its remaining life is 210 days; for the 600th set, its remaining life label = 240 / 4 = 60, indicating that its remaining life is 60 days; and so on. In this way, a total of 840 labeled training samples can be made. Each labeled training sample includes 360 100-dimensional feature vectors and also includes the remaining life label.
[0057] The following describes the life prediction process based on the life prediction module.
[0058] It can be understood that after the life prediction model is deployed to the operating environment, the life prediction model can be used to predict the remaining life of the optical module, that is, the time when the optical module fails can be predicted. Specifically, the prediction process is as Figure 5 shown: Step 510: When a life prediction instruction is received or the system time reaches a preset time node, generate feature vectors of the optical module within the most recent first time span according to the cyclically maintained index data, and input them into the life prediction model to obtain the remaining life of the optical module.
[0059] Specifically, during network operation and maintenance, the remaining life of the optical module is predicted according to a preset cycle, such as once a day.
[0060] Exemplarily, the third time span is set to 300 days, and the first time span is set to 3 months. According to the index data of the most recent 300 days maintained cyclically, generate feature vectors at each time point within the most recent 3 months, that is, generate feature vectors of the most recent 360 time points, and input these feature vectors into the life prediction model to obtain the remaining life of the optical module. This predicted value will provide effective reference and support for network operation and maintenance.
[0061] The following provides a specific embodiment to further illustrate the optical module life prediction method of the embodiments of the present application.
[0062] Exemplarily, in this embodiment, the first time span is set to 3 months, the second time span is set to 3 days, and the third time span is set to 300 days; the index data of the optical module is collected every 6 hours, and each collection time is called a time point.
[0063] The overall process is as Figure 6 shown: First, determine the model input and output according to the lifespan prediction requirements: The model input is the feature vector of the optical module within 3 months, and the model output is the predicted value of the remaining lifespan of the optical module.
[0064] Determine the calculation method of the feature vector: For any time point, obtain the index data of the optical module in the 3 days before this time point, calculate the eigenvalue presented by each index data in these 3 days, and obtain the feature vector of the optical module at this time point.
[0065] Select the algorithm for lifespan prediction: Select the iTransformer model. To achieve the lifespan prediction goal, modify its prediction head to a regression head and adopt a supervised training method.
[0066] Produce unlabeled training samples and conduct self-supervised training: Collect the index data of the optical module, generate the feature vector of the optical module at each time point according to the above method, and use the feature vector every 3 months as an unlabeled training sample. Generate a large number of unlabeled training samples and use these unlabeled training samples to conduct self-supervised training on the original iTransformer model.
[0067] Modify the model: Modify the prediction head of the iTransformer model after self-supervised training to a regression head to obtain an improved iTransformer model.
[0068] Produce labeled training samples: Collect the index data of the faulty optical module and the time of failure, generate the feature vector of the optical module at each time point according to the above method, and use the feature vector every 3 months and the remaining lifespan label as a labeled training sample, where the calculation method of the remaining lifespan label is: the difference between the last time point within 3 months and the time of failure.
[0069] Conduct supervised training: Use the labeled training samples to conduct supervised training on the improved iTransformer model to obtain a remaining lifespan prediction model. Specifically, construct an objective loss function for calculating the mean squared error between the predicted lifespan value and the remaining lifespan label, calculate the mean squared error of the labeled training samples according to the objective loss function, and update the weight parameters of the improved iTransformer model through the method of gradient backpropagation to obtain a remaining lifespan prediction model.
[0070] Deploy the remaining lifespan prediction model to the running environment and cyclically maintain the index data of the optical module within 300 days.
[0071] When reaching the preset life prediction time node, or when receiving a life prediction command, life prediction is implemented in the following manner: according to the index data maintained in a cycle, generate the feature vector of the optical module in the most recent 3 months, and input it into the life prediction model to obtain the remaining life of the optical module.
[0072] When it is monitored that the optical module fails, new labeled training samples are made and online tuning is performed in the following manner: according to the index data of the failed optical module and the time of failure, new labeled training samples are made according to the above-mentioned method for making labeled training samples, and the life prediction model is online tuned using the new labeled training samples.
[0073] In summary, feature engineering is performed on the index data of the optical module at each time point, and features such as the change rate (gradient), mean, mean square deviation, minimum value, and maximum value presented by each index in a certain time range are calculated to obtain a 100-dimensional feature vector; the index data of the optical module is maintained in a cycle for at least half a year, 4 data points are taken every day (one data point every 6 hours), and 188 * 4 = 752 data points need to be maintained in half a year, and at most 1200 data points are maintained (in a cycle); if it is monitored that a certain optical module fails, 1200 data points of the optical module and the time of failure are extracted, and corresponding labeled training samples are made based on this; these labeled training samples are used to train the algorithm model, and this training process can be offline training or online training during network operation and maintenance. The algorithm uses an improved regression model based on the iTransformer architecture; during network operation and maintenance, the remaining life of the optical module can be predicted regularly. For example, the index data of the most recent 360 time points of each optical module is used every day to predict the remaining life of the optical module. Through these measures, the time and space correlations of the index data of the optical module are effectively utilized, and the model algorithm is continuously optimized by combining offline and online training, so as to improve the accuracy of the remaining life prediction.
[0074] Based on the same inventive concept, the present application also provides an optical module life prediction device, as Figure 7 shown, the device includes: A self-supervised training module 710, configured to perform self-supervised training on the original iTransformer model using unlabeled training samples; A model modification module 720, configured to modify the prediction head of the iTransformer model after self-supervised training into a regression head to obtain an improved iTransformer model; A supervised training module 730, configured to perform supervised training on the improved iTransformer model using labeled training samples to obtain a life prediction model; Among them, the remaining life prediction model is used to predict the remaining life of the optical module. The unlabeled training samples include the feature vectors of the optical module within the first time span, and the labeled training samples include the feature vectors of the optical module within the first time span and the remaining life label of the optical module at the last time point within the first time span; the feature vectors within the first time span include the feature vectors of multiple time points, and the feature vector of each time point is calculated based on the index data of the optical module.
[0075] As a specific implementation manner, the device further includes a feature vector generation module, and the feature vector generation module generates the feature vector of the optical module at the current time point in the following manner: Obtain the index data of the optical module within the second time span closest to the current time point; the index data includes data based on interface statistics, data based on channel statistics, and data based on port statistics; the current time point is the last time point within the second time span; calculate the feature values presented by each item of the index data on the second time span, and the feature values include at least one of the change rate, mean value, mean square deviation, minimum value, and maximum value; generate the feature vector of the optical module at the current time point based on the feature values.
[0076] As a specific implementation manner, the supervised training module 730 specifically performs supervised training on the improved iTransformer model in the following manner: Construct an objective loss function, and use the objective loss function to calculate the mean square error between the life prediction value and the remaining life label, where the life prediction value is predicted by the improved iTransformer model according to the labeled training samples; update the weight parameters of the improved iTransformer model by means of gradient backpropagation according to the mean square error calculated by the objective loss function.
[0077] As a specific implementation manner, the device further includes an online tuning module, and the online tuning module performs online tuning on the remaining life prediction model in the following manner: Circularly maintain the index data of the optical module within the recent third time span; the third time span is greater than the first time span; if it is monitored that the optical module fails, generate new labeled training samples according to the circularly maintained index data and the failure time; perform online tuning on the remaining life prediction model by using the new labeled training samples.
[0078] As a specific implementation manner, the device further includes a remaining life prediction module, and the remaining life prediction module is used for: When receiving a life prediction instruction, generate a feature vector of the optical module within the most recent first time span according to the index data maintained by the loop, and input it into the life prediction model to obtain the remaining life of the optical module; and / or, When the system time reaches the preset life prediction time node, generate a feature vector of the optical module within the most recent first time span according to the index data maintained by the loop, and input it into the life prediction model to obtain the remaining life of the optical module.
[0079] An embodiment of the present application provides an electronic device, which may include: a memory and one or more processors. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute each function or step of the above method embodiment.
[0080] The structure of the electronic device may refer to Figure 8 the structure of the electronic device 100 shown.
[0081] The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0082] An embodiment of the present application further provides a computer-readable storage medium, which includes computer instructions. When the computer instructions run on an electronic device, the electronic device is enabled to execute each function or step of the above method embodiment.
[0083] The above-mentioned computer-readable storage medium includes, but is not limited to, any one of the following: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc., which are various media that can store program codes.
[0084] An embodiment of the present application further provides a computer program product. When the computer program product runs on a computer, the computer is enabled to execute each function or step of the above method embodiment.
[0085] Among them, the electronic device, computer-readable storage medium, and computer program product provided by the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.
[0086] The above are only the embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes or substitutions can be made to the present application. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for predicting the lifespan of an optical module, characterized in that, The method includes: Performing self-supervised training on the original iTransformer model using unlabeled training samples; Modifying the prediction head of the iTransformer model after self-supervised training into a regression head to obtain an improved iTransformer model; Performing supervised training on the improved iTransformer model using labeled training samples to obtain a remaining life prediction model; Wherein, the remaining life prediction model is used to predict the remaining life of the optical module, the unlabeled training samples include the feature vectors of the optical module within the first time span, and the labeled training samples include the feature vectors of the optical module within the first time span and the remaining life label at the last time point within the first time span; the feature vectors within the first time span include the feature vectors of multiple time points, and each time point's feature vector is calculated based on the index data of the optical module.
2. The method according to claim 1, wherein The method further includes generating the feature vector of the optical module at the current time point in the following manner: Obtaining the index data of the optical module within the second time span closest to the current time point; the index data includes the data based on interface statistics, the data based on channel statistics, and the data based on port statistics; the current time point is the last time point within the second time span; Calculating the characteristic values presented by each of the index data within the second time span, and the characteristic values include at least one of the change rate, mean value, mean square deviation, minimum value, and maximum value; Generating the feature vector of the optical module at the current time point based on the characteristic values.
3. The method according to claim 1, characterized in that The method specifically performs supervised training on the improved iTransformer model in the following manner: Constructing an objective loss function, and using the objective loss function to calculate the mean square error between the remaining life prediction value and the remaining life label, where the remaining life prediction value is predicted by the improved iTransformer model according to the labeled training samples; Updating the weight parameters of the improved iTransformer model by means of gradient backpropagation according to the mean square error calculated by the objective loss function.
4. The method according to claim 1, wherein The method further includes online tuning of the remaining life prediction model in the following manner: Circularly maintaining the index data of the optical module within the recent third time span; the third time span is greater than the first time span; If it is monitored that the optical module fails, generating new labeled training samples according to the circularly maintained index data and the failure time; Performing online tuning on the remaining life prediction model using the new labeled training samples.
5. The method according to claim 1, characterized in that The method further includes: When receiving a remaining life prediction instruction, generating the feature vector of the optical module within the recent first time span according to the circularly maintained index data, and inputting it into the remaining life prediction model to obtain the remaining life of the optical module; and / or, When the system time reaches the preset life prediction time node, a feature vector of the optical module within the most recent first time span is generated based on the index data of cyclic maintenance and input into the life prediction model to obtain the remaining life of the optical module.
6. An optical module life prediction device, characterized in that The device includes: A self-supervised training module for performing self-supervised training on the original iTransformer model using unlabeled training samples; A model modification module for modifying the prediction head of the iTransformer model after self-supervised training into a regression head to obtain an improved iTransformer model; A supervised training module for performing supervised training on the improved iTransformer model using labeled training samples to obtain a life prediction model; Wherein, the life prediction model is used to predict the remaining life of the optical module, the unlabeled training samples include the feature vectors of the optical module within the first time span, and the labeled training samples include the feature vectors of the optical module within the first time span and the remaining life label of the optical module at the last time point within the first time span; the feature vectors within the first time span include the feature vectors of multiple time points, and the feature vector of each time point is calculated based on the index data of the optical module.
7. The device according to claim 6, characterized in that, The device further includes a feature vector generation module, and the feature vector generation module generates the feature vector of the optical module at the current time point in the following manner: Obtain the index data of the optical module within the second time span closest to the current time point; the index data includes data based on interface statistics, data based on channel statistics, and data based on port statistics; the current time point is the last time point within the second time span; Calculate the eigenvalues presented by each of the index data within the second time span, and the eigenvalues include at least one of a change rate, an average value, a mean square deviation, a minimum value, and a maximum value; Generate the feature vector of the optical module at the current time point based on the eigenvalues.
8. An electronic device, characterized in that, Includes: A memory and one or more processors; the memory is coupled to the processor; wherein, computer program code is stored in the memory, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the method according to any one of claims 1-5.
9. A computer-readable storage medium, comprising computer instructions, characterized in that, When the computer instructions run on the electronic device, the electronic device is caused to execute the method according to any one of claims 1-5.
10. A computer program product, characterized in that, When the computer program product runs on a computer, the computer is caused to execute the method according to any one of claims 1-5.
Citation Information
Patent Citations
Method and device for predicting performance of optical module
CN114389688A
Model training method, disk life prediction method, related device and equipment
CN117251114A
Method and system for predicting residual service life of gearbox based on multi-task semi-supervised learning
CN119935550A
Method for training and refining an artificial intelligence
US10621495B1
Labeling a dataset
US20210158205A1