Superconducting cable fault prediction method based on SVM and BiLSTM model
Through the superconducting cable fault prediction method based on SVM and BiLSTM models, the problem of superconducting cables with low fault warning and prediction accuracy in extremely low temperature and strong magnetic field environments is solved, and a high-precision fault prediction effect is achieved.
Patent Information
- Application Number
- CN202510313131.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-17
AI Technical Summary
In the prior art, when superconducting cables operate in extremely low temperature and strong magnetic field environments, multiple parameters change synchronously when a fault occurs, resulting in low fault warning and prediction accuracy.
The superconducting cable fault prediction method based on SVM and BiLSTM models is adopted. By obtaining the cable data set, feature extraction and clustering are performed, the fault occurrence probability of each cluster is calculated, and the cable history and future information is captured using the BiLSTM layer, combined with the attention layer for weighting, and finally the fault probability prediction is performed through the full connection layer.
It improves the accuracy of fault prediction of superconducting cables, can more accurately capture the front and back dependencies in cable data, optimize information utilization, and achieve high-precision fault prediction.
Smart Images

Figure CN120161284A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of deep learning technology, and in particular to a superconducting cable fault prediction method based on SVM and BiLSTM models. Background Art
[0002] As an innovative technology in the field of power transmission, superconducting cables are gradually becoming a key component of future power grid construction due to their high efficiency and low loss characteristics in large-capacity and long-distance power transmission. These cables use the unique property of superconducting materials that their resistance returns to zero at extremely low temperatures, significantly improving the efficiency of power transmission. However, the complexity of superconducting cable systems and the particularity of their operating environment also bring higher challenges to operation monitoring and fault warning.
[0003] Specifically, superconducting cables need to work in extremely low temperatures and strong magnetic fields. Once a fault occurs, it is often accompanied by the simultaneous changes of multiple parameters. However, most current cable detection technologies still rely mainly on a single data source or model, which makes it difficult to provide accurate warnings before a fault occurs, thus affecting the accuracy of cable fault prediction. Summary of the invention
[0004] The purpose of this application is to solve at least one of the above technical defects, especially the technical defect that superconducting cables in the prior art need to work in extremely low temperature and strong magnetic field environment, and once a fault occurs, it is often accompanied by the synchronous change of multiple parameters. However, most current cable detection technologies still rely mainly on a single data source or model, which makes it difficult to provide accurate warning before a fault occurs, thus affecting the accuracy of cable fault prediction.
[0005] In a first aspect, the present application provides a superconducting cable fault prediction method based on SVM and BiLSTM model, the method comprising:
[0006] Acquire a cable data set, and perform feature extraction on the cable data set to obtain a feature data set;
[0007] Clustering the characteristic data set according to the operating state, and calculating the probability of failure occurrence under the operating state corresponding to each cluster according to the clustering result when the clustering is completed;
[0008] Based on the characteristic data contained in each cluster in the clustering result and the fault occurrence probability corresponding to each cluster, a preset fault prediction model is trained, and a final fault prediction model is obtained when the training is completed, and the final fault prediction model is used for real-time cable fault prediction;
[0009] Among them, the fault prediction model includes a BiLSTM layer, an attention layer, and a fully connected layer. During the training process, the BiLSTM layer is used to capture and fuse the cable historical information and cable future information in the feature data contained in each cluster of the clustering result. After obtaining the bidirectional cable information, the attention layer weights the bidirectional cable information, and the weighted result is input into the fully connected layer to predict the cable fault probability.
[0010] In one embodiment, the feature extraction of the cable data set includes:
[0011] Obtain a preset feature extraction model, where the feature extraction model includes a first gated recurrent network, a hidden layer, and a second gated recurrent network;
[0012] Input the cable data set into the first gated recurrent network for preliminary feature extraction to obtain a first feature vector set;
[0013] Input the first feature vector set into the hidden layer to encode and decode the first feature vector set to obtain a second feature vector set, and input the second feature vector set into the second gated recurrent network for secondary feature extraction and sample reconstruction to obtain multiple signal samples;
[0014] According to a preset cost function and multiple signal samples, respectively determine the encoding result of the hidden layer corresponding to each signal sample when the cost function is minimized, and generate a feature data set according to each encoding result.
[0015] In one embodiment, the obtaining of the cable data set includes:
[0016] Collect multi-dimensional cable operation data, perform standardization processing on each variable sequence in the cable operation data, and perform outlier detection on each standardized variable sequence based on the normal distribution;
[0017] Remove the detected outliers in each standardized variable sequence to obtain multiple target variable sequences;
[0018] Perform interpolation processing on each target variable sequence, and generate a cable data set according to each interpolated target variable sequence.
[0019] In one embodiment, the clustering of the feature data set according to the operating state includes:
[0020] Determine the number of corresponding operating states in the feature data set, and initialize N clustering centers, where N is the number of operating states;
[0021] Assign each feature data in the feature dataset to its nearest cluster center. After the assignment is completed, update each cluster center, and continue to assign each feature data until a preset condition is met, and then generate a clustering result according to each cluster center and the feature data included in each cluster center;
[0022] Return to the step of initializing N cluster centers and continue to execute until the number of executions reaches a preset threshold. Then calculate the silhouette coefficient of each obtained clustering result to evaluate the clustering effect of each clustering result, and select the clustering result with the largest silhouette coefficient from each clustering result as the final clustering result.
[0023] In one embodiment, the calculating the probability of a fault occurring under the operating state corresponding to each cluster according to the clustering result when the clustering is completed includes:
[0024] For each cluster in the clustering result, determine whether there is a data value in the feature data of this cluster that exceeds the preset range corresponding to the data type;
[0025] If so, determine the data value in the feature data of this cluster that exceeds the preset range corresponding to the data type as the target data value, and determine the abnormal data value among each target data value according to the data fluctuation condition;
[0026] Obtain the number of actual abnormal values in the feature data of this cluster, and use the ratio of the number of determined abnormal data values to this number as the probability of a fault occurring under the operating state corresponding to this cluster.
[0027] In one embodiment, the BiLSTM layer includes a forward LSTM module and a backward LSTM module; the using the BiLSTM layer to capture and fuse the cable historical information and cable future information in the feature data included in each cluster in the clustering result includes:
[0028] Capture the cable historical information in the feature data included in each cluster in the clustering result based on the forward LSTM module;
[0029] Capture the cable future information in the feature data included in each cluster in the clustering result based on the backward LSTM module;
[0030] When determining the cable historical information and the cable future information, use the BiLSTM layer to perform information fusion on the cable historical information and the cable future information to obtain cable bidirectional information.
[0031] In one embodiment, the using the attention layer to weight the cable bidirectional information and input the weighted result into the fully connected layer for cable fault probability prediction includes:
[0032] Calculate the attention scores for each time step in the two-way cable information, normalize the attention scores for each time step, and obtain the attention weights corresponding to each time step;
[0033] Perform weighted calculation on the state of each time step in the two-way cable information and the attention weight of the corresponding time step, and sum the weighted calculation results of each time step in the two-way cable information to obtain a weighted result;
[0034] Map the weighted result into a preset target space to predict the fault occurrence probability according to the features in the weighted result.
[0035] In a second aspect, the present application provides a superconducting cable fault prediction device based on an SVM and BiLSTM model. The device includes:
[0036] A feature extraction module for obtaining a cable data set and extracting features from the cable data set to obtain a feature data set;
[0037] A data clustering module for clustering the feature data set according to the operating state, and calculating the fault occurrence probability under the corresponding operating state of each cluster when the clustering is completed;
[0038] A fault prediction module for training a preset fault prediction model based on the feature data included in each cluster in the clustering result and the fault occurrence probability corresponding to each cluster. When the training is completed, a final fault prediction model is obtained, and the finally obtained fault prediction model is used for real-time cable fault prediction;
[0039] Wherein, the fault prediction model includes a BiLSTM layer, an attention layer and a fully connected layer. During the training process, the BiLSTM layer is used to capture and fuse the cable historical information and cable future information in the feature data included in each cluster in the clustering result. After obtaining the two-way cable information, the attention layer is used to weight the two-way cable information, and the weighted result is input into the fully connected layer for cable fault probability prediction.
[0040] In a third aspect, the present application provides a storage medium in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, one or more processors are caused to execute the steps of the superconducting cable fault prediction method based on an SVM and BiLSTM model as described in any one of the above embodiments.
[0041] In a fourth aspect, the present application provides a computer device, including: one or more processors, and a memory;
[0042] The computer-readable instructions are stored in the memory, and when the one or more processors execute the computer-readable instructions, the steps of the superconducting cable fault prediction method based on the SVM and BiLSTM models as described in any of the above embodiments are executed.
[0043] As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:
[0044] The superconducting cable fault prediction method based on the SVM and BiLSTM models provided by the present application extracts features from the obtained cable data set during the cable fault prediction process to obtain a feature data set. Subsequently, the feature data set is clustered according to the operating state, and the fault occurrence probability under the operating state corresponding to each cluster is calculated according to the clustering result. Then, based on the feature data included in each cluster in the clustering result and the fault occurrence probability corresponding to each cluster, a preset fault prediction model is trained. When the training is completed, the final fault prediction model is obtained and used for real-time cable fault prediction. The model includes a BiLSTM layer, an attention layer, and a fully connected layer. During the training process, the BiLSTM layer captures and fuses the cable historical information and cable future information in the feature data included in each cluster in the clustering result. The BiLSTM layer can comprehensively capture the forward and backward dependencies in the feature data set, enabling the model to accurately predict the possible future fault modes based on historical data. Then, the attention layer weights the fused bidirectional cable information, which can focus on the features with a higher contribution to fault prediction during the training process, thereby optimizing information utilization. Finally, this information is transmitted to the fully connected layer for accurate prediction of the cable fault probability, obtaining a high-precision cable fault prediction result, thereby improving the accuracy of cable fault prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0046] Figure 1 It is a schematic flowchart of a superconducting cable fault prediction method based on the SVM and BiLSTM models provided by the embodiments of the present application;
[0047] Figure 2 It is a schematic flowchart of clustering the feature data set according to the operating state provided by the embodiments of the present application;
[0048] Figure 3Schematic flow chart for calculating the probability of fault occurrence in the operating state corresponding to each cluster provided by the embodiment of the present application;
[0049] Figure 4 Schematic structural diagram of a superconducting cable fault prediction device based on SVM and BiLSTM models provided by the embodiment of the present application;
[0050] Figure 5 Internal structure diagram of a computer device provided by the embodiment of the present application. Detailed implementation manners
[0051] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0052] In one embodiment, the present application provides a superconducting cable fault prediction method based on SVM and BiLSTM models. The following embodiments are described by taking the application of this method to a server as an example. It can be understood that the execution of the superconducting cable fault prediction method based on SVM and BiLSTM models can be a single server or a server cluster composed of multiple servers. The present application does not make specific limitations on this.
[0053] As Figure 1 shown, the present application provides a superconducting cable fault prediction method based on SVM and BiLSTM models. The method includes:
[0054] S101: Obtain a cable data set, and perform feature extraction on the cable data set to obtain a feature data set.
[0055] Among them, the cable data set includes multiple cable data samples, and each cable data sample includes, but is not limited to, information such as current, voltage, liquid nitrogen flow rate, temperature, pressure, etc.
[0056] In this step, when a user needs to perform fault prediction on a superconducting cable, a prediction instruction can be initiated. When the server receives the prediction instruction, it obtains the cable data set, and then performs feature extraction on the cable data set to obtain a feature data set corresponding to the cable data set. It can be understood that the feature data set includes multiple feature data, and each feature data can be represented as a feature vector.
[0057] S102: Cluster the feature data set according to the operating state, and calculate the probability of fault occurrence in the operating state corresponding to each cluster according to the clustering result when the clustering is completed.
[0058] In this step, the feature data in the feature dataset is clustered based on the operating state of the cable as the clustering division criterion. When the clustering is completed, the failure occurrence probability under the corresponding operating state of each cluster obtained by the clustering is calculated. It can be understood that after clustering the feature dataset, multiple clusters can be obtained, and each cluster represents an operating state.
[0059] Among them, the operating state refers to the parameter set of various physical, environmental, and electrical characteristics exhibited by the cable during actual use. The clustering result includes multiple clusters and the feature data contained in each cluster. The failure occurrence probability refers to the probability of the cable failing under the corresponding operating state.
[0060] S103: Train the preset fault prediction model based on the feature data contained in each cluster in the clustering result and the failure occurrence probability corresponding to each cluster. When the training is completed, the final fault prediction model is obtained, and the finally obtained fault prediction model is used for real-time cable fault prediction.
[0061] Among them, the fault prediction model includes a BiLSTM layer, an attention layer, and a fully connected layer. During the training process, the BiLSTM layer is used to capture and fuse the historical information and future information of the cable in the feature data contained in each cluster in the clustering result. After obtaining the two-way information of the cable, the attention layer is used to weight the two-way information of the cable, and the weighted result is input into the fully connected layer for cable fault probability prediction.
[0062] In this step, the feature data contained in each cluster in the clustering result and the calculated failure occurrence probability corresponding to each cluster are used to train the preset fault prediction model. Specifically, the model hierarchy of the fault prediction model includes a BiLSTM layer, an attention layer, and a fully connected layer. During the training process, the BiLSTM layer can be used to capture the historical information and future information of the cable in the feature data contained in each cluster in the clustering result, and splice and fuse the historical information and future information of the cable to obtain the two-way information of the cable. Then, the attention layer is used to weight the two-way information of the cable, so that more attention is paid to the features or time steps with higher contribution to the prediction during the training process. Finally, the weighted result is input into the fully connected layer for cable fault probability prediction. It can be understood that the prediction results obtained from the cable fault probability prediction include the failure occurrence probabilities under different operating states.
[0063] Among them, the BiLSTM layer is composed of two-direction LSTM networks. A forward LSTM network processes data from the beginning to the end of the sequence and captures past context information; a backward LSTM network processes data from the end to the beginning of the sequence and captures future context information. The BiLSTM layer can consider the forward and backward dependencies of the sequence at the same time by splicing the hidden states in the two directions, so as to more comprehensively understand the information in the sequence.
[0064] Specifically, when the final fault prediction model is obtained through training according to the above process, this fault prediction model is used for real-time cable fault prediction. At this time, the cable data set can be obtained regularly or in real time, and then input into this fault prediction model for fault prediction, so as to obtain the probability of the cable failing in different operating states at this time, and realize the real-time fault probability prediction of the cable.
[0065] The superconducting cable fault prediction method based on the SVM and BiLSTM models provided by this application extracts features from the obtained cable data set during the cable fault prediction process to obtain a feature data set. Subsequently, the feature data set is clustered according to the operating state, and the fault occurrence probability in the operating state corresponding to each cluster is calculated according to the clustering result. Then, based on the feature data included in each cluster in the clustering result and the fault occurrence probability corresponding to each cluster, the preset fault prediction model is trained. When the training is completed, the final fault prediction model is obtained and used for real-time cable fault prediction. This model includes a BiLSTM layer, an attention layer, and a fully connected layer. During the training process, the BiLSTM layer is used to capture and fuse the cable historical information and cable future information in the feature data included in each cluster in the clustering result. The BiLSTM layer can comprehensively capture the forward and backward dependencies in the feature data set, enabling the model to accurately predict the possible future fault modes based on historical data. Then, the attention layer is used to weight the fused bidirectional cable information, which can focus on the features with a higher contribution to fault prediction during the training process, thereby optimizing information utilization. Finally, this information is passed to the fully connected layer for accurate prediction of the cable fault probability, obtaining a high-precision cable fault prediction result, thus improving the accuracy of cable fault prediction.
[0066] In one embodiment, the feature extraction from the cable data set includes:
[0067] S1: Obtain a preset feature extraction model.
[0068] Among them, the feature extraction model is a model composed of an SVM structure and an autoencoder based on a gated recurrent network. It includes a first gated recurrent network, a hidden layer, and a second gated recurrent network.
[0069] In this step, when it is necessary to extract features from the cable data set, a pre-trained feature extraction model can be obtained. The model hierarchy of this feature extraction model includes a first gated recurrent network, a hidden layer, and a second gated recurrent network. This feature extraction model is used to extract features from the cable data set. During this process, the first gated recurrent network and the second gated recurrent network included in this model can enable this model to better capture the dynamic information and deep features in the data when processing time series data and complex feature extraction tasks.
[0070] S2: Input the cable dataset into the first gated recurrent network for preliminary feature extraction to obtain the first feature vector set.
[0071] Among them, the first gated recurrent network is a recurrent neural network that can be used to process and predict temporal dependencies in sequential data.
[0072] In this step, the cable dataset can be transformed into a serialized form and input into the first gated recurrent network, so that the first gated recurrent network controls the information flow based on the update gate and the reset gate, dynamically extracts the features at each time step, and thus obtains the first feature vector set. Among them, the first feature vector set includes multiple feature vectors.
[0073] Exemplarily, assume that a certain cable data sample in the cable dataset is represented as , and after passing through the first gated recurrent network, this cable data sample obtains a feature vector, and the first feature vector can be represented as .
[0074] S3: Input the first feature vector set into the hidden layer to encode and decode the first feature vector set to obtain the second feature vector set, and input the second feature vector set into the second gated recurrent network for secondary feature extraction and sample reconstruction to obtain multiple signal samples.
[0075] Among them, the second gated recurrent network is a recurrent neural network that can be used to process and predict temporal dependencies in sequential data. A signal sample refers to a sample obtained after the reconstruction of different types of feature vectors.
[0076] In this step, the first feature vector set is input into the hidden layer for encoding, and then the encoding result is decoded to obtain the second feature vector set output by the hidden layer. Then, the second feature vector set is input into the second gated recurrent network for further feature extraction, and the result of this feature extraction is used for sample reconstruction to obtain multiple signal samples, such as current signals, voltage signals, and so on.
[0077] Specifically, by feature extraction, the reconstructed signal samples are obtained, and in training, the signal samples can be made as close as possible to the original sample, the cable dataset, to optimize the feature representation.
[0078] In one example, regarding the training process of the feature extraction model: The gradient descent method can be used to train the feature extraction model, and the cost function during training can be expressed as:
[0079]
[0080] In the formula, represents the cost function, represents the number of samples, represents the mean of data sample i in the latent space, represents the standard deviation of data sample i in the latent space, represents signal sample i, represents data sample i in the cable dataset.
[0081] S4: According to a preset cost function and multiple signal samples, respectively determine the encoding results of the hidden layer corresponding to each signal sample when the cost function is minimized, and generate a feature dataset based on each encoding result.
[0082] In this embodiment, the cable dataset is subjected to feature extraction through a feature extraction model. During the feature extraction process, since the feature extraction model includes a first gated recurrent network and a second gated recurrent network, these two networks can enable the model to better capture the dynamic information and deep features in the data when processing time series data and complex feature extraction tasks, thereby improving the accuracy of subsequent cable fault probability prediction based on the feature extraction results.
[0083] In one embodiment, obtaining the cable dataset includes:
[0084] S1: Collect multi-dimensional cable operation data, perform standardization processing on each variable sequence in the cable operation data, and perform outlier detection on each standardized variable sequence based on the normal distribution.
[0085] In one example, according to the following expression, perform standardization processing on each variable sequence in the cable operation data:
[0086]
[0087] In the formula, represents the data value after standardization processing, represents the data value in the variable sequence, represents the minimum value in the variable sequence, represents the maximum value in the variable sequence.
[0088] Specifically, when the absolute value of the difference between the data value in the variable sequence before and after standardization processing is greater than three times the standard deviation of the variable sequence, the data value is considered an outlier.
[0089] In this step, by collecting multi-dimensional cable operation data, multiple dimensions of operation data can be comprehensively considered, fully considering the particularity of the superconducting cable operation environment, thereby avoiding the inaccuracy of single data source judgment and improving the reliability of cable fault probability prediction.
[0090] S2: Remove the outliers in each standardized variable sequence detected, and obtain multiple target variable sequences.
[0091] When outliers in each variable sequence are detected, remove the outliers in each standardized variable sequence detected, and obtain the target variable sequence corresponding to each variable sequence.
[0092] S3: Perform interpolation processing on each target variable sequence, and generate a cable data set according to each interpolated target variable sequence.
[0093] In this step, for the missing values in each target variable sequence, the average value of its front and back data values can be taken for interpolation filling, and then a cable data set is generated according to each target variable sequence after interpolation filling processing.
[0094] In this embodiment, by collecting multi-dimensional cable operation data and preprocessing the cable operation data, on the one hand, the particularity of the superconducting cable operation environment can be fully considered, thereby avoiding the inaccuracy of single data source judgment and improving the reliability of cable fault probability prediction. On the other hand, the accuracy of the data can be guaranteed to ensure the accuracy of probability prediction.
[0095] Such as Figure 2 shown, in one of the embodiments, clustering the feature data set according to the operation state includes:
[0096] S201: Determine the number of corresponding operation states in the feature data set, and initialize N clustering centers.
[0097] Wherein, N is the number of operation states.
[0098] Specifically, when initializing N clustering centers, random initialization or initialization based on principal component analysis, etc. can be adopted, and this application does not make specific limitations on this.
[0099] S202: Assign each feature data in the feature data set to its nearest clustering center. After the assignment is completed, update each clustering center, and continue to assign each feature data until the preset condition is met, and generate a clustering result according to each clustering center and the feature data included in each clustering center.
[0100] Wherein, the preset condition is the iteration stop condition for single clustering. The preset condition can be set to reach a preset number of iterations, or can also be set to the change of the clustering center being less than a preset threshold, and this application does not make specific limitations on this.
[0101] Specifically, in this step, the distance between the feature data and the clustering center can be calculated according to the following expression:
[0102]
[0103] In the formula, represents the distance, N represents the number of clusters, n represents the number of feature data, represents the feature data j, represents the clustering center i.
[0104] S203: Determine whether the number of executions for generating the clustering result reaches a preset threshold.
[0105] S204: If not, return to the step of initializing N clustering centers and continue to execute.
[0106] S205: If so, calculate the silhouette coefficient of each obtained clustering result to evaluate the clustering effect of each clustering result, and then select the clustering result with the largest silhouette coefficient from each clustering result as the final clustering result.
[0107] Among them, the silhouette coefficient is used to measure the quality of the clustering result.
[0108] Specifically, calculating the silhouette coefficient of each obtained clustering result may include: for each clustering result, calculate the internal distance and external distance of each data point in the clustering result, and then determine the silhouette coefficient of the clustering result according to the internal distance and external distance of each data point. Among them, the internal distance is the average distance between it and other data points in the same cluster, and the external distance is the average distance between it and all data points in the nearest other cluster.
[0109] Furthermore, the silhouette coefficient of the clustering result can be calculated according to the following expression:
[0110]
[0111]
[0112] In the formula, represents the local silhouette coefficient, represents the external distance of data point i, represents the internal distance of data point i, represents the silhouette coefficient, represents the number of data points in the clustering result.
[0113] It can be understood that since the initialization of the clustering center has a great influence on the clustering result and may fall into a local minimum, the above process can be run multiple times to obtain multiple clustering results. In this way, the clustering effect of each clustering result is evaluated according to the silhouette coefficient of each clustering result, and finally the clustering result with the largest silhouette coefficient is selected as the final clustering result. This can ensure the reliability of the clustering result as much as possible.
[0114] As Figure 3 shown, in one embodiment, when the clustering is completed, the fault occurrence probability under the operating state corresponding to each cluster is calculated according to the clustering result, including:
[0115] S301: For each cluster in the clustering result, determine whether there is a data value in the feature data of the cluster that exceeds the preset range corresponding to the data type.
[0116] S302: If there is, determine the data value in the feature data of the cluster that exceeds the preset range corresponding to the data type as the target data value, and determine the abnormal data value among the target data values according to the data fluctuation situation.
[0117] In this step, the data value in the feature data of the cluster that exceeds the preset range corresponding to the data type can be determined as the target data value, and then whether the exceeded ratio reaches the preset percentage is used to judge the data fluctuation situation, so as to determine the abnormal data value among the target data values.
[0118] S303: Obtain the number of actual abnormal values in the feature data of the cluster, and use the ratio of the number of the determined abnormal data values to this number as the fault occurrence probability under the operating state corresponding to the cluster.
[0119] In an example, calculate the fault occurrence probability under the operating state corresponding to the cluster according to the following expression:
[0120]
[0121] In the formula, represents the fault occurrence probability of cluster x, represents the number of the determined abnormal data values, and n represents the number of actual abnormal values in the feature data of the cluster.
[0122] In this embodiment, by analyzing the clustering result, the fault occurrence probability under the operating state corresponding to each cluster is determined, so that the calculated fault occurrence probability can be used as a label to train the fault prediction model, improving the reliability of the finally obtained fault prediction model.
[0123] In one embodiment, the BiLSTM layer includes a forward LSTM module and a backward LSTM module; using the BiLSTM layer to capture and fuse the cable historical information and cable future information in the feature data included in each cluster in the clustering result, including:
[0124] S1: Based on the forward LSTM module, capture the cable historical information in the feature data included in each cluster in the clustering result.
[0125] S2: Based on the reverse LSTM module, capture the future information of the cable in the feature data contained in each cluster of the clustering results.
[0126] S3: When determining the cable historical information and the cable future information, use the BiLSTM layer to fuse the cable historical information and the cable future information to obtain the bidirectional cable information.
[0127] Among them, the cable historical information refers to the feature data accumulated during the operation of the cable before the current time point, and these data reflect the past operating status and performance of the cable. The cable future information refers to the feature data that may appear during the operation of the cable after the current time point, and these data reflect the possible future operating status and performance of the cable.
[0128] In this embodiment, when determining the cable historical information and the cable future information, the cable historical information and the cable future information can be spliced and fused to obtain the bidirectional cable information, which can comprehensively capture the forward and backward dependencies in the feature data set, thereby improving the accuracy of cable prediction.
[0129] In an example, in a time step t of the LSTM module, the update expressions for the internal state and the hidden state of the LSTM module are as follows:
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136] In the formula, , , are the activation values of the input gate, the forget gate, and the output gate respectively, is the candidate memory cell state, is the sigmoid activation function, represents element-wise multiplication, , , are the weights of the input gate, the forget gate, and the output gate respectively, , , represent the bias terms of the input gate, the forget gate, and the output gate respectively, represents the internal state at the previous moment, represents the input data at the current moment, represents the hidden state at the current moment, represents the hidden state at the previous moment, represents the internal state at the current moment.
[0137] In one embodiment, an attention layer is used to weight the two-way cable information, and the weighted result is input into a fully-connected layer for cable fault probability prediction, including:
[0138] S1: Calculate the attention scores for each time step in the two-way cable information, normalize the attention scores for each time step, and obtain the attention weights corresponding to each time step.
[0139] S2: Perform a weighted calculation on the state of each time step in the two-way cable information and the attention weight corresponding to the time step, and sum up the weighted calculation results of each time step in the two-way cable information to obtain the weighted result.
[0140] S3: Map the weighted result into a preset target space to predict the probability of a fault occurring based on the features in the weighted result.
[0141] Among them, the target space refers to the fault probability space. The attention weight is used to measure the contribution degree of the time step or the features corresponding to the time step to the prediction accuracy.
[0142] In this embodiment, by adding an attention layer in the BiLSTM layer, the model can pay more attention to the features with higher contribution degrees to the fault prediction, thereby optimizing the information utilization to improve the accuracy of cable fault prediction.
[0143] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same moment, but can be executed at different moments. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or alternately with at least a part of other steps or steps in other steps.
[0144] The superconducting cable fault prediction device based on the SVM and BiLSTM models provided by the embodiments of the present application will be described below. The superconducting cable fault prediction device based on the SVM and BiLSTM models described below can be correspondingly referred to the superconducting cable fault prediction method based on the SVM and BiLSTM models described above.
[0145] As Figure 4 shown, the present application provides a superconducting cable fault prediction device 400 based on the SVM and BiLSTM models. The device includes:
[0146] A feature extraction module 401, configured to obtain a cable data set and perform feature extraction on the cable data set to obtain a feature data set;
[0147] A data clustering module 402, configured to cluster the feature data set according to the operating state, and calculate the fault occurrence probability under the operating state corresponding to each cluster when the clustering is completed;
[0148] A fault prediction module 403, configured to train a preset fault prediction model based on the feature data included in each cluster in the clustering result and the fault occurrence probability corresponding to each cluster. When the training is completed, a final fault prediction model is obtained, and the finally obtained fault prediction model is used for real-time cable fault prediction;
[0149] Among them, the fault prediction model includes a BiLSTM layer, an attention layer, and a fully connected layer. During the training process, the BiLSTM layer is used to capture and fuse the cable historical information and cable future information in the feature data included in each cluster in the clustering result. After obtaining the cable bidirectional information, the attention layer is used to weight the cable bidirectional information, and the weighted result is input into the fully connected layer for cable fault probability prediction.
[0150] In one embodiment, the feature extraction module includes:
[0151] A model acquisition sub-module, configured to obtain a preset feature extraction model. The feature extraction model includes a first gated recurrent network, a hidden layer, and a second gated recurrent network;
[0152] A first extraction sub-module, configured to input the cable data set into the first gated recurrent network for preliminary feature extraction to obtain a first feature vector set;
[0153] A second extraction sub-module, configured to input the first feature vector set into the hidden layer to encode and decode the first feature vector set to obtain a second feature vector set, and input the second feature vector set into the second gated recurrent network for secondary feature extraction and sample reconstruction to obtain a plurality of signal samples;
[0154] A dataset generation sub-module, configured to respectively determine the encoding results of the hidden layer corresponding to each signal sample when the cost function is minimized according to a preset cost function and multiple signal samples, and generate a feature dataset based on the respective encoding results.
[0155] In one embodiment, the feature extraction module includes:
[0156] A data acquisition sub-module, configured to acquire multi-dimensional cable operation data, perform normalization processing on each variable sequence in the cable operation data, and perform outlier detection on each variable sequence after normalization processing based on a normal distribution;
[0157] A data rejection sub-module, configured to reject the outliers in each variable sequence after normalization processing that are detected, to obtain multiple target variable sequences;
[0158] A data interpolation sub-module, configured to perform interpolation processing on each target variable sequence, and generate a cable dataset based on each target variable sequence after interpolation processing.
[0159] In one embodiment, the data clustering module includes:
[0160] An initialization sub-module, configured to determine the number of corresponding operating states in the feature dataset, and initialize N clustering centers, where N is the number of operating states;
[0161] A data assignment sub-module, configured to assign each feature data in the feature dataset to its nearest clustering center, update each clustering center after the assignment is completed, continue to assign each feature data, and generate a clustering result based on each clustering center and the feature data included in each clustering center when a preset condition is met;
[0162] A result selection sub-module, configured to return to the step of initializing N clustering centers to continue execution, calculate the silhouette coefficient of each obtained clustering result to evaluate the clustering effect of each clustering result when the number of executions reaches a preset threshold, and then select the clustering result with the largest silhouette coefficient from each clustering result as the final clustering result.
[0163] In one embodiment, the data clustering module includes:
[0164] A judgment sub-module, configured to, for each cluster in the clustering result, judge whether there are data values in the feature data of the cluster that exceed the preset range of the corresponding data type;
[0165] An anomaly determination sub-module, configured to, if any, determine the data values in the feature data of the cluster that exceed the preset range of the corresponding data type as target data values, and determine the anomaly data values from each target data value according to the data fluctuation situation;
[0166] A probability determination sub-module, configured to obtain the number of actual outliers in the feature data of the cluster, and use the ratio of the determined number of outlier data values to this number as the fault occurrence probability in the operating state corresponding to the cluster.
[0167] In one embodiment, the BiLSTM layer includes a forward LSTM module and a backward LSTM module; the fault prediction module includes:
[0168] A forward capture sub-module, configured to capture the cable historical information in the feature data included in each cluster in the clustering result based on the forward LSTM module;
[0169] A backward capture sub-module, configured to capture the cable future information in the feature data included in each cluster in the clustering result based on the backward LSTM module;
[0170] An information fusion sub-module, configured to, when determining the cable historical information and the cable future information, use the BiLSTM layer to perform information fusion on the cable historical information and the cable future information to obtain the cable bidirectional information.
[0171] In one embodiment, the fault prediction module includes:
[0172] A weight calculation sub-module, configured to calculate attention scores for each time step in the cable bidirectional information, normalize the attention scores for each time step, and obtain the attention weight corresponding to each time step;
[0173] A weighted calculation sub-module, configured to perform weighted calculation on the state of each time step in the cable bidirectional information and the attention weight corresponding to the time step, and sum up the weighted calculation results of each time step in the cable bidirectional information to obtain a weighted result;
[0174] A probability prediction sub-module, configured to map the weighted result into a preset target space to predict the fault occurrence probability according to the features in the weighted result.
[0175] The division of each module in the above superconducting cable fault prediction device based on the SVM and BiLSTM models is only for illustrative purposes. In other embodiments, the superconducting cable fault prediction device based on the SVM and BiLSTM models can be divided into different modules as needed to complete all or part of the functions of the above superconducting cable fault prediction device based on the SVM and BiLSTM models. Each module in the above superconducting cable fault prediction device based on the SVM and BiLSTM models can be implemented in whole or in part through software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form so that the processor can call and execute the operations corresponding to the above respective modules.
[0176] In one embodiment, the present application further provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to execute the steps of the superconducting cable fault prediction method based on the SVM and BiLSTM models as described in any one of the above embodiments.
[0177] In one embodiment, the present application further provides a computer device storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to execute the steps of the superconducting cable fault prediction method based on the SVM and BiLSTM models as described in any one of the above embodiments.
[0178] Schematically, as Figure 5 shown, Figure 5 is a schematic internal structure diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be provided as a server. Referring to Figure 5 , the computer device 500 includes a processing component 502, which further includes one or more processors, and memory resources represented by a memory 501 for storing instructions executable by the processing component 502, such as application programs. The application programs stored in the memory 501 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 502 is configured to execute instructions to perform the superconducting cable fault prediction method based on the SVM and BiLSTM models of any of the above embodiments.
[0179] The computer device 500 may further include a power supply component 503 configured to perform power management of the computer device 500, a wired or wireless network interface 504 configured to connect the computer device 500 to a network, and an input / output (I / O) interface 505. The computer device 500 may operate based on an operating system stored in the memory 501, such as WindowsServer TM, Mac OS XTM, Unix TM, Linux TM, Free BSDTM or the like.
[0180] Those skilled in the art can understand that Figure 5 the structure shown in
[0181] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element. In this text, the singular forms of "a", "an" and "the" may also include the plural forms unless the context clearly dictates otherwise. It should also be understood that the terms "comprising / including" or "having" etc. specify the presence of the stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the related listed items.
[0182] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0183] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A superconducting cable fault prediction method based on SVM and BiLSTM model, characterized in that: The method comprises: Acquire a cable data set, and perform feature extraction on the cable data set to obtain a feature data set; Clustering the characteristic data set according to the operating state, and calculating the probability of failure occurrence under the operating state corresponding to each cluster according to the clustering result when the clustering is completed; Based on the characteristic data contained in each cluster in the clustering result and the fault occurrence probability corresponding to each cluster, a preset fault prediction model is trained, and a final fault prediction model is obtained when the training is completed, and the final fault prediction model is used for real-time cable fault prediction; Among them, the fault prediction model includes a BiLSTM layer, an attention layer and a fully connected layer. During the training process, the BiLSTM layer is used to capture and fuse the cable history information and cable future information in the feature data contained in each cluster in the clustering result. After obtaining the bidirectional information of the cable, the attention layer is used to weight the bidirectional information of the cable, and the weighted result is input into the fully connected layer to predict the cable fault probability.
2. The superconducting cable fault prediction method based on SVM and BiLSTM model according to claim 1, characterized in that: The extracting features from the cable data set comprises: Acquire a preset feature extraction model, wherein the feature extraction model includes a first gated recurrent network, a hidden layer, and a second gated recurrent network; Inputting the cable data set into the first gated recurrent network for preliminary feature extraction to obtain a first feature vector set; Inputting the first feature vector set into the hidden layer to encode and decode the first feature vector set to obtain a second feature vector set, and inputting the second feature vector set into a second gated recurrent network to perform secondary feature extraction and sample reconstruction to obtain a plurality of signal samples; According to a preset cost function and a plurality of signal samples, the encoding result of the hidden layer corresponding to each signal sample when the cost function is minimum is determined respectively, and a feature data set is generated according to each encoding result.
3. The superconducting cable fault prediction method based on SVM and BiLSTM model according to claim 1, characterized in that: The obtaining of the cable data set comprises: Collect multi-dimensional cable operation data, standardize each variable sequence in the cable operation data, and perform outlier detection on each standardized variable sequence based on normal distribution; Eliminate the outliers in each variable sequence that has been detected and standardized to obtain multiple target variable sequences; Interpolation processing is performed on each target variable sequence, and a cable data set is generated according to each interpolated target variable sequence.
4. The superconducting cable fault prediction method based on SVM and BiLSTM model according to claim 1 is characterized in that: The clustering of the feature data set according to the operating status includes: Determine the number of corresponding operating states in the feature data set according to the feature data set, and initialize N cluster centers, where N is the number of operating states; Allocate each feature data in the feature data set to its nearest cluster center, update each cluster center after the allocation is completed, and continue to allocate each feature data until a clustering result is generated according to each cluster center and the feature data contained in each cluster center when a preset condition is met; Return to the step of initializing N cluster centers and continue to execute until the number of executions reaches a preset threshold, then calculate the silhouette coefficient of each clustering result to evaluate the clustering effect of each clustering result, and then select the clustering result with the largest silhouette coefficient from each clustering result as the final clustering result.
5. The superconducting cable fault prediction method based on SVM and BiLSTM model according to claim 1, characterized in that: When the clustering is completed, the probability of failure occurrence in the operating state corresponding to each cluster is calculated according to the clustering result, including: For each cluster in the clustering result, determining whether there is a data value in the characteristic data of the cluster that exceeds a preset range of a corresponding data type; If so, the data value in the characteristic data of the cluster that exceeds the preset range of the corresponding data type is determined as the target data value, and the abnormal data value is determined in each target data value according to the data fluctuation; The number of actual abnormal values in the characteristic data of the cluster is obtained, and the ratio of the number of determined abnormal data values to the number is used as the probability of failure occurrence under the operating state corresponding to the cluster.
6. The superconducting cable fault prediction method based on SVM and BiLSTM model according to claim 1 is characterized in that: The BiLSTM layer includes a forward LSTM module and a reverse LSTM module; The method of using the BiLSTM layer to capture and fuse the cable history information and cable future information in the feature data contained in each cluster in the clustering result includes: Capturing the cable history information in the feature data contained in each cluster in the clustering result based on the forward LSTM module; Capturing the future information of the cable in the feature data contained in each cluster in the clustering result based on the reverse LSTM module; When the cable history information and the cable future information are determined, the BiLSTM layer is used to fuse the cable history information and the cable future information to obtain the cable bidirectional information.
7. The superconducting cable fault prediction method based on SVM and BiLSTM model according to claim 1 is characterized in that: The using of the attention layer to weight the bidirectional information of the cable and inputting the weighted result into the fully connected layer to predict the probability of cable failure includes: Calculating an attention score for each time step in the bidirectional information of the cable, normalizing the attention score of each time step, and obtaining an attention weight corresponding to each time step; Performing weighted calculation on the state of each time step in the bidirectional cable information and the attention weight of the corresponding time step, and summing the weighted calculation results of each time step in the bidirectional cable information to obtain a weighted result; The weighted results are mapped into a preset target space to predict the probability of a fault occurrence according to the features in the weighted results.
8. A superconducting cable fault prediction device based on SVM and BiLSTM model, characterized in that: The device comprises: A feature extraction module is used to obtain a cable data set and perform feature extraction on the cable data set to obtain a feature data set; A data clustering module, used to cluster the characteristic data set according to the operating status, and when the clustering is completed, calculate the probability of failure occurrence under the operating status corresponding to each cluster according to the clustering result; A fault prediction module is used to train a preset fault prediction model based on the characteristic data contained in each cluster in the clustering result and the fault occurrence probability corresponding to each cluster, obtain a final fault prediction model when the training is completed, and use the final fault prediction model for real-time cable fault prediction; Among them, the fault prediction model includes a BiLSTM layer, an attention layer and a fully connected layer. During the training process, the BiLSTM layer is used to capture and fuse the cable history information and cable future information in the feature data contained in each cluster in the clustering result. After obtaining the bidirectional information of the cable, the attention layer is used to weight the bidirectional information of the cable, and the weighted result is input into the fully connected layer to predict the cable fault probability.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the superconducting cable fault prediction method based on the SVM and BiLSTM model as described in any one of claims 1 to 7.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the superconducting cable fault prediction method based on the SVM and BiLSTM model as described in any one of claims 1 to 7 are performed.