Optical module fault prediction and model training method and related product
By using knowledge distillation training based on teacher and student window data, combined with multi-dimensional historical time-series data and standardized processing, an optical module fault prediction model was constructed. This solved the problem of insufficient optical module fault prediction capability and achieved more efficient fault prediction and higher prediction accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-04-21
AI Technical Summary
How to improve the predictive capability of optical module failures in order to avoid link performance degradation or communication interruption caused by optical module failures.
By acquiring teacher and student window data from the training data, a knowledge distillation training was performed using the teacher model to generate an optical module fault prediction model. This model was then preprocessed and standardized using multi-dimensional historical time-series data, and a composite loss function was constructed for model training.
It improves the accuracy and ability to predict optical module failures, reducing the risk of service interruption due to failures.
Smart Images

Figure CN121907334A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, particularly to cloud computing, computing power and other technical fields, and specifically to a method, apparatus, device, medium and product for optical module fault prediction and model training. Background Technology
[0002] In intelligent computing center networks, optical modules are the core components for photoelectric conversion. Deployed between servers and switches, optical modules may cause link performance degradation or communication interruption, which in turn may lead to service interruption.
[0003] Improving the ability to predict optical module failures is a problem that needs to be solved. Summary of the Invention
[0004] This disclosure provides a method, apparatus, device, medium, and product for optical module fault prediction and model training.
[0005] According to one aspect of this disclosure, a method for training an optical module fault prediction model is provided, comprising: acquiring multiple training data, each training data including: teacher window data and student window data for training the optical module, wherein the teacher window data is future time period data of the student window data; training a teacher model using the teacher window data; and using the student window data to perform knowledge distillation training on a student model based on the teacher model, and using the trained student model as the optical module fault prediction model.
[0006] According to another aspect of this disclosure, an optical module fault prediction method is provided, comprising: acquiring historical data of the optical module within a first preset time period before the current moment; using an optical module fault prediction model to predict the historical data to obtain a fault probability for a future time period; the future time period being a second preset time period after the current moment; and determining a fault prediction result for the future time period based on the fault probability and a target threshold; wherein the optical module fault prediction model is trained using the method described in any of the preceding claims.
[0007] According to another aspect of this disclosure, a training device for an optical module fault prediction model is provided, comprising: an acquisition module for acquiring multiple training data, each training data including: teacher window data and student window data for training optical modules, wherein the teacher window data is future time period data of the student window data; a first training module for training a teacher model using the teacher window data; and a second training module for using the teacher window data and the student window data to perform knowledge distillation training on a student model based on the teacher model, and using the trained student model as an optical module fault prediction model.
[0008] According to another aspect of this disclosure, an optical module fault prediction device is provided, comprising: an acquisition module for acquiring historical data of an optical module within a first preset time period prior to the current moment; a prediction module for using an optical module fault prediction model to predict the historical data to obtain a fault probability for a future time period; the future time period being a second preset time period after the current moment; and a determination module for determining a fault prediction result for the future time period based on the fault probability and a target threshold; wherein the optical module fault prediction model is trained using the method described in any of the preceding embodiments.
[0009] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to said at least one processor; wherein the memory stores instructions executable by said at least one processor, said instructions being executed by said at least one processor to enable said at least one processor to perform the method as described in any of the foregoing aspects.
[0010] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method according to any of the preceding aspects.
[0011] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to any of the preceding aspects.
[0012] According to embodiments of this disclosure, the ability to predict optical module failures can be improved.
[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0014] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0015] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure;
[0016] Figure 2 This is a schematic diagram according to the second embodiment of the present disclosure;
[0017] Figure 3 This is a schematic diagram illustrating the process of obtaining positive sample data according to embodiments of this disclosure;
[0018] Figure 4 This is a schematic diagram according to the third embodiment of the present disclosure;
[0019] Figure 5 This is a schematic diagram according to the fourth embodiment of the present disclosure;
[0020] Figure 6 This is a schematic diagram according to the fifth embodiment of the present disclosure;
[0021] Figure 7 This is a schematic diagram according to the sixth embodiment of the present disclosure;
[0022] Figure 8 This is a schematic diagram of an electronic device used to implement the optical module fault prediction model training method or optical module fault prediction method of the embodiments of this disclosure. Detailed Implementation
[0023] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0024] Figure 1 Based on a schematic diagram of the first embodiment of this disclosure, this embodiment provides a training method for an optical module fault prediction model. For example... Figure 1 As shown, the method includes:
[0025] 101. Obtain multiple training data sets, each including: teacher window data and student window data of the optical module, wherein the teacher window data is future time period data of the student window data.
[0026] 102. Use the teacher window data to train the teacher model.
[0027] 103. Using the teacher window data and the student window data, the student model is trained by knowledge distillation based on the teacher model, and the trained student model is used as the optical module fault prediction model.
[0028] During model training, training data from the training set is used. The training set is obtained by partitioning the sample data in the sample set. Therefore, the training data is a portion of the sample data. For example, if the sample data includes the first data, the second data, and the third data, after partitioning, the first data and the second data are assigned to the training set, and then the first data and the second data are used as training data for subsequent training.
[0029] Both sample data and training data correspond to optical modules. The optical module corresponding to the sample data can be called the sample optical module, and the optical module corresponding to the training data can be called the training optical module. The training optical module is a part of the optical modules in the sample optical module.
[0030] For example, based on the above example, assuming the first data is the data of optical module A, the second data is the data of optical module B, and the third data is the data of optical module C, then the sample optical modules include: optical module A, optical module B, and optical module C. Since the training set includes the first data and the second data after partitioning, the training optical modules include: optical module A and optical module B.
[0031] Each training data point corresponds to a training optical module, which may include: teacher window data and student window data of the training optical module, and the teacher window data is future time period data of the student window data.
[0032] For example, if the training optical modules include optical module A and optical module B, then the training data includes: the training data corresponding to optical module A and the training data corresponding to optical module B.
[0033] Taking optical module A as an example, the training data corresponding to optical module A includes: teacher window data of optical module A and student window data of optical module A, and the teacher window data is future time period data of student window data.
[0034] Future time period data refers to teacher window data, which occurs later than student window data.
[0035] For example, if the student window data is from the first time period and the teacher window data is from the second time period, then the second time period is later than the first time period.
[0036] For example, for optical module A, taking a certain time point t as an example, the time series data of optical module A between [t-24, t] can be collected in advance. Then, the time series data between [t-24, t-12] can be used as the student window data of optical module A, and the time series data between [t-12, t] can be used as the teacher window data of optical module A.
[0037] Where t-12 represents the 12th hour before t, and t-24 represents the 24th hour before t.
[0038] After obtaining teacher window data and student window data, the teacher model is trained using the teacher window data.
[0039] For example, based on the above example, the training data includes: training data corresponding to optical module A, and training data corresponding to optical module B. The training data corresponding to optical module A includes: teacher window data and student window data of optical module A. The training data corresponding to optical module B includes: teacher window data and student window data of optical module B. Then:
[0040] The teacher model is trained using teacher window data from optical module A and teacher window data from optical module B.
[0041] After the teacher model is trained, the student model is trained using the trained teacher model and teacher window data and student window data, based on the knowledge distillation method.
[0042] For example, using the teacher window data and student window data of optical module A and the teacher window data and student window data of optical module B, the trained teacher model is used to train the student model using knowledge distillation, and the trained student model is used as the optical module fault prediction model.
[0043] Subsequently, in the application phase, this optical module fault prediction model can be used to predict optical module faults.
[0044] In this embodiment, since the teacher window data is future time period data of the student window data, it can provide future state guidance. The teacher model trained based on the teacher window data has future guidance capabilities. During knowledge distillation training, it can provide future guidance information to the student model, improve the student model's ability to perceive future states, and thus obtain a more predictive optical module fault prediction model. In turn, this model can be used to improve the prediction capability for optical module faults.
[0045] Figure 2 Based on a schematic diagram of the second embodiment of this disclosure, this embodiment provides a training method for an optical module fault prediction model. For example... Figure 2 As shown, the method includes
[0046] 201. Obtain multiple sample data; each sample data includes: standard window data of the sample light module, the standard window data includes: teacher window preprocessing data corresponding to the teacher window data, and student window preprocessing data corresponding to the student window data.
[0047] 202. Divide the multiple sample data into multiple datasets, the multiple datasets including: a training set, the training set including standard window data of multiple training optical modules, the training optical modules being a portion of the sample optical modules.
[0048] 203. Standardize the standard window data of the multiple training optical modules to obtain multiple training data; each training data includes: teacher window data and student window data of the training optical modules, and the teacher window data is the future time period data of the student window data.
[0049] 204. Use the teacher window data to train the teacher model.
[0050] 205. Using the teacher window data and the student window data, the student model is trained by knowledge distillation based on the teacher model, and the trained student model is used as the optical module fault prediction model.
[0051] Each sample data point corresponds to a sample optical module, specifically including the standard window data of the sample optical module.
[0052] The sample optical module can be a positive sample or a negative sample. A positive sample refers to a faulty optical module, and a negative sample refers to a normal optical module.
[0053] Accordingly, the multiple sample data include positive sample data and negative sample data. Positive sample data refers to the standard window data of the faulty optical module, while negative sample data refers to the standard window data of the normal optical module.
[0054] After acquiring multiple sample data points, these data points are divided into several datasets, specifically: a training set, a validation set, and a test set. The training set is used to train the model, such as adjusting adjustable parameters like model weights in each training round. The validation set is used to evaluate the model's performance in each training round, and hyperparameters such as the learning rate can be adjusted based on the evaluation results. The test set is used to evaluate the model's performance after training is complete, and is deployed when the evaluation results meet the requirements.
[0055] Specifically, the data can be divided according to a preset ratio. For example, if the preset ratio is 70:15:15, and assuming there are M samples (including positive and negative samples), then 0.7*M samples will form the training set, 0.15*M samples will form the validation set, and 0.15*M samples will form the test set. Each dataset includes both positive and negative samples.
[0056] In addition, the above dataset is divided into units based on optical modules.
[0057] The sample data can record the identifier of the optical module (such as the serial number). Based on the identifier of the optical module, the sample data corresponding to the same optical module are divided into one dataset.
[0058] For example, for optical module A, its sample data can only belong to one of the training set, validation set, and test set, and it is impossible for both the training set and the validation set to contain sample data of optical module A.
[0059] In this way, dividing the dataset based on optical modules can prevent information leakage and improve the generalization performance of the model.
[0060] Through the above division, a training set can be obtained, which includes multiple sample data, namely multiple standard window data of training optical modules.
[0061] Then, the standard window data of the training optical module was standardized to obtain the training data.
[0062] Standardization can be achieved using a pre-defined standardization method.
[0063] For example, Z-Score standardization is used to standardize standard window data to obtain training data. Z-Score standardization (also called standard deviation standardization or zero mean standardization) is a preprocessing method that transforms data into a standard normal distribution with a mean of 0 and a standard deviation of 1, which can eliminate the influence of different units and data ranges on model training.
[0064] After obtaining the training data, the model is trained using the training data to obtain the optical module fault prediction model.
[0065] For example, the sample optical modules include: optical module A, optical module B and optical module C, and the corresponding sample data includes: standard window data of optical module A, standard window data of optical module B and standard window data of optical module C. After partitioning, assuming that the standard window data of optical module A and the standard window data of optical module B are both partitioned into the training set, then the training optical modules include: optical module A and optical module B.
[0066] Next, the standard window data of optical module A and optical module B are standardized to obtain the training data corresponding to optical module A and optical module B. Taking optical module A as an example, the training data corresponding to optical module A specifically includes: teacher window data and student window data of optical module A, and the teacher window data is future time period data of student window data.
[0067] After obtaining multiple training data sets, the teacher model is trained using the teacher window data, and the student model is trained using the teacher window data and student window data based on knowledge distillation, thereby obtaining the optical module fault prediction model.
[0068] For example, multiple training data sets include: training data corresponding to optical module A, and training data corresponding to optical module B. Specifically, the training data for module A includes the teacher window data and student window data for optical module A, and the training data for module B specifically includes the teacher window data and student window data for optical module B. Then:
[0069] The teacher model is trained using teacher window data from optical module A and teacher window data from optical module B. The teacher and student window data from optical module A and optical module B are used to train the student model using the trained teacher model and knowledge distillation. The trained student model is then used as the optical module fault prediction model.
[0070] In this embodiment, training data is obtained by standardizing the standard window data of the training optical module. The subsequent model training can be carried out based on the standardized data, thereby improving the model accuracy.
[0071] The aforementioned standard window data can be obtained by preprocessing the historical time-series data of the optical module.
[0072] Specifically, positive sample data (standard window data of faulty optical modules) is obtained by preprocessing the historical time-series data of faulty optical modules, while negative sample data (standard window data of normal optical modules) is obtained by preprocessing the historical time-series data of normal optical modules.
[0073] The process of acquiring positive sample data (standard window data of faulty optical modules) is described below.
[0074] Figure 3 This is a schematic diagram illustrating the process of obtaining positive sample data according to embodiments of this disclosure. Figure 3 As shown, the method includes:
[0075] 301. Obtain historical time-series data of the faulty optical module within a preset time period before the fault time.
[0076] 302. The historical time series data is preprocessed to obtain preprocessed data.
[0077] 303. The preset time period is divided into student window time period and teacher window time period, and the teacher window time period is the future time period of the student window time period.
[0078] 304. The preprocessed data corresponding to the student window time period is used as the student window preprocessed data of the faulty optical module, and the preprocessed data corresponding to the teacher window time period is used as the teacher window preprocessed data of the faulty optical module; and the student window preprocessed data and teacher window preprocessed data of the faulty optical module are combined to form the standard window data of the faulty optical module.
[0079] During the operation of the optical module, its status can be monitored by the monitoring system, so as to know whether the optical module is a faulty optical module or a normal optical module. For faulty optical modules, the time of failure can also be determined.
[0080] For faulty optical modules, acquire historical time-series data within a preset time period prior to the fault time.
[0081] For example, if monitoring reveals that optical module A is a faulty optical module and the fault time is t, and assuming the preset time period is 24 hours, then the historical time series data of optical module A between [t-24, t] is obtained.
[0082] Historical time-series data can be multi-dimensional, specifically including: the operating parameters of the optical module, and the data parameters in the data transmitted by the optical module.
[0083] Operating parameters may include physical quantities such as operating temperature, operating voltage, four-channel emitted optical power, four-channel received optical power, and four-channel laser bias current;
[0084] Specifically, data parameters can be forward error correction (FEC) parameters, which are parameters carried in the data and are mainly used to verify the integrity of the data.
[0085] The aforementioned operating parameters can be obtained through a monitoring system for optical modules, while FEC parameters can be obtained by collecting and parsing the data transmitted by the optical modules.
[0086] After acquiring historical time-series data, it is preprocessed to obtain preprocessed data.
[0087] Preprocessing can include data alignment and data cleaning.
[0088] Data alignment refers to adjusting data from different dimensions to a unified dimension. For example, historical time-series data includes the aforementioned operating condition parameters and FEC parameters. The acquisition periods for operating condition parameters and FEC are usually different. For instance, if the acquisition period for operating condition parameters is 30 minutes and the acquisition period for FEC parameters is 1 minute, then within 30 minutes, the operating condition parameter originally has only 1 value, while the FEC has 30 values. In this case, a padding method can be used to fill the operating condition parameter with 30 values. Specifically, a forward padding method can be used, that is, all 30 values in the 30 minutes are filled with the acquired values.
[0089] Data cleaning refers to removing outliers. For example, for a single dimension of operating data (such as voltage), the mean and standard deviation within a preset window can be calculated, and data outside the range of (mean + 3 * standard deviation) can be removed. The removed data can be filled in by interpolating with surrounding data.
[0090] The preset time period can be divided into student window time period and teacher window time period, and the teacher window time period is the future time period of the student window time period.
[0091] For example, based on the above example, the preset time period is [t-24, t]. The student window time period can be selected as [t-24, t-12], and the teacher window time period can be selected as [t-12, t]. Then, the preprocessed data corresponding to each window time period are combined to form standard window data.
[0092] Taking optical module A as an example, the standard window data of optical module A includes: preprocessed data of the student window of optical module A, such as the preprocessed data of the time period [t-24, t-12], and preprocessed data of the teacher window of optical module A, such as the preprocessed data of the time period [t-12, t].
[0093] The above describes the process of acquiring sample data from the faulty optical module.
[0094] For normal optical modules, historical time-series data of normal optical modules can also be obtained. The historical time-series data can be preprocessed to obtain standard window data of normal optical modules, which can be used as negative sample data.
[0095] The window length of the historical time-series data for normal optical modules is the same as that for faulty optical modules, such as 24 hours. The starting point can be randomly selected; for example, when acquiring historical time-series data for normal optical modules between [t1-24, t1], t1 can be randomly selected. After preprocessing the historical time-series data of normal optical modules, standard window data for normal optical modules is obtained. The preprocessed data for the period [t1-24, t1-12] is used as the preprocessed data for the student window of normal optical modules, and the preprocessed data for the period [t1-12, t1] is used as the preprocessed data for the teacher window of normal optical modules.
[0096] After obtaining the positive and negative sample data mentioned above, they can be divided into training set, validation set, and test set. The positive and negative sample data in the training set are then standardized to obtain the training data.
[0097] For operating condition information, its Z-score can be directly standardized; for FEC parameters, logarithmic calculation can be performed first, followed by Z-score standardization.
[0098] Then, the teacher model was trained first using the training data, and the student model was trained using the knowledge distillation method. The trained student model was then used as the optical module fault prediction model.
[0099] In this embodiment, by preprocessing historical time-series data to obtain sample data, the accuracy of the sample data can be improved, thereby improving the accuracy of model and optical module fault prediction.
[0100] In addition, by using multidimensional data as historical time-series data, the correlation between information from multiple dimensions can be referenced, further improving the accuracy of optical module fault prediction.
[0101] Figure 4 This is a schematic diagram based on the third embodiment of the present disclosure. This embodiment provides a training method for an optical module fault prediction model. Figure 4 As shown, the method includes:
[0102] 401. Obtain multiple training data sets, each training data set including: teacher window data and student window data of the training optical module, wherein the teacher window data is future time period data of the student window data.
[0103] 402. Use the teacher window data to train the teacher model.
[0104] 403. Input the teacher window data into the teacher model to obtain teacher prediction results.
[0105] 404. Input the student window data into the student model to obtain student prediction results.
[0106] 405. Based on the teacher prediction results and the student prediction results, construct the target loss function.
[0107] 406. Adjust the model parameters of the student model based on the target loss function to obtain a trained student model, which serves as the optical module fault prediction model.
[0108] Each training data point also includes a real label corresponding to the training optical module. This real label is used to characterize whether the training optical module is a faulty optical module or a normal optical module. This real label is pre-labeled manually or by other means.
[0109] When training the teacher model, teacher window data can be input into the teacher model to obtain prediction information. Then, based on the prediction information and the corresponding real labels, a loss function for training the teacher model can be constructed. The model parameters of the teacher model can be adjusted using this loss function to complete the training of the teacher model.
[0110] The loss function used to train the teacher model can specifically be a weighted binary cross-entropy loss function, expressed by the formula:
[0111]
[0112] in, This is the loss function used to train the teacher model, where N is the number of training data points. These are the predicted probabilities obtained from the teacher model. It's a real label. These are preset weights, and the specific values can be determined based on the ratio of positive to negative samples.
[0113] After obtaining the teacher model through training, the student model is then trained using the teacher model.
[0114] The loss function used to train the student model can be called the target loss function, which can be constructed as follows:
[0115] Based on the student prediction results and the real labels corresponding to the student window data, a first loss function is constructed;
[0116] Based on the student prediction results and the teacher prediction results, a second loss function is constructed;
[0117] The first loss function and the second loss function are weighted and summed to obtain the target loss function.
[0118] The first loss function can be the cross-entropy loss function, and the second loss function can be the KL divergence loss function, expressed by the formula:
[0119]
[0120] It is an activation function, such as the sigmoid function.
[0121]
[0122] in, It is the target loss function. It is the first loss function. This is the second loss function; N is the total number of training data. These are the original outputs of the student model and the teacher model, respectively. These are hyperparameters that can be adjusted based on the validation set.
[0123] After constructing the target loss function, the model parameters of the student model are adjusted using the target loss function until training is completed. The trained student model is then used as the optical module fault prediction model.
[0124] The student and teacher models described above employ a temporal prediction backbone network with identical structure and independent parameters, sharing the same input dimensions and masking processing logic. This temporal prediction backbone network can include convolutional layers and encoding layers. The convolutional layers extract minute-level local features, while the encoding layers model long-sequence dependencies, thereby better extracting and learning relevant knowledge and improving the model's predictive ability. The specific backbone network structure can be set according to actual conditions to enhance flexibility.
[0125] In this embodiment, the student model can be trained based on the knowledge distillation method through the above training method, so that the student model can learn more fully the multi-dimensional features before the fault occurs, and can make more efficient use of the effective information in various monitoring data to extract key fault symptom features from complex time series data, thereby improving the model's predictive ability.
[0126] In addition, the target loss function mentioned above references multiple types of information and is a composite loss function. Through the synergistic effect of cross-entropy loss and KL divergence loss, the system can make full use of labeled data while effectively integrating the predictive knowledge of the teacher model, and maintain good training results under different data quality conditions.
[0127] Figure 5 This is a schematic diagram according to the fourth embodiment of the present disclosure. This embodiment provides a method for predicting optical module faults, such as... Figure 5 As shown, the method includes:
[0128] 501. Obtain historical data of the optical module within the first preset time period before the current moment.
[0129] 502. An optical module fault prediction model is used to predict the historical data to obtain the fault probability in the future time period; the future time period is the second preset time period after the current time.
[0130] 503. Based on the fault probability and the target threshold, determine the fault prediction result for the future time period.
[0131] The optical module fault prediction model is trained using the method described in any of the above embodiments.
[0132] The first and second preset time periods correspond to the student and teacher window periods during model training. For example, if both the student and teacher window periods are 12 hours, then both the first and second preset time periods are also 12 hours. Historical data can be multi-dimensional data, such as operating condition parameters and FEC parameters. The current time is represented by t. For a certain optical module, the operating condition parameters and FEC parameters of the optical module in the time period [t-12, t] can be obtained and input into the pre-trained optical module fault prediction model. After processing by the model, the output is the fault probability of the future time period, i.e., the time period [t, t+12].
[0133] Expressed as a formula:
[0134]
[0135] in, It is a trained student model (optical module fault prediction model). These are model parameters, where t is the current time. It is historical data from the 12 hours prior to the current moment. It is the future time period obtained by the model, that is, the probability of failure from the current moment to the next 12 hours.
[0136] In this embodiment, since the optical module fault prediction model has good predictive ability, it is used to make predictions, which can improve the optical module fault prediction capability.
[0137] In some embodiments, the method further includes:
[0138] Based on the validation set, obtain the precision and recall corresponding to each candidate threshold among multiple candidate thresholds;
[0139] The target threshold is determined from the plurality of candidate thresholds based on the precision and the recall.
[0140] In this process, after dividing the sample data as described above, a validation set can be obtained. Based on the validation set and the student model, relevant parameters can be obtained. Based on the relevant parameters, precision and recall can be calculated. Then, based on precision and recall, the target threshold can be determined.
[0141] Expressed as a formula:
[0142]
[0143] The relevant parameters include TP, FP, and FN, as mentioned above. TP represents true positives, FP represents false positives, FN represents false negatives, Precision is the accuracy rate, and Recall is the recall rate. It is a configurable candidate threshold. It is the target threshold.
[0144] In this embodiment, determining the target threshold by precision and recall can improve the accuracy of the target threshold, thereby improving the accuracy of optical module fault prediction.
[0145] Figure 6 This is a schematic diagram based on the fifth embodiment of the present disclosure. This embodiment provides a training device for an optical module fault prediction model. Figure 6 As shown, the device 600 includes: an acquisition module 601, a first training module 602, and a second training module 603.
[0146] The acquisition module 601 is used to acquire multiple training data, each training data including: teacher window data and student window data for training the optical module, wherein the teacher window data is future time period data of the student window data; the first training module 602 is used to train the teacher model using the teacher window data; the second training module 603 is used to use the teacher window data and the student window data to perform knowledge distillation training on the student model based on the teacher model, and use the trained student model as the optical module fault prediction model.
[0147] In this embodiment, since the teacher window data is future time period data of the student window data, it can provide future state guidance. The teacher model trained based on the teacher window data has future guidance capabilities. During knowledge distillation training, it can provide future guidance information to the student model, improve the student model's ability to perceive future states, and thus obtain a more predictive optical module fault prediction model. In turn, this model can be used to improve the prediction capability for optical module faults.
[0148] In some embodiments, the acquisition module 601 is further configured to:
[0149] Acquire multiple sample data; each sample data includes: standard window data of the sample light module, the standard window data includes: teacher window preprocessing data corresponding to the teacher window data, and student window preprocessing data corresponding to the student window data;
[0150] The multiple sample data are divided into multiple datasets, including: a training set, which includes standard window data of multiple training optical modules, and the training optical modules are a portion of the optical modules in the sample optical modules;
[0151] The standard window data of the multiple training optical modules are standardized to obtain the multiple training data.
[0152] In this embodiment, training data is obtained by standardizing the standard window data of the training optical module. The subsequent model training can be carried out based on the standardized data, thereby improving the model accuracy.
[0153] In some embodiments, the sample data includes: standard window data of the faulty optical module, the standard window data of the faulty optical module including: preprocessed student window data of the faulty optical module, and preprocessed teacher window data of the faulty optical module; the acquisition module 601 is further used for:
[0154] Acquire the historical time-series data of the faulty optical module within a preset time period prior to the fault time point;
[0155] The historical time-series data is preprocessed to obtain preprocessed data;
[0156] The preset time period is divided into student window time period and teacher window time period, and the teacher window time period is a future time period of the student window time period;
[0157] The preprocessed data corresponding to the student window time period is used as the student window preprocessed data of the faulty optical module, and the preprocessed data corresponding to the teacher window time period is used as the teacher window preprocessed data of the faulty optical module.
[0158] In this embodiment, by preprocessing historical time-series data to obtain sample data, the accuracy of the sample data can be improved, thereby improving the accuracy of model and optical module fault prediction.
[0159] In some embodiments, the second training module 603 is further configured to:
[0160] The teacher window data is input into the teacher model to obtain teacher prediction results;
[0161] The student window data is input into the student model to obtain student prediction results;
[0162] Based on the teacher's prediction results and the student's prediction results, a target loss function is constructed;
[0163] The model parameters of the student model are adjusted based on the target loss function to obtain a trained student model.
[0164] In this embodiment, the student model can be trained based on the knowledge distillation method through the above training method, so that the student model can learn more fully the multi-dimensional features before the fault occurs, and can make more efficient use of the effective information in various monitoring data to extract key fault symptom features from complex time series data, thereby improving the model's predictive ability.
[0165] In some embodiments, the second training module 603 is further configured to:
[0166] Based on the student prediction results and the real labels corresponding to the student window data, a first loss function is constructed;
[0167] Based on the student prediction results and the teacher prediction results, a second loss function is constructed;
[0168] The first loss function and the second loss function are weighted and summed to obtain the target loss function.
[0169] In this embodiment, the target loss function mentioned above references multiple types of information and is a composite loss function. Through the synergistic effect of cross-entropy loss and KL divergence loss, the system can effectively integrate the predictive knowledge of the teacher model while making full use of labeled data, and maintain good training results under different data quality conditions.
[0170] Figure 7 This is a schematic diagram based on the sixth embodiment of the present disclosure, which provides an optical module fault prediction device. For example... Figure 7 As shown, the device 700 includes: an acquisition module 701, a prediction module 702, and a determination module 703.
[0171] The acquisition module 701 is used to acquire historical data of the optical module within a first preset time period before the current time; the prediction module 702 is used to use an optical module fault prediction model to predict the historical data to obtain the fault probability of a future time period, wherein the future time period is a second preset time period after the current time; and the determination module 703 is used to determine the fault prediction result of the future time period based on the fault probability and a target threshold.
[0172] The optical module fault prediction model is trained using the method described in any of the above embodiments.
[0173] In this embodiment, since the optical module fault prediction model has good predictive ability, it is used to make predictions, which can improve the optical module fault prediction capability.
[0174] In some embodiments, the device further includes:
[0175] The threshold module is used to obtain the precision and recall corresponding to each candidate threshold among multiple candidate thresholds based on the validation set; and to determine the target threshold among the multiple candidate thresholds based on the precision and the recall.
[0176] In this embodiment, determining the target threshold by precision and recall can improve the accuracy of the target threshold, thereby improving the accuracy of optical module fault prediction.
[0177] It is understood that the same or similar content in different embodiments of this disclosure can be referred to each other.
[0178] It is understood that the terms "first" and "second" in the embodiments of this disclosure are only used for distinction and do not indicate the degree of importance or the order of events.
[0179] It is understandable that, unless otherwise specified, the order of steps in the process indicates that the temporal relationship between these steps is not limited.
[0180] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0181] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0182] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device 800 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0183] like Figure 8As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0184] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0185] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the optical module fault prediction model training method or the optical module fault prediction method. For example, in some embodiments, the communication method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the optical module fault prediction model training method or the optical module fault prediction method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured by any other suitable means (e.g., by means of firmware) to perform an optical module fault prediction model training method or optical module fault prediction.
[0186] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0187] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable task processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0188] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0189] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0190] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0191] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0192] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0193] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for training an optical module fault prediction model, comprising: Acquire multiple training data sets, each including: teacher window data and student window data for training the optical module, wherein the teacher window data is future time period data of the student window data; The teacher window data is used to train the teacher model; Using the teacher window data and the student window data, the student model is trained by knowledge distillation based on the teacher model, and the trained student model is used as the optical module fault prediction model.
2. The method according to claim 1, wherein, The acquisition of multiple training data sets includes: Acquire multiple sample data; each sample data includes: standard window data of the sample light module, the standard window data includes: teacher window preprocessing data corresponding to the teacher window data, and student window preprocessing data corresponding to the student window data; The multiple sample data are divided into multiple datasets, including: a training set, which includes standard window data of multiple training optical modules, and the training optical modules are a portion of the optical modules in the sample optical modules; The standard window data of the multiple training optical modules are standardized to obtain the multiple training data.
3. The method according to claim 2, wherein, The sample data includes: standard window data of the faulty optical module, which includes: preprocessed student window data of the faulty optical module, and preprocessed teacher window data of the faulty optical module. The acquisition of multiple sample data includes: Acquire the historical time-series data of the faulty optical module within a preset time period prior to the fault time point; The historical time-series data is preprocessed to obtain preprocessed data; The preset time period is divided into student window time period and teacher window time period, and the teacher window time period is a future time period of the student window time period; The preprocessed data corresponding to the student window time period is used as the student window preprocessed data of the faulty optical module, and the preprocessed data corresponding to the teacher window time period is used as the teacher window preprocessed data of the faulty optical module.
4. The method according to any one of claims 1-3, wherein, The step of using the teacher window data and the student window data to perform knowledge distillation training on the student model based on the teacher model includes: The teacher window data is input into the teacher model to obtain teacher prediction results; The student window data is input into the student model to obtain student prediction results; Based on the teacher's prediction results and the student's prediction results, a target loss function is constructed; The model parameters of the student model are adjusted based on the target loss function to obtain a trained student model.
5. The method according to claim 4, wherein, The loss function is constructed based on the teacher's prediction results and the student's prediction results, including: Based on the student prediction results and the real labels corresponding to the student window data, a first loss function is constructed; Based on the student prediction results and the teacher prediction results, a second loss function is constructed; The first loss function and the second loss function are weighted and summed to obtain the target loss function.
6. A method for predicting optical module faults, comprising: Acquire historical data of the optical module within the first preset time period prior to the current moment; An optical module failure prediction model is used to predict the failure probability of the historical data to obtain the failure probability of the future time period; the future time period is the second preset time period after the current time. Based on the fault probability and the target threshold, the fault prediction result for the future time period is determined; The optical module fault prediction model is trained using the method described in any one of claims 1-6.
7. The method according to claim 6, further comprising: Based on the validation set, obtain the precision and recall corresponding to each candidate threshold among multiple candidate thresholds; The target threshold is determined from the plurality of candidate thresholds based on the precision and the recall.
8. A training device for an optical module fault prediction model, comprising: The acquisition module is used to acquire multiple training data, each training data including: teacher window data and student window data of the training light module, wherein the teacher window data is future time period data of the student window data; The first training module is used to train the teacher model using the teacher window data; The second training module is used to train the student model with knowledge distillation based on the teacher model using the teacher window data and the student window data, and to use the trained student model as the optical module fault prediction model.
9. An optical module fault prediction device, comprising: The acquisition module is used to acquire historical data of the optical module within a first preset time period before the current moment; The prediction module is used to use an optical module failure prediction model to predict the historical data in order to obtain the failure probability of the future time period; the future time period is a second preset time period after the current time. The determination module is used to determine the fault prediction result for the future time period based on the fault probability and the target threshold; The optical module fault prediction model is trained using the method described in any one of claims 1-6.
10. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
11. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.
12. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-7.