Migration adaptation method based on similarity interpretable weight allocation for small samples
By adopting the explanatory weight distribution method based on similarity in the prediction of rotating mechanical life, the lack of explanatory problems in the traditional method is solved, the explanatory and predictive stability of the model is improved, and the generalization capacity is enhanced.
Patent Information
- Application Number
- CN202411204689.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-08-30
AI Technical Summary
Traditional transfer learning methods lack interpretability in the life prediction of rotating machinery, and are difficult to solve the problem, affecting the stability of model prediction.
The explanatory weight distribution method based on similarity is adopted, and the similarity between the hidden layer feature vector and the real value is calculated to extract the network distribution right value for the features to enhance the interpretability of the model and the transparency of decision -making.
It improves the explanatoryness and decision -making transparency of life prediction models, enhances the predictive stability of the model, and reduces the dependence of large -scale data, and enhances generalization.
Smart Images

Figure CN119378697A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of predictive maintenance of rotating machinery, and in particular to a migration adaptation method for small samples based on similarity-interpretable weight allocation. Background Art
[0002] Industrial equipment is increasingly becoming large-scale, automated, and intelligent. Rotating machinery such as bearings and gears are widely used in aerospace, transportation, and other fields, and their operating conditions are directly related to the life of various types of mechanical equipment. Therefore, life prediction of rotating machinery such as bearings has positive practical significance.
[0003] In recent years, the application of deep transfer learning in the field of health management covers anomaly detection, fault diagnosis, predictive maintenance, digital twins, data enhancement, etc. The application of transfer learning in health management can not only effectively solve the problems of data scarcity and model generalization ability, but also improve the accuracy and efficiency of fault prediction, anomaly detection, fault diagnosis and health assessment. This makes transfer learning an important technology in the field of health management, which helps to achieve smarter maintenance and management strategies.
[0004] At present, the weight allocation of traditional transfer learning methods is usually a black box operation. However, this black box operation lacks interpretability, making it difficult to understand the decision-making process of the rotating machinery life prediction model, which is not conducive to improving the prediction stability of the model. Summary of the invention
[0005] In view of this, the present application provides a migration adaptation method based on similarity interpretable weight allocation for small samples, the main purpose of which is to improve the interpretability and decision transparency of the rotating machinery life prediction model, thereby improving the prediction stability of the model.
[0006] According to a first aspect of the present application, a migration adaptation method based on similarity interpretable weight allocation for a small sample is provided, the method comprising:
[0007] Acquire a source domain time series and a target domain time series of the rotating machinery, and an initial life prediction model, wherein the initial life prediction model includes an initial feature extraction network and an initial interpretable weight allocation network;
[0008] Extracting time domain features and / or frequency domain features corresponding to the source domain time series, performing feature extraction on the time domain features and / or frequency domain features using the initial feature extraction network, and obtaining hidden layer feature vectors output by each network layer of the initial feature extraction network in a corresponding time window;
[0009] Calculating the similarity between the hidden layer feature vector and the corresponding true value, and based on the similarity, using the initial interpretable weight allocation network to allocate weights to the initial feature extraction network, to obtain a feature extraction network after weight allocation;
[0010] According to the feature extraction network after the weight assignment and the initial interpretable weight assignment network, the life of the rotating machinery is predicted, and the distribution difference between the source domain time series and the target domain time series is measured;
[0011] Based on the predicted life of the rotating machinery and the distribution difference, updating the weights of the feature extraction network after the weight allocation and the initial interpretable weight allocation network;
[0012] The weight allocation and weight update process is repeated until the preset conditions are met, then the iterative update is stopped and the preset life prediction model is output.
[0013] According to a second aspect of the present application, a migration adaptation device based on similarity-interpretable weight allocation for small samples is provided, the device comprising:
[0014] An acquisition unit, used to acquire a source domain time series and a target domain time series of the rotating machinery, and an initial life prediction model, wherein the initial life prediction model includes an initial feature extraction network and an initial interpretable weight allocation network;
[0015] An extraction unit, used to extract time domain features and / or frequency domain features corresponding to the source domain time series, perform feature extraction on the time domain features and / or frequency domain features using the initial feature extraction network, and obtain hidden layer feature vectors output by each network layer of the initial feature extraction network in a corresponding time window;
[0016] an allocation unit, configured to calculate the similarity between the hidden layer feature vector and the corresponding true value, and based on the similarity, use the initial interpretable weight allocation network to allocate weights to the initial feature extraction network to obtain a feature extraction network after weight allocation;
[0017] A prediction unit, configured to predict the life of the rotating machinery and measure the distribution difference between the source domain time series and the target domain time series according to the feature extraction network after the weight allocation and the initial interpretable weight allocation network;
[0018] An updating unit, configured to update weights of the feature extraction network after the weight allocation and the initial interpretable weight allocation network based on the predicted life of the rotating machinery and the distribution difference;
[0019] The output unit is used to repeat the process of weight allocation and weight update until the preset conditions are met, stop the iterative update, and output the preset life prediction model.
[0020] According to a third aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned migration adaptation method based on similarity explainable weight allocation for small samples is implemented.
[0021] According to the fourth aspect of the present application, an electronic device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein when the processor executes the program, the above-mentioned migration adaptation method based on similarity-interpretable weight allocation for small samples is implemented.
[0022] By means of the above technical solution, the present application provides a migration adaptation method for small samples based on similarity-interpretable weight allocation. By calculating the similarity between the hidden feature vectors of each network layer and the true value, the similarity can be used to assign weights to the initial feature extraction network, so that each weight has a clear calculation basis, thereby improving the interpretability and decision transparency of the life prediction model, and the prediction stability of the model is also relatively improved. At the same time, by introducing transfer learning and similarity calculation, the present application can obtain more useful information from the source domain time series, thereby enhancing the learning effect of small sample data in the target domain, reducing the model's dependence on large-scale data, and improving the generalization ability of the model.
[0023] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0025] Figure 1 A flow chart of a migration adaptation method based on similarity explainable weight allocation for small samples provided in an embodiment of the present application is shown;
[0026] Figure 2 A flow chart of another migration adaptation method based on similarity explainable weight allocation for small samples provided in an embodiment of the present application is shown;
[0027] Figure 3A schematic diagram of uncertainty quantification results provided by an embodiment of the present application is shown;
[0028] Figure 4 The overall process diagram of the model training provided by the embodiment of the present application is shown;
[0029] Figure 5 A schematic diagram of the structure of a migration adaptation device for small samples based on similarity-interpretable weight allocation provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0031] The weight allocation of traditional transfer learning methods is usually a black box operation. However, this black box operation lacks interpretability, making it difficult to understand the decision-making process of the rotating machinery life prediction model, which is not conducive to improving the prediction stability of the model.
[0032] In order to solve the above problems, the embodiment of the present invention provides a migration adaptation method based on similarity interpretable weight allocation for small samples, such as Figure 1 As shown, the method includes:
[0033] Step 101: Obtain source domain time series and target domain time series of rotating machinery, as well as an initial life prediction model.
[0034] The initial life prediction model includes an initial feature extraction network and an initial interpretable weight allocation network. The source domain time series and the target domain time series contain measurement data collected in chronological order, and the measurement data may specifically include one or more of vibration signals, temperature signals, acoustic signals, and current signals. Rotating machinery may specifically include gears, engines, bearings, and the like.
[0035] The embodiment of the present invention is mainly applicable to the scenario of training a rotating machinery life prediction model based on a small sample. The execution subject of the embodiment of the present invention is a device or equipment capable of training a rotating machinery life prediction model based on a small sample, which can be specifically set on the server side.
[0036] Specifically, the embodiment of the present invention can apply two well-known rotating machinery life cycle datasets XJTU-SY and IEEE PHM Challenge 2012, use one of the datasets as the source domain time series for training, and use the other dataset as the target domain time series for testing.
[0037] Step 102: extract the time domain features and / or frequency domain features corresponding to the source domain time series, use the initial feature extraction network to extract the time domain features and / or frequency domain features, and obtain the hidden layer feature vectors output by each network layer of the initial feature extraction network in the corresponding time window.
[0038] Among them, the time domain features specifically include the maximum value, mean, absolute average, root mean square, skewness, peak factor, waveform factor, etc. of the measurement data collected in chronological order; the frequency domain features are to decompose the signal into different sub-bands through discrete wavelet transform (DWT), and calculate the energy of each sub-band, so as to obtain a time-frequency resolution table, representing different frequency domain capabilities. The initial feature extraction network can be a long short-term memory neural network (LSTM neural network). It should be noted that the embodiment of the present invention does not specifically limit the number of network layers and the number of neurons of the LSTM neural network, which can be set according to actual business needs, such as setting the LSTM neural network to include three network layers, a total of 160 neurons, a learning rate of 0.002, and 1000 iterations.
[0039] For the embodiments of the present invention, after extracting the time domain features and / or frequency domain features corresponding to the source domain time series, the time domain features and / or frequency domain features can be input into the LSTM neural network for feature extraction to obtain the hidden layer feature vectors of the three network layers in the corresponding time window.
[0040] In some embodiments, feature screening can also be performed on time domain features and / or frequency domain features to reduce the amount of calculation while ensuring the training effect of the model. For this process, the method includes: screening out time domain features and / or frequency domain features that meet the target characteristics from the time domain features and / or frequency domain features to obtain screened time domain features and / or frequency domain features, wherein the target characteristics include monotonicity, trend and predictability.
[0041] Since the extracted time domain features and / or frequency domain features need to meet the characteristics of monotonicity, trend and predictability, the embodiment of the present invention adopts a suitable algorithm to further select the time domain features and / or frequency domain features that meet the monotonicity, trend and predictability at the same time. Specifically, for the screening of monotonicity, the gradient analysis method can be adopted, that is, the gradient change of the feature over time is calculated. If the sign of the gradient is consistent, it indicates that the feature is monotonic. In addition, the monotonic function approximation method can be adopted, that is, the data is fitted using methods such as linear regression and exponential function approximation. If the fitting effect is good, it indicates that the feature may be monotonic. For the screening of trend, the time series decomposition method can be adopted, that is, the time series of time domain features and / or frequency domain features is decomposed into trend, seasonality and random noise components, and the trend component is extracted. In addition, the weighted moving average method can be adopted, which pays more attention to the trend of recent data. For predictability screening, the autocorrelation coefficient can be used, that is, to check whether the feature has a predictable periodic or trend pattern. The ARIMA model can also be used, that is, the sub-regression integral moving average model is used to predict the time domain features, and the model's fit is analyzed to determine the predictability of the features. Spectral analysis can also be used to analyze the stability of frequency domain features, for example, whether the main frequency components remain stable over time. The embodiment of the present invention can extract time domain features and / or frequency domain features that simultaneously meet monotonicity, trend and predictability by combining the above-mentioned multiple screening methods.
[0042] At the same time, the initial feature extraction network is used to extract the filtered time domain features and / or frequency domain features to obtain the hidden layer feature vectors output by each network layer of the initial feature extraction network in the corresponding time window.
[0043] Specifically, the extracted time domain features and / or frequency domain features that meet the above-mentioned characteristic requirements are input into the initial LSTM neural network for feature extraction to obtain the hidden layer feature vector output by each layer of the LSTM neural network.
[0044] Step 103: Calculate the similarity between the hidden layer feature vector and the corresponding true value, and based on the similarity, use the initial interpretable weight allocation network to allocate weights to the initial feature extraction network to obtain a feature extraction network after weight allocation.
[0045] The initial interpretable weight distribution network may be a single-layer attention network. It should be noted that the number of layers of the attention network is not limited to a single layer, and it can be set according to actual business needs, and the embodiment of the present invention does not make specific limitations here.
[0046] For the embodiment of the present invention, after obtaining the hidden layer feature vectors output by each network layer in the initial LSTM neural network, the similarity between the hidden layer feature vectors and the true value in the corresponding time window output by each network layer is calculated respectively. When calculating the similarity specifically, the similarity between the hidden layer feature vector and the true value can be measured by calculating the cosine similarity, Euclidean distance, etc. between the hidden layer feature vector and the true value.
[0047] Then the similarity calculation result is given to the single-layer attention network, which assigns weights to the initial LSTM neural network based on the similarity calculation result. When allocating weights, for larger similarities, the single-layer attention network will assign higher weights; on the contrary, for smaller similarities, the single-layer attention network will assign smaller weights. This can explain the weight allocation process within the LSTM neural network, making the calculation basis of each weight clear, thereby improving the decision transparency of the life prediction model and the prediction stability of the model.
[0048] Step 104: predict the life of the rotating machinery according to the feature extraction network after the weight allocation and the initial interpretable weight allocation network, and measure the distribution difference between the source domain time series and the target domain time series.
[0049] For the embodiment of the present invention, after the weights are assigned, the feature extraction network after the weights are assigned and the initial interpretable weight assignment network are used to predict the life of the rotating machinery and measure the distribution difference between the source domain time series and the target domain time series. For this process, step 104 specifically includes: inputting the source domain time series into the feature extraction network after the weights are assigned and the initial interpretable weight assignment network for feature extraction and life prediction, obtaining the first feature vector output by each network layer of the feature extraction network after the weights are assigned, and the second feature vector output by the initial interpretable weight assignment network and the life of the rotating machinery; at the same time, inputting the target domain time series into The feature extraction network after weight allocation and the initial interpretable weight allocation network perform feature extraction to obtain a third feature vector output by each network layer of the feature extraction network after weight allocation, and a fourth feature vector output by the initial interpretable weight allocation network; calculate the maximum mean difference between the first feature vector and the third feature vector, and the maximum mean difference between the second feature vector and the fourth feature vector; based on the maximum mean difference between the first feature vector and the third feature vector, and the maximum mean difference between the second feature vector and the fourth feature vector, measure the distribution difference between the source domain time series and the target domain time series.
[0050] Specifically, after extracting time domain features and / or frequency domain features from the source domain time series and the target domain time series, and screening out time domain features and / or frequency domain features that meet the corresponding characteristic requirements, the time domain features and / or frequency domain features corresponding to the screened source domain time series are input into the LSTM neural network and the single-layer attention network after weight allocation for feature extraction and life prediction, and the first feature vector output by each network layer of the LSTM neural network after weight allocation, and the second feature vector output by the single-layer attention network and the predicted value of the life of the rotating machinery are obtained. At the same time, the time domain features and / or frequency domain features corresponding to the screened target domain time series are input into the LSTM neural network and the single-layer attention network after weight allocation for feature extraction, and the third feature vector output by each network layer of the LSTM neural network after weight allocation, and the fourth feature vector output by the single-layer attention network are obtained.
[0051] Furthermore, the maximum mean difference (MMD) between the first eigenvector and the third eigenvector output by each network layer of the LSTM neural network after weight allocation is calculated to obtain the maximum mean difference corresponding to each network layer of the LSTM neural network after weight allocation. At the same time, the maximum mean difference (MMD) between the second eigenvector and the fourth eigenvector output by the single-layer attention network is calculated. Finally, the maximum mean differences corresponding to each network layer of the LSTM neural network after weight allocation are added together, and then added to the maximum mean difference corresponding to the single-layer attention network, so as to obtain the distribution difference between the source domain time series and the target domain time series.
[0052] It should be noted that, when measuring the distribution difference between the source domain time series and the target domain time series, the embodiment of the present invention may also only consider the maximum mean difference corresponding to the single-layer attention network.
[0053] Step 105: Based on the predicted life of the rotating machinery and the distribution difference, weights of the feature extraction network after the weight allocation and the initial interpretable weight allocation network are updated.
[0054] In an embodiment of the present invention, after determining the predicted life of the rotating machinery and the distribution difference between the source domain time series and the target domain time series, a loss function is constructed to update the model weights. For this process, step 105 specifically includes: calculating the life loss based on the predicted life and the actual life of the rotating machinery; constructing a loss function based on the life loss and the distribution difference; based on the loss function, updating the weights of the feature extraction network after the weight allocation and the initial interpretable weight allocation network. The specific formula of the loss function L' is as follows:
[0055] L′=L1+λL MMD
[0056] Among them, L1 is the life loss, L MMD is the distribution difference, and λ is the distribution difference coefficient, which can be set according to actual business needs. Based on the loss function L′, the weights in the LSTM neural network and the single-layer attention network after weight allocation are updated. Each time the weight allocation and loss function weight update are completed, a round of iteration is completed.
[0057] Step 106: Repeat the weight allocation and weight update process until the preset conditions are met, stop iterative updating, and output the preset life prediction model.
[0058] For the embodiment of the present invention, the above-mentioned weight allocation and weight update process is repeated until the loss function reaches the minimum value or the preset number of iterations is reached, the iteration is stopped, and the final updated LSTM neural network and single-layer attention network are output, and the final updated LSTM neural network and single-layer attention network are determined as the preset life prediction model.
[0059] The embodiment of the present invention provides a migration adaptation method for small samples based on similarity-interpretable weight allocation. By calculating the similarity between the hidden feature vectors of each network layer and the true value, the similarity can be used to allocate weights to the initial feature extraction network, so that each weight has a clear calculation basis, thereby improving the interpretability and decision transparency of the life prediction model, and the prediction stability of the model is also relatively improved. At the same time, the embodiment of the present invention can obtain more useful information from the source domain time series by introducing migration learning and similarity calculation, thereby enhancing the learning effect of small sample data in the target domain, reducing the model's dependence on large-scale data, and improving the generalization ability of the model.
[0060] Furthermore, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the implementation of this embodiment, this embodiment also provides another migration adaptation method based on similarity interpretable weight allocation for small samples, such as Figure 2 As shown, the method includes:
[0061] Step 201: Obtain source domain time series and target domain time series of rotating machinery, as well as an initial life prediction model.
[0062] The initial life prediction model includes an initial feature extraction network, an initial interpretable weight allocation network and an initial uncertainty quantification network. The initial uncertainty quantification network can be a single-layer Bayesian neural network. It should be noted that the number of layers of the Bayesian neural network is not limited to a single layer, and it can be set according to actual business needs, and the embodiment of the present invention does not make specific limitations here.
[0063] According to the embodiment of the present invention, in order to train a preset life prediction model of a rotating machine, it is necessary to collect a source domain time series and a target domain time series of the rotating machine.
[0064] Step 202: extract the time domain features and / or frequency domain features corresponding to the source domain time series, use the initial feature extraction network to extract the time domain features and / or frequency domain features, and obtain the hidden layer feature vectors output by each network layer of the initial feature extraction network in the corresponding time window.
[0065] For the embodiment of the present invention, the specific process of extracting the hidden layer feature vectors output by each network layer in the corresponding time window is exactly the same as step 102, and will not be repeated here.
[0066] Step 203: Calculate the similarity between the hidden layer feature vector and the corresponding true value, and based on the similarity, use the initial interpretable weight allocation network to allocate weights to the initial feature extraction network to obtain a feature extraction network after weight allocation.
[0067] For the embodiment of the present invention, when allocating weights to the LSTM neural network, for larger similarities, the single-layer attention network will allocate higher weights to them; on the contrary, for smaller similarities, the single-layer attention network will allocate smaller weights to them. This can explain the weight allocation process within the LSTM neural network, make the calculation basis of each weight clear, and thus improve the decision-making transparency of the life prediction model, and the prediction stability of the model is also relatively improved.
[0068] Step 204: predict the life of the rotating machinery according to the feature extraction network after the weight allocation and the initial interpretable weight allocation network, and measure the distribution difference between the source domain time series and the target domain time series.
[0069] For the embodiment of the present invention, the process of predicting the life of the rotating machinery and measuring the distribution difference between the source domain time series and the target domain time series is exactly the same as step 104 and will not be repeated here.
[0070] Step 205: quantify the uncertainty of the predicted lifespan using the initial uncertainty quantification network to obtain an uncertainty quantification result of the predicted lifespan.
[0071] The initial uncertainty quantization network may be a single-layer Bayesian neural network. It should be noted that the number of layers of the Bayesian neural network is not limited to a single layer, and it can be set according to actual business requirements, and the embodiment of the present invention does not specifically limit this.
[0072] For the embodiment of the present invention, there are still uncertain factors in the weight allocation strategy based on similarity in the first embodiment, namely, prediction uncertainty and cognitive uncertainty, etc. In order to overcome this defect, the embodiment of the present invention adopts a Bayesian neural network to treat the weight as a random variable to quantify the uncertainty, so that the life prediction model can output a prediction result while also outputting the probability distribution of the result, thereby improving the credibility of the model decision. For this process, step 205 specifically includes: using the single-layer Bayesian neural network, using variational inference to quantify the uncertainty of the predicted life, and obtaining the probability distribution of the predicted life; based on the probability distribution, determining the uncertainty quantification result.
[0073] Specifically, the Bayesian neural network is used to treat the model weights as random variables, and the variational inference method is used for approximation. The forward propagation method is used to quantify the uncertainty of the model output results, and the confidence interval of the life prediction results is described by probability distribution, thereby enhancing the credibility of the life prediction model decision. Figure 3 As shown, the inclined straight line represents the actual life of the rotating machinery, the dotted line represents the predicted life of the rotating machinery, and the shaded area of the line represents the probability interval.
[0074] The embodiment of the present invention uses a Bayesian neural network to quantify the uncertainty of the weights, and by outputting the probability distribution of the life prediction results, it can provide the confidence interval of the life prediction results, thereby enhancing the credibility of the model decision.
[0075] Step 206: Based on the predicted life of the rotating machinery, the distribution difference and the uncertainty quantification result, the weights of the feature extraction network after the weight allocation, the initial interpretable weight allocation network and the initial uncertainty quantification network are updated.
[0076] For the embodiment of the present invention, after determining the predicted life, distribution difference and uncertainty quantification results, a loss function is constructed to update the model weights. For this process, step 206 specifically includes: calculating the life loss based on the predicted life and the actual life of the rotating machinery; calculating the divergence loss based on the uncertainty quantification result and the actual uncertainty quantification result of the rotating machinery; constructing a loss function based on the life loss, the divergence loss and the distribution difference; based on the loss function, updating the weights of the feature extraction network after the weight allocation, the initial interpretable weight allocation network and the initial uncertainty quantification network. The specific formula of the loss function L is as follows:
[0077] L=L1+K1+λL MMD
[0078] Among them, L1 is the life loss, K1 is the divergence loss, L MMD is the distribution difference, and λ is the distribution difference coefficient, which can be set according to actual business needs. Based on the loss function L, the weights in the LSTM neural network, single-layer attention network, and single-layer Bayesian neural network after weight allocation are updated. Each time the weight allocation and loss function weight update are completed, a round of iteration is completed.
[0079] Step 207, repeat the weight allocation and weight update process until the preset conditions are met, stop iterative updating, and output the preset life prediction model.
[0080] For the embodiment of the present invention, the above-mentioned weight allocation and weight update process is repeated until the loss function reaches the minimum value or reaches the preset number of iterations, the iteration is stopped, and the final updated LSTM neural network, single-layer attention network and single-layer Bayesian neural network are output, and the final updated LSTM neural network, single-layer attention network and single-layer Bayesian neural network are determined as the preset life prediction model. The overall training process of the life prediction model is as follows Figure 4 shown.
[0081] Furthermore, after the training is completed, the life of the rotating machinery is predicted using the trained feature extraction network and the interpretable weight allocation network in the preset life prediction model.
[0082] The embodiment of the present invention provides a migration adaptation method for small samples based on similarity-interpretable weight allocation. By calculating the similarity between the hidden feature vectors of each network layer and the true value, the similarity can be used to allocate weights to the initial feature extraction network, so that each weight has a clear calculation basis, thereby improving the interpretability and decision transparency of the life prediction model, and the prediction stability of the model is relatively improved. At the same time, the embodiment of the present invention can obtain more useful information from the source domain time series by introducing migration learning and similarity calculation, thereby enhancing the learning effect of small sample data in the target domain, reducing the model's dependence on large-scale data, and improving the generalization ability of the model. In addition, the embodiment of the present invention can output the probability distribution of the life prediction result by using an uncertainty quantization network to quantify the uncertainty of the weight, so as to give the confidence interval of the life prediction result and enhance the credibility of the model decision. Furthermore, the embodiment of the present invention uses a pre-trained model and a domain adaptation method to ensure the accuracy of feature extraction and the rationality of weight allocation.
[0083] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in the embodiment provides a migration adaptation device based on similarity interpretable weight allocation for small samples, such as Figure 5As shown, the device includes: an acquisition unit 31, an extraction unit 32, an allocation unit 33, a prediction unit 34, an update unit 35 and an output unit 36.
[0084] The acquisition unit 31 can be used to acquire the source domain time series and the target domain time series of the rotating machinery, as well as the initial life prediction model, wherein the initial life prediction model includes an initial feature extraction network and an initial interpretable weight allocation network.
[0085] The extraction unit 32 can be used to extract the time domain features and / or frequency domain features corresponding to the source domain time series, and use the initial feature extraction network to extract the time domain features and / or frequency domain features to obtain the hidden layer feature vectors output by each network layer of the initial feature extraction network in the corresponding time window.
[0086] The allocation unit 33 can be used to calculate the similarity between the hidden layer feature vector and the corresponding true value, and based on the similarity, use the initial interpretable weight allocation network to allocate weights to the initial feature extraction network to obtain the feature extraction network after weight allocation.
[0087] The prediction unit 34 can be used to predict the life of the rotating machinery according to the feature extraction network after the weight allocation and the initial interpretable weight allocation network, and measure the distribution difference between the source domain time series and the target domain time series.
[0088] The updating unit 35 may be used to update the weights of the feature extraction network after the weight allocation and the initial interpretable weight allocation network based on the predicted life of the rotating machinery and the distribution difference.
[0089] The output unit 36 can be used to repeat the process of weight allocation and weight update until a preset condition is met, stop iterative updating, and output a preset life prediction model.
[0090] In some embodiments, the device further comprises: a screening unit.
[0091] The screening unit can be used to screen out time domain features and / or frequency domain features that meet target characteristics from the time domain features and / or frequency domain features to obtain screened time domain features and / or frequency domain features, wherein the target characteristics include monotonicity, trend and predictability.
[0092] The extraction unit 32 can be specifically used to use the initial feature extraction network to extract the filtered time domain features and / or frequency domain features to obtain the hidden layer feature vectors output by each network layer of the initial feature extraction network in the corresponding time window.
[0093] In some embodiments, when the initial feature extraction network is a long short-term memory neural network including three network layers, the extraction unit 32 can also be specifically used to input the time domain features and / or the frequency domain features into the long short-term memory neural network for feature extraction, and obtain the hidden layer feature vectors output by the three network layers in the corresponding time window.
[0094] In some embodiments, when the initial interpretable weight allocation network is a single-layer attention network, the allocation unit 33 can be specifically used to allocate weights to the initial feature extraction network based on the similarity using the single-layer attention network to obtain a feature extraction network after weight allocation.
[0095] In some embodiments, the prediction unit 34 may also be used to predict the life of the rotating machinery by using the trained feature extraction network and interpretable weight allocation network in the preset life prediction model.
[0096] In some embodiments, the prediction unit 34 can be specifically used to input the source domain time series into the feature extraction network after weight allocation and the initial interpretable weight allocation network for feature extraction and life prediction, and obtain the first feature vector output by each network layer of the feature extraction network after weight allocation, and the second feature vector output by the initial interpretable weight allocation network and the life of the rotating machinery; at the same time, input the target domain time series into the feature extraction network after weight allocation and the initial interpretable weight allocation network for feature extraction, and obtain the third feature vector output by each network layer of the feature extraction network after weight allocation, and the fourth feature vector output by the initial interpretable weight allocation network; calculate the maximum mean difference between the first feature vector and the third feature vector, and the maximum mean difference between the second feature vector and the fourth feature vector; based on the maximum mean difference between the first feature vector and the third feature vector, and the maximum mean difference between the second feature vector and the fourth feature vector, measure the distribution difference between the source domain time series and the target domain time series.
[0097] In some embodiments, when the initial life prediction model further includes an initial uncertainty quantization network, the device further includes: a quantization unit.
[0098] The quantization unit can be used to quantify the uncertainty of the predicted lifespan using the initial uncertainty quantization network to obtain an uncertainty quantification result of the predicted lifespan.
[0099] In some embodiments, when the initial uncertainty quantification network is a single-layer Bayesian neural network, the quantization unit can be specifically used to adopt the single-layer Bayesian neural network to quantify the uncertainty of the predicted lifespan using variational inference to obtain the probability distribution of the predicted lifespan; based on the probability distribution, determine the uncertainty quantification result.
[0100] In some embodiments, the updating unit 35 can be specifically used to update the weights of the feature extraction network after the weight allocation, the initial interpretable weight allocation network and the initial uncertainty quantification network based on the predicted life of the rotating machinery, the distribution difference and the uncertainty quantification result.
[0101] In some embodiments, the updating unit 35 can also be specifically used to calculate the life loss based on the predicted life and the actual life of the rotating machinery; calculate the divergence loss based on the uncertainty quantification result and the actual uncertainty quantification result of the rotating machinery; construct a loss function according to the life loss, the divergence loss and the distribution difference; based on the loss function, update the weights of the feature extraction network after the weight allocation, the initial interpretable weight allocation network and the initial uncertainty quantification network.
[0102] It should be noted that for other corresponding descriptions of the functional units involved in the migration adaptation device based on similarity interpretable weight allocation for small samples provided by the embodiment of the present invention, reference can be made to Figure 1 and Figure 2 The corresponding description in will not be repeated here.
[0103] Based on the above Figure 1 and Figure 2 The method shown in the embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The transfer adaptation method based on similarity interpretable weight assignment for small samples is shown.
[0104] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling an electronic device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0105] Based on the above Figure 1 and Figure 2 The method shown, and Figure 5In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device, which can be a personal computer, a tablet computer, a server, or other network equipment, etc. The device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The transfer adaptation method based on similarity interpretable weight assignment for small samples is shown.
[0106] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0107] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0108] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware.
[0110] The embodiment of the present invention calculates the similarity between the hidden layer feature vectors of each network layer and the true value, and can use the similarity to assign weights to the initial feature extraction network, so that each weight has a clear calculation basis, thereby improving the interpretability and decision transparency of the life prediction model, and the prediction stability of the model is also relatively improved. At the same time, the embodiment of the present invention introduces transfer learning and similarity calculation to obtain more useful information from the source domain time series, thereby enhancing the learning effect of small sample data in the target domain, reducing the model's dependence on large-scale data, and improving the generalization ability of the model. In addition, the embodiment of the present invention quantifies the uncertainty of the weights by using an uncertainty quantization network, and can output the probability distribution of the life prediction results, thereby providing the confidence interval of the life prediction results and enhancing the credibility of the model decision. Furthermore, the embodiment of the present invention uses a pre-trained model and a domain adaptation method to ensure the accuracy of feature extraction and the rationality of weight allocation.
[0111] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0112] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims
1. A migration adaptation method based on similarity interpretable weight allocation for small samples, characterized in that: include: Acquire a source domain time series and a target domain time series of the rotating machinery, and an initial life prediction model, wherein the initial life prediction model includes an initial feature extraction network and an initial interpretable weight allocation network; Extracting time domain features and / or frequency domain features corresponding to the source domain time series, performing feature extraction on the time domain features and / or frequency domain features using the initial feature extraction network, and obtaining hidden layer feature vectors output by each network layer of the initial feature extraction network in a corresponding time window; Calculating the similarity between the hidden layer feature vector and the corresponding true value, and based on the similarity, using the initial interpretable weight allocation network to allocate weights to the initial feature extraction network, to obtain a feature extraction network after weight allocation; According to the feature extraction network after the weight assignment and the initial interpretable weight assignment network, the life of the rotating machinery is predicted, and the distribution difference between the source domain time series and the target domain time series is measured; Based on the predicted life of the rotating machinery and the distribution difference, updating the weights of the feature extraction network after the weight allocation and the initial interpretable weight allocation network; The process of weight allocation and weight update is repeated until the preset conditions are met, then the iterative update is stopped and the preset life prediction model is output.
2. The method according to claim 1, characterized in that After extracting the time domain features and / or frequency domain features corresponding to the source domain time series, the method further includes: Screening out time domain features and / or frequency domain features that meet target characteristics from the time domain features and / or frequency domain features to obtain screened time domain features and / or frequency domain features, wherein the target characteristics include monotonicity, trend, and predictability; The time domain features and / or frequency domain features are extracted using the initial feature extraction network to obtain hidden layer feature vectors output by each network layer of the initial feature extraction network in a corresponding time window, including: Using the initial feature extraction network to extract the filtered time domain features and / or frequency domain features, to obtain hidden layer feature vectors output by each network layer of the initial feature extraction network in the corresponding time window; and / or When the initial feature extraction network is a long short-term memory neural network including three network layers, the time domain features and / or frequency domain features are extracted using the initial feature extraction network to obtain hidden layer feature vectors output by each network layer of the initial feature extraction network in a corresponding time window, including: Inputting the time domain features and / or the frequency domain features into the long short-term memory neural network for feature extraction, and obtaining hidden layer feature vectors output by the three network layers in the corresponding time windows; and / or When the initial interpretable weight allocation network is a single-layer attention network, based on the similarity, the initial interpretable weight allocation network is used to allocate weights to the initial feature extraction network to obtain a feature extraction network after weight allocation, including: Based on the similarity, using the single-layer attention network to assign weights to the initial feature extraction network to obtain a feature extraction network after weight assignment; and / or After outputting the preset life prediction model, the method further includes: The life of the rotating machinery is predicted by using the trained feature extraction network and interpretable weight allocation network in the preset life prediction model.
3. The method according to claim 1, characterized in that According to the feature extraction network after the weight assignment and the initial interpretable weight assignment network, the life of the rotating machinery is predicted, and the distribution difference between the source domain time series and the target domain time series is measured, including: Inputting the source domain time series into the feature extraction network after weight allocation and the initial interpretable weight allocation network for feature extraction and life prediction, obtaining a first feature vector output by each network layer of the feature extraction network after weight allocation, a second feature vector output by the initial interpretable weight allocation network and the life of the rotating machinery; At the same time, the target domain time series is input into the feature extraction network after weight allocation and the initial interpretable weight allocation network for feature extraction, so as to obtain a third feature vector output by each network layer of the feature extraction network after weight allocation and a fourth feature vector output by the initial interpretable weight allocation network; calculating a maximum mean difference between the first eigenvector and the third eigenvector, and a maximum mean difference between the second eigenvector and the fourth eigenvector; Based on the maximum mean difference between the first eigenvector and the third eigenvector, and the maximum mean difference between the second eigenvector and the fourth eigenvector, the distribution difference between the source domain time series and the target domain time series is measured.
4. The method according to any one of claims 1 to 3, characterized in that: When the initial life prediction model further includes an initial uncertainty quantification network, the method further includes: The initial uncertainty quantification network is used to quantify the uncertainty of the predicted lifespan to obtain an uncertainty quantification result of the predicted lifespan.
5. The method according to claim 4, characterized in that When the initial uncertainty quantification network is a single-layer Bayesian neural network, the uncertainty quantification of the predicted life is performed using the initial uncertainty quantification network to obtain an uncertainty quantification result of the predicted life, including: The single-layer Bayesian neural network is used to quantify the uncertainty of the predicted lifespan by using variational inference to obtain a probability distribution of the predicted lifespan; Based on the probability distribution, the uncertainty quantification result is determined.
6. The method according to claim 4, characterized in that Based on the predicted life of the rotating machinery and the distribution difference, weights of the feature extraction network after the weight allocation and the initial interpretable weight allocation network are updated, including: Based on the predicted life of the rotating machinery, the distribution difference and the uncertainty quantification result, weights of the feature extraction network after the weight allocation, the initial interpretable weight allocation network and the initial uncertainty quantification network are updated.
7. The method according to claim 6, characterized in that Based on the predicted life of the rotating machinery, the distribution difference and the uncertainty quantification result, weights of the feature extraction network after the weight allocation, the initial interpretable weight allocation network and the initial uncertainty quantification network are updated, including: calculating life loss based on the predicted life and the actual life of the rotating machine; Calculating a divergence loss based on the uncertainty quantification result and a true uncertainty quantification result of the rotating machinery; Constructing a loss function according to the lifetime loss, the divergence loss and the distribution difference; Based on the loss function, weights of the feature extraction network after the weight allocation, the initial interpretable weight allocation network and the initial uncertainty quantization network are updated.
8. A migration adaptation device for small samples based on similarity-interpretable weight allocation, characterized in that: include: An acquisition unit, used to acquire a source domain time series and a target domain time series of the rotating machinery, and an initial life prediction model, wherein the initial life prediction model includes an initial feature extraction network and an initial interpretable weight allocation network; An extraction unit, used to extract time domain features and / or frequency domain features corresponding to the source domain time series, perform feature extraction on the time domain features and / or frequency domain features using the initial feature extraction network, and obtain hidden layer feature vectors output by each network layer of the initial feature extraction network in a corresponding time window; an allocation unit, configured to calculate the similarity between the hidden layer feature vector and the corresponding true value, and based on the similarity, use the initial interpretable weight allocation network to allocate weights to the initial feature extraction network to obtain a feature extraction network after weight allocation; A prediction unit, configured to predict the life of the rotating machinery and measure the distribution difference between the source domain time series and the target domain time series according to the feature extraction network after the weight allocation and the initial interpretable weight allocation network; An updating unit, configured to update weights of the feature extraction network after the weight allocation and the initial interpretable weight allocation network based on the predicted life of the rotating machinery and the distribution difference; The output unit is used to repeat the process of weight allocation and weight update until the preset conditions are met, stop the iterative update, and output the preset life prediction model.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method for predicting residual life of rotating machinery under multiple working conditions based on dynamic domain adaptation network
CN112765890A
CNN-AT-LSTM-based bearing residual service life prediction method
CN114486262A
Construction method and application of rotating part service life prediction model
CN116108737A
Paddle shaft rolling bearing residual life prediction method based on domain self-adaption and TAG
CN117454084A
Variable batch multilayer domain adaptive mode recognition method based on small samples
CN118535972A