Bearing fault diagnosis model training method and device based on soft label conditional class alignment
Patent Information
- Application Number
- CN202611170199.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-08-04
AI Technical Summary
[0004]有鉴于此,本发明提供了一种基于软标签条件类对齐的轴承故障诊断模型训练方法及装置,主要目的在于解决现有在实验室条件下完成训练的轴承故障诊断模型在实际应用中准确率低的问题
本发明提供了一种基于软标签条件类对齐的轴承故障诊断模型训练方法及装置,本发明实施例通过提取源域轴承振动数据对应的源域多通道特征矩阵,并结合所述源域轴承振动数据对应的故障标签,构建源域样本训练集和源域样本验证集;提取目标域轴承振动数据对应的目标域多通道特征矩阵,并结合待训练的初始轴承故障诊断模型对所述目标域多通道特征矩阵进行故障预测得到的软标签,构建目标域样本训练集和目标域样本验证集;基于所述源域样本训练集和所述目标域样本训练集共同训练所述初始轴承故障诊断模型,在训练过程中,依据源域样本和目标域样本在同一故障类别上的特征分布差异计算分布对齐损失,并依据所述分布对齐损失更新所述初始轴承故障诊断模型的模型参数,得到完成训练的轴承故障诊断模型;在验证阶段,基于所述源域样本验证集中各验证样本在分类预测过程中生成的原始预测分数向量确定类别判定阈值,并基于所述目标域样本验证集验证所述类别判定阈值的有效性,以在应用阶段,基于判定有效的类别判定阈值识别需拒绝输出预测结果的未知故障类别,大大减少了源域与目标域之间的特征分布偏移,降低了跨域工况变化对诊断精度的影响,同时,又确保了模型在目标域上对已知故障类别的可靠识别能力,从而大大提高了跨域故障诊断模型的泛化性能,提高实际部署中的故障诊断准确性。
Smart Images

Figure CN122712398B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing technology and can be applied to equipment fault diagnosis scenarios. In particular, it relates to a bearing fault diagnosis model training method and device based on soft label conditional class alignment. Background Technology
[0002] Rolling bearings, as the most widely used basic components in rotating machinery, are core components ensuring the stable operation of shaft systems in various equipment. Taking mixers, widely used in chemical, pharmaceutical, building materials, and metallurgical industries, as an example, the rotational motion of their agitator blades relies entirely on the precise support and low-friction operation of the bearings. However, precisely because bearings play a crucial role in transmitting loads and ensuring rotational accuracy in mixers, their health directly affects the overall performance of the machine. Statistics show that bearing-related failures account for approximately 40% to 50% of all faults in rotating machinery like mixers. Therefore, bearing fault diagnosis has significant engineering practical importance for ensuring the safe operation of industrial equipment and effectively reducing maintenance costs.
[0003] Currently, most mainstream bearing fault diagnosis models are trained under laboratory conditions. However, since laboratory datasets are usually collected under constant speed and light load conditions, while industrial field equipment operates under variable speed and load conditions, there is a significant distribution difference between the source domain of laboratory data and the target domain of industrial field equipment data. This results in data distribution drift during the actual application of the model, causing the diagnostic performance of the trained model to drop sharply during its engineering implementation, leading to low fault diagnosis accuracy. Summary of the Invention
[0004] In view of this, the present invention provides a bearing fault diagnosis model training method and apparatus based on soft label conditional class alignment, the main purpose of which is to solve the problem of low accuracy of existing bearing fault diagnosis models trained under laboratory conditions in practical applications.
[0005] According to one aspect of the present invention, a method for training a bearing fault diagnosis model based on soft-label conditional class alignment is provided, comprising: Extract the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data, and combine it with the fault label corresponding to the source domain bearing vibration data to construct a source domain sample training set and a source domain sample validation set. Extract the target domain multi-channel feature matrix corresponding to the bearing vibration data in the target domain, and combine it with the soft label obtained by fault prediction of the target domain multi-channel feature matrix using the initial bearing fault diagnosis model to be trained, to construct a target domain sample training set and a target domain sample validation set; The initial bearing fault diagnosis model is trained jointly based on the source domain sample training set and the target domain sample training set. During the training process, the distribution alignment loss is calculated based on the feature distribution difference between the source domain samples and the target domain samples in the same fault category, and the model parameters of the initial bearing fault diagnosis model are updated based on the distribution alignment loss to obtain the bearing fault diagnosis model that has been trained. During the verification phase, a category determination threshold is determined based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process. The validity of the category determination threshold is then verified based on the target domain sample verification set. In the application phase, the unknown fault categories that require rejection of prediction results are identified based on the valid category determination threshold.
[0006] According to another aspect of the present invention, a bearing fault diagnosis model training device based on soft-label conditional class alignment is provided, comprising: The source domain sample construction module is used to extract the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data, and combine it with the fault label corresponding to the source domain bearing vibration data to construct the source domain sample training set and the source domain sample validation set. The target domain sample construction module is used to extract the target domain multi-channel feature matrix corresponding to the bearing vibration data in the target domain, and combine it with the soft label obtained by fault prediction of the target domain multi-channel feature matrix by the initial bearing fault diagnosis model to be trained, to construct the target domain sample training set and the target domain sample validation set. The model training module is used to jointly train the initial bearing fault diagnosis model based on the source domain sample training set and the target domain sample training set. During the training process, the distribution alignment loss is calculated based on the feature distribution difference between the source domain samples and the target domain samples in the same fault category, and the model parameters of the initial bearing fault diagnosis model are updated based on the distribution alignment loss to obtain the bearing fault diagnosis model that has been trained. The verification module is used to determine the category determination threshold based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process during the verification phase, and to verify the validity of the category determination threshold based on the target domain sample verification set, so that in the application phase, the unknown fault categories that need to be rejected for output prediction results can be identified based on the valid category determination threshold.
[0007] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform operations corresponding to the above-described bearing fault diagnosis model training method based on soft label conditional class alignment.
[0008] According to another aspect of the present invention, a terminal is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the bearing fault diagnosis model training method based on soft label conditional class alignment described above.
[0009] By employing the above-described technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages: This invention provides a method and apparatus for training a bearing fault diagnosis model based on soft-label conditional class alignment. In this embodiment, the method extracts the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data and combines it with the fault labels corresponding to the source domain bearing vibration data to construct a source domain sample training set and a source domain sample validation set. It then extracts the target domain multi-channel feature matrix corresponding to the target domain bearing vibration data and combines it with the soft labels obtained from fault prediction using the initial bearing fault diagnosis model to be trained, constructing a target domain sample training set and a target domain sample validation set. The initial bearing fault diagnosis model is trained jointly based on the source domain sample training set and the target domain sample training set. During the training process, distribution alignment is calculated based on the feature distribution differences between the source domain samples and the target domain samples on the same fault category. The model parameters of the initial bearing fault diagnosis model are updated based on the distribution alignment loss to obtain the trained bearing fault diagnosis model. In the verification stage, the category determination threshold is determined based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process, and the effectiveness of the category determination threshold is verified based on the target domain sample verification set. In the application stage, the unknown fault categories that need to be rejected for output prediction results are identified based on the valid category determination threshold. This greatly reduces the feature distribution offset between the source domain and the target domain, reduces the impact of cross-domain operating condition changes on diagnostic accuracy, and at the same time ensures the model's reliable identification ability of known fault categories in the target domain. This greatly improves the generalization performance of the cross-domain fault diagnosis model and improves the fault diagnosis accuracy in actual deployment.
[0010] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the specification. Furthermore, in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0011] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 The flowchart of a bearing fault diagnosis model training method based on soft label conditional class alignment provided by an embodiment of the present invention is shown. Figure 2 A flowchart of a soft tag determination method provided by an embodiment of the present invention is shown; Figure 3 This diagram illustrates a block diagram of a bearing fault diagnosis model training device based on soft label conditional class alignment, as provided in an embodiment of the present invention. Figure 4 A schematic diagram of the structure of a terminal provided in an embodiment of the present invention is shown. Detailed Implementation
[0012] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0013] To address the issue of low accuracy in practical applications of existing bearing fault diagnosis models trained under laboratory conditions, this invention provides a bearing fault diagnosis model training method based on soft-label conditional class alignment. Figure 1 As shown, the method includes steps 101-104: 101. Extract the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data, and combine it with the fault label corresponding to the source domain bearing vibration data to construct a source domain sample training set and a source domain sample validation set.
[0014] In this embodiment of the invention, the source domain bearing vibration data is vibration data carrying clear fault category labels. This data can be collected during bearing fault simulation in a laboratory environment or extracted from historical bearing fault monitoring data; this embodiment of the invention does not impose any limitations. The source domain multi-channel feature matrix is a multi-dimensional data structure that can be directly input into a deep learning model, formed by stacking the source domain bearing vibration signals according to the channel dimension after transformation through various methods such as image encoding and time-frequency analysis. The purpose is to allow the model to comprehensively understand fault information from different perspectives. After obtaining the source domain multi-channel feature matrix corresponding to each source domain bearing vibration data, for each source domain bearing vibration data, the source domain multi-channel feature matrix is used as sample data, and its corresponding fault label is used as the sample marker to construct a source domain sample, thus obtaining the source domain samples corresponding to each source domain bearing vibration data, i.e., the source domain sample set. To meet the sample requirements of the training and validation phases, the source domain sample set is further divided into a source domain sample training set and a source domain sample validation set according to a preset ratio.
[0015] In one embodiment of the present invention, for further explanation and limitation, the process of performing multi-channel feature extraction on bearing vibration data of any domain through multiple feature extraction channels includes: The bearing vibration data is subjected to continuous wavelet transform through channel 0. The power spectrum is calculated based on the modulus square of the wavelet transform coefficients. The power spectrum is then subjected to decibel logarithmic transformation and normalization to obtain the logarithmic power time-frequency diagram. By sequentially performing fourth-order bandpass filtering, envelope demodulation, amplitude spectrum calculation, and decibel normalization on the bearing vibration data through channels 1 to 4 within their respective sub-frequency bands, four independent fixed-band envelope spectra corresponding to different sub-frequency bands are obtained. Through channel 5, the kurtosis values of the signals retained after filtering the bearing vibration data in multiple candidate sub-frequency bands are calculated respectively. The candidate sub-frequency band corresponding to the maximum kurtosis value is determined as the adaptive demodulation frequency band, and the envelope spectrum of the adaptive demodulation frequency band is extracted as the adaptive frequency band envelope spectrum.
[0016] In this embodiment of the invention, both the source domain multi-channel feature matrix and the target domain multi-channel feature matrix are extracted based on multiple feature extraction channels. That is, the source domain bearing vibration data and the target domain bearing vibration data are extracted using the same multiple feature extraction channels. The multiple feature extraction channels include channels 0 to 5, a total of six channels, which construct the original one-dimensional vibration signals from the source and target domains into... The six-channel feature matrix.
[0017] Channel 0 is mainly used to normalize the logarithmic power continuous wavelet transform time-frequency plot. Specifically, the Morlet wavelet basis function can be used to perform continuous wavelet transform on the vibration signal at 64 preset scales. Then, the modulus of the obtained wavelet coefficients is squared to calculate its time-frequency power spectrum. The power spectrum is converted into decibel (dB) logarithmic coordinates. Finally, the size is linearly scaled to 32×64 resolution to obtain the logarithmic power time-frequency plot required for subsequent models.
[0018] Channels 1 through 4 each correspond to a fixed sub-band, which is any one of the four frequency ranges into which the normalized analysis frequency range is divided. In other words, to achieve four-band fixed envelope spectrum extraction, the normalized analysis frequency range is first divided into four fixed sub-bands. Then, channels 1 through 4, each corresponding to one of these sub-bands, sequentially perform fourth-order Butterworth bandpass filtering on the bearing vibration data within each channel to extract the components of that band. The envelope signal is demodulated using Hilbert transform, and its fast Fourier transform amplitude spectrum is calculated to obtain the envelope spectrum. Finally, the amplitude spectrum is converted to decibel coordinates and normalized, thus obtaining four independent fixed-band envelope spectrum channels covering different frequency bands. The normalized analysis frequency range refers to the effective frequency interval used for subsequent band division and feature extraction after normalizing the analysis frequency band of the bearing vibration signal according to the sampling theorem, i.e., the highest analysis frequency is half the sampling frequency.
[0019] Channel 5 is primarily used for adaptive optimal demodulation frequency band envelope spectrum. Specifically, through channel 5, the normalized analysis frequency range is first divided into multiple candidate sub-bands. The bearing vibration data within each candidate sub-band are then bandpass filtered, and the kurtosis value of its envelope signal is calculated. The kurtosis value... The formula is expressed as: ;in, This is a sequence of bearing vibration signal amplitudes. It is the arithmetic mean of the signal amplitude sequence. The standard deviation of the signal amplitude sequence. As expected.
[0020] Subsequently, the candidate sub-band with the largest kurtosis value is automatically selected based on the maximum kurtosis value criterion, and this candidate sub-band is determined as the optimal adaptive demodulation band for the current sample. Finally, the filtered signal in the adaptive demodulation band is envelope demodulated and its envelope spectrum is extracted as the output of the fifth envelope spectrum channel, i.e., the adaptive optimal demodulation band envelope spectrum.
[0021] 102. Extract the target domain multi-channel feature matrix corresponding to the bearing vibration data in the target domain, and combine it with the soft label obtained by fault prediction of the target domain multi-channel feature matrix using the initial bearing fault diagnosis model to be trained, to construct the target domain sample training set and the target domain sample validation set.
[0022] In this embodiment of the invention, the target domain bearing vibration data consists of vibration data without explicit fault labels, primarily derived from actual bearing operation monitoring data. Whether each vibration data point corresponds to a fault category, and if so, what that category is, is unknown. The target domain bearing vibration data undergoes multi-channel feature extraction using the same feature extraction method as the source domain, resulting in a corresponding target domain multi-channel feature matrix. During the construction of the target domain samples, existing pseudo-labeling methods are not used; instead, soft labels are employed to label the target domain samples. The soft label is a probability distribution vector obtained from the initial bearing fault diagnosis model's classification prediction for each target domain bearing vibration data point. This label includes all fault categories in the prediction results and the predicted probability for each fault category. After labeling the corresponding target domain multi-channel feature matrix based on the soft labels, the target domain samples are obtained. These samples are then divided into a target domain sample training set and a target domain sample validation set according to a preset ratio.
[0023] In one embodiment of the present invention, for further illustration and limitation, such as Figure 2 As shown, the soft label determination process for any target domain sample includes: 201. The target domain logarithmic power time-frequency map is subjected to three convolution and max pooling operations in sequence through the two-dimensional convolution time-frequency branch. The local texture is abstracted into global fault semantic features layer by layer, and the strong frequency domain response is retained to obtain the deep time-frequency feature vector.
[0024] 202. By using the one-dimensional convolutional spectral branch, the energy distribution features within the frequency band are extracted layer by layer from the fixed frequency band envelope spectrum and the adaptive frequency band envelope spectrum of the target domain. The energy distribution features in the global frequency domain are then fused by global average pooling to obtain a high-dimensional spectral feature vector.
[0025] 203. The deep time-frequency feature vector and the high-dimensional spectral feature vector are concatenated into a diagnostic feature vector through the feature fusion layer.
[0026] 204. The diagnostic feature vector is classified and predicted by the classifier to obtain the predicted probability of each fault category corresponding to the multi-channel feature matrix of the target domain.
[0027] 205. The probability vector consisting of all fault categories and their respective predicted probabilities is used as the soft label of the target domain sample.
[0028] In this embodiment of the invention, the target domain multi-channel feature matrix includes a target domain logarithmic power time-frequency map, a target domain fixed-band envelope spectrum, and a target domain adaptive-band envelope spectrum. The initial bearing fault diagnosis model includes a time-frequency dual-branch heterogeneous feature extraction network, a feature fusion layer, and a classifier. The time-frequency dual-branch heterogeneous feature extraction network includes a two-dimensional convolutional time-frequency branch and a one-dimensional convolutional spectrum branch. The two-dimensional convolutional time-frequency branch consists of three cascaded two-dimensional convolutional and max-pooling modules, each layer including a two-dimensional convolutional layer and a max-pooling layer, outputting a 64-dimensional deep time-frequency feature vector. This branch receives the target domain logarithmic power time-frequency map output from channel 0, and sequentially processes the target domain logarithmic power time-frequency map through three cascaded two-dimensional convolutional and max-pooling modules, abstracting local texture features into global fault semantic features layer by layer, while retaining strong response components in the frequency domain dimension, and finally outputting a deep time-frequency feature vector.
[0029] The input to the one-dimensional convolutional spectral branch is the five envelope spectra output from channels 1 to 5. This branch first performs mean compression on each envelope spectrum along the time axis, reducing each envelope spectrum to a 64×5 matrix. Subsequently, through two cascaded layers of one-dimensional convolution and global average pooling, the energy distribution features within each frequency band are extracted layer by layer. Finally, global average pooling is used to fuse the energy distribution features in the global frequency domain, outputting a 32-dimensional spectral feature vector.
[0030] Furthermore, by concatenating the outputs of the two branches through a feature fusion layer, a 96-dimensional feature vector, or diagnostic feature vector, is obtained. This diagnostic feature vector is then input into a classifier, which uses a Softmax activation function to output the predicted probabilities of each fault category corresponding to the target domain sample. Finally, the probability distribution vector composed of all fault categories and their corresponding predicted probabilities is used as the soft label for the target domain sample. The predicted probabilities of the model's output for the target domain sample are used as soft labels for subsequent class-by-class conditional distribution alignment. This soft label strategy preserves uncertainty information during the prediction process and avoids the accumulation of errors caused by improperly set confidence thresholds or initial model biases in hard pseudo-labels, thus providing a more reliable and smoother supervisory signal for cross-domain distribution alignment.
[0031] 103. The initial bearing fault diagnosis model is trained jointly based on the source domain sample training set and the target domain sample training set. During the training process, the distribution alignment loss is calculated based on the feature distribution difference between the source domain samples and the target domain samples in the same fault category. The model parameters of the initial bearing fault diagnosis model are updated based on the distribution alignment loss to obtain the bearing fault diagnosis model that has been trained.
[0032] In this embodiment of the invention, the initial bearing fault diagnosis model is trained using both source domain and target domain sample training sets. In each iteration, the difference in feature distribution between source and target domain samples for the same fault category is calculated as the distribution alignment loss. This distribution alignment loss is then weighted and summed with the classification loss. Based on this weighted summed loss, the model parameters are synchronously updated via backpropagation. This forces the model to extract common fault features that are insensitive to domain shifts. The iteration continues until convergence, resulting in a model that achieves high diagnostic accuracy in both the source and target domains—the completed bearing fault diagnosis model.
[0033] In one embodiment of the present invention, for further explanation and limitation, the distribution alignment loss is calculated based on the feature distribution differences between source domain samples and target domain samples in the same fault category, including: The intermediate feature vectors of the initial bearing fault diagnosis model for predicting the source domain samples are extracted to obtain the source domain diagnosis feature vectors. The intermediate feature vectors of the initial bearing fault diagnosis model for predicting the target domain samples are extracted to obtain the target domain diagnosis feature vectors. Calculate the feature covariance of the source domain diagnostic feature vector under different fault categories to obtain the source domain feature covariance matrix; Using the predicted probabilities in the soft labels of the target domain samples as soft weights, the weighted feature covariance of the target domain diagnostic feature vector under different fault categories is calculated to obtain the target domain weighted feature covariance matrix. Calculate the difference norm between the source domain feature covariance matrix and the target domain weighted feature covariance matrix for each fault category, and calculate the distribution alignment loss based on the feature dimension of the diagnostic feature vector and the difference norm for all fault categories.
[0034] In this embodiment of the invention, the diagnostic feature vectors output by the feature fusion layer of the initial bearing fault diagnosis model before the source domain samples and target domain samples enter the classifier are extracted, i.e., intermediate feature vectors. Based on this, the feature covariance of the source domain diagnostic feature vector under each fault category is calculated to obtain the source domain feature covariance matrix; for the target domain, the predicted probability in the soft label output by the model is used as the soft weight to calculate the weighted feature covariance of the target domain diagnostic feature vector under each fault category to obtain the target domain weighted feature covariance matrix; finally, for each fault category, the difference norm between the source domain covariance matrix and the target domain weighted feature covariance matrix is calculated for each category, and the difference norm under all categories is averaged according to the feature dimension of the diagnostic feature vector as the final distribution alignment loss.
[0035] Through the aforementioned distribution alignment strategy based on soft label conditions, the model can constrain the feature distribution of the source and target domains for each fault category during training, making the feature covariance structure of similar faults more consistent across different domains. Compared to traditional correlation alignment methods that only align the overall distribution, this strategy effectively avoids mutual interference from distribution differences between different categories. Compared to conditional domain adaptation methods that rely on hard pseudo-labels, the soft weight mechanism based on prediction probability can adaptively reduce the alignment contribution of low-confidence samples, thereby suppressing the negative impact of mislabels. Ultimately, the model obtains more discriminative feature representations in the target domain, significantly improving the accuracy and robustness of fault diagnosis across operating conditions and equipment scenarios.
[0036] In one embodiment of the present invention, for further explanation and limitation, the calculation process of the source domain feature covariance matrix includes: For each fault category, the vector average of all source domain diagnostic feature vectors belonging to the fault category is calculated as the source domain average feature vector of the fault category. The source domain feature covariance matrix is calculated based on the deviation of each source domain diagnostic feature vector from the average feature vector of the source domain. The calculation process of the target domain weighted feature covariance matrix includes: For each fault category, the predicted probability of belonging to the fault category in the soft label of the target domain sample is used as the soft weight. The weighted average of all target domain diagnostic feature vectors belonging to the fault category is calculated as the target domain weighted average feature vector of the fault category. The target domain weighted feature covariance matrix is calculated based on the deviation of each target domain diagnostic feature vector from the target domain weighted average feature vector.
[0037] In this embodiment of the invention, for the source domain, the vector average of all source domain diagnostic feature vectors under each fault category is calculated, and the source domain feature covariance matrix under the current fault category is calculated based on the feature covariance of each source domain diagnostic feature vector relative to the source domain average feature vector. Let the source domain sample training set be represented as... ;in, This represents the i-th source domain sample. This represents the label of the i-th source domain sample. For any fault category... ,calculate The formula is expressed as: ; in, , Indicates to Therefore, feature extraction is performed. Represents the source domain diagnostic feature vector of the i-th source domain sample; Indicates the fault category Number of source domain samples. Fault category. The source domain eigencovariance matrix , represented as: .
[0038] For the target domain, under each fault category, the predicted probability of belonging to the current fault category in the soft label of the target domain samples is used as a soft weight to perform a weighted average of all target domain diagnostic feature vectors, resulting in a weighted average feature vector for the current fault category. Subsequently, based on the deviation between each target domain diagnostic feature vector and this weighted average feature vector, the weighted feature covariance matrix of the target domain for that fault category is calculated. The covariance contribution of each target domain sample is weighted and aggregated based on its corresponding soft label probability, ultimately obtaining the weighted feature covariance matrix of the target domain under that fault category. Target domain samples Fault category The soft weight is defined as: ; in, Indicates the fault category The original predicted score vector of the i-th target domain sample; Represents a classifier; Indicates the number of fault categories. Let represent the original predicted score vector of the i-th target domain sample under fault category j. Represents an exponential function. Weighted average eigenvectors of the target domain. The calculation formula is expressed as: ; in, This represents the target domain diagnostic feature vector of the i-th target domain sample. This represents the number of samples in the target domain. The formula for calculating the weighted feature covariance matrix of the target domain is as follows: ; in, Indicates the fault category The target domain weighted feature covariance matrix.
[0039] Based on the above formula, the distribution alignment loss The formula is expressed as: ; in, Representing feature dimension, ; Denotes the Frobenius norm, denominator The configuration is intended to make the loss magnitude insensitive to changes in feature dimensions.
[0040] In one embodiment of the present invention, for further explanation and limitation, the model parameters of the initial bearing fault diagnosis model are updated according to the distribution alignment loss to obtain a fully trained bearing fault diagnosis model, including: For each target domain sample, the spectral line amplitude of the corresponding envelope spectral channel in the target domain sample is extracted, and the regularization loss is calculated based on the spectral line amplitudes of all target domain samples. For any source domain sample, the original predicted score vector output by the initial fault diagnosis model is converted into the predicted probability of each category. The negative logarithm of the predicted probability corresponding to the true category of each source domain sample is calculated and averaged to obtain the source domain classification loss. For any target domain sample, the original predicted score vector output by the initial fault diagnosis model is converted into a predicted probability distribution for each category. The information entropy of the predicted probability distribution for each target domain sample is calculated and averaged to obtain the entropy minimization loss. Based on an adaptive multi-task uncertainty weighting strategy, the distribution alignment loss, the regularization loss, the source domain classification loss, and the entropy minimization loss are adaptively weighted and fused to obtain the total loss.
[0041] In this embodiment of the invention, in addition to the distribution alignment loss and source domain classification loss, entropy minimization loss and entropy minimization loss are also introduced. The calculation process of the regularization loss includes: in each training iteration, extracting the amplitude information of each frequency band envelope spectrum for the target domain samples' envelope spectrum channel output features, i.e., the fixed-band envelope spectrum and adaptive-band envelope spectrum output by channels 1 to 5. Subsequently, the regularization loss is calculated based on the spectral amplitude distribution of all target domain samples. The specific form of this loss is designed as a measure of frequency domain sparsity; for example, the L1 norm of the spectral amplitude or its approximation can be used to quantify the sparsity of the envelope spectrum. By jointly optimizing this regularization loss with the classification loss and distribution alignment loss, the model is guided during backpropagation to tend to output frequency domain energy concentrated in the frequency domain sparse envelope spectrum representation. In low signal-to-noise ratio environments, this regularization, by penalizing the non-sparse noise distribution in the frequency domain, guides the network to focus on the fault harmonic structure, thereby improving the signal-to-noise separation capability of fault features. The regularization loss... Represented as: ; in, This represents the values of channel 1 to channel 5 of the target domain sample in the six-channel feature matrix; Describing the L1 norm, This represents the number of samples in the target domain.
[0042] Source domain classification loss Represented as: ; in, This represents the category label of the corresponding source domain sample in the original predicted score vector. The score value, This represents the corresponding number in the original predicted score vector. The scores for each category.
[0043] The entropy minimization loss formula is expressed as: ; in, Indicates the first Each target domain sample belongs to category The predicted probability (soft weight). Information entropy represents the predicted probability distribution of a single sample.
[0044] Based on the above loss formulas, the total loss is expressed as: ; in, , This represents the learnable log-variance parameter. The adaptive multi-task uncertainty weighting strategy utilizes the homoscedastic uncertainty of distribution alignment loss, regularization loss, source domain classification loss, and entropy minimization loss as a dynamic weighting basis for measuring the learning difficulty or convergence of tasks. Specifically, this strategy introduces a learnable noise parameter for each task, thus learning the log-variance parameter, and derives the optimal joint likelihood form of the multi-task loss function based on Bayesian inference, thereby adaptively adjusting the contribution ratio of each loss term during training. This strategy effectively avoids gradient conflicts and biases caused by differences in the dimensions or convergence speed of different loss terms, enabling the model to focus on multiple optimization objectives such as cross-domain alignment, classification discrimination, and feature compactness in a balanced manner.
[0045] 104. In the verification phase, a category determination threshold is determined based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process, and the validity of the category determination threshold is verified based on the target domain sample verification set, so that in the application phase, the unknown fault categories that need to be rejected for output prediction results can be identified based on the valid category determination threshold.
[0046] In this embodiment of the invention, during the verification phase, the source domain sample verification set is first input into the trained bearing fault diagnosis model. The original predicted score vector output by each verification sample at the classification layer is recorded, such as the original predicted score vector before Softmax. An energy score is calculated based on the statistical distribution of these score vectors across different categories, and this energy score is used as the category determination threshold. Next, this category determination threshold is applied to the target domain sample verification set. The effectiveness of the category determination threshold is assessed by evaluating whether it can correctly accept samples of known fault categories while effectively rejecting verification samples of unknown fault categories. The category determination threshold with a valid determination result is then deployed online along with the trained bearing fault diagnosis model. Finally, during the online application phase, this validated category determination threshold is used as the discrimination criterion. When the model's energy score for a new bearing sample is higher than the corresponding category threshold, it is classified as an unknown fault category, and the prediction result is rejected, thereby avoiding misjudgments of unseen fault modes by the model.
[0047] In one embodiment of the present invention, for further explanation and limitation, the step of determining the category determination threshold based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process includes: For any validation sample, the validation sample is classified and predicted according to the bearing fault diagnosis model that has been trained. The original prediction score vector before the classifier normalization process is extracted, and the source domain energy score is calculated based on the original prediction score vector to obtain the source domain energy score of the validation sample. The source domain energy scores of all verification samples in the source domain sample verification set are sorted in ascending order, and the source domain energy score at the preset quantile order is taken as the category determination threshold. Each target domain validation sample in the target domain sample validation set is input into the trained bearing fault diagnosis model, the original prediction score vector output by the classifier is extracted, and the target domain energy score of each target domain validation sample is calculated. Fault categories whose target domain energy score is less than or equal to the category determination threshold are designated as known categories, and fault categories whose target domain energy score is greater than the category determination threshold are designated as unknown categories, thereby determining the known fault detection rate; If the known fault detection rate is greater than the preset index, then the category determination threshold is determined to be valid.
[0048] In this embodiment of the invention, energy score open set detection is introduced in the post-processing stage of the model application phase. Since this open set detection process does not modify the network structure during the training phase, it avoids the conflict between open set detection and domain adaptation goals in existing technologies. Open set detection uses the source domain energy score calculated on the source domain validation set as the class determination threshold. The formula for calculating the energy score is expressed as: ; in, For temperature parameters, Indicates the first The original predicted score vectors for each fault category are generated. This energy score integrates both the overall activation intensity and distribution uniformity of the original predicted score vectors, demonstrating significantly better discriminative ability against out-of-distribution samples than the Softmax function confidence score. After calculating the energy scores for each validation sample, the energy scores of all samples in the source domain validation set are sorted from smallest to largest. The energy value corresponding to a preset quantile (e.g., 95%) is used as the threshold for distinguishing between known and unknown fault categories. It should be noted that energy scores are negative, and the smaller the score (the more negative), the closer the sample is to the known category distribution in the source domain. Therefore, in category determination: if the energy score of a target domain sample is less than or equal to the threshold, it is classified as a known fault category; if the energy score is greater than the threshold, it is classified as an unknown fault category. Finally, based on the above determination results, the known fault detection rate is statistically analyzed to evaluate the model's performance in recognizing known categories in open set recognition scenarios.
[0049] During the validation phase, after using the preset quantile of the energy score of the source domain validation set as the initial class determination threshold, the effectiveness of this threshold needs to be further evaluated. Specifically, the detection rate of known faults after classifying known and unknown categories on the target domain validation set according to this threshold is calculated. That is, the proportion of samples correctly identified as known categories out of all known category samples. If this detection rate is greater than the preset indicator, such as 90% or 95%, it indicates that the current threshold can effectively distinguish between known and unknown fault categories, and the class determination threshold is considered effective. Conversely, if the detection rate does not reach the preset indicator, the quantile order needs to be adjusted, such as adjusting it to 97%, and the threshold needs to be redefined until the performance requirements are met.
[0050] In the application phase, the method further includes: Based on the bearing fault diagnosis model, fault prediction is performed on the feature to be predicted, and the original prediction score vector in the prediction process is extracted to calculate the target energy score of the feature to be predicted. If the target energy score is less than or equal to the category determination threshold, the original predicted score vector is normalized to obtain the fault classification result. If the target energy score is greater than the category determination threshold, the prediction ends and a prompt message indicating that the fault classification result is rejected is output.
[0051] In this embodiment of the invention, during the application phase, the feature to be predicted is input into the trained bearing fault diagnosis model for fault prediction. The original prediction score vector before classifier normalization is extracted during the prediction process, and the target energy score of the feature to be predicted is calculated accordingly. The target energy score is compared with a confirmed effective category determination threshold: if the target energy score is less than or equal to the category determination threshold, it indicates that the sample belongs to the known fault category distribution range. At this time, the original prediction score vector is normalized, such as by using the Softmax function, and the corresponding fault classification result is output. If the target energy score is greater than the threshold, it indicates that the sample deviates from the known fault distribution. At this time, the prediction process is terminated, and a prompt message indicating rejection of the fault classification result is output, thereby realizing the rejection of unknown fault categories in open set scenarios.
[0052] The open set identification strategy based on energy scores described above has significant performance advantages over traditional rejection methods that rely on Softmax confidence thresholds. Firstly, the energy score integrates both the overall activation intensity and distribution uniformity of the original predicted score vector, enabling it to more sensitively capture the deviation between the target domain samples and the known distribution of the source domain, effectively avoiding the inherent flaw of Softmax confidence overconfidence on out-of-distribution samples. Secondly, adaptive calibration using the quantile threshold of the source domain validation set ensures that the strategy maintains stable rejection performance under different fault category distribution shifts.
[0053] This invention provides a bearing fault diagnosis model training method based on soft-label conditional class alignment. In this embodiment, the method extracts the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data and combines it with the fault labels corresponding to the source domain bearing vibration data to construct a source domain sample training set and a source domain sample validation set. Then, it extracts the target domain multi-channel feature matrix corresponding to the target domain bearing vibration data and combines it with the soft labels obtained from fault prediction using the initial bearing fault diagnosis model to be trained, constructing a target domain sample training set and a target domain sample validation set. The initial bearing fault diagnosis model is trained using both the source domain sample training set and the target domain sample training set. During training, the distribution alignment loss is calculated based on the feature distribution differences between the source domain samples and the target domain samples on the same fault category. The model parameters of the initial bearing fault diagnosis model are updated according to the distribution alignment loss to obtain the trained bearing fault diagnosis model. In the verification stage, the category determination threshold is determined based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process. The effectiveness of the category determination threshold is verified based on the target domain sample verification set. In the application stage, the unknown fault categories that need to be rejected for output prediction results are identified based on the effective category determination threshold. This greatly reduces the feature distribution offset between the source domain and the target domain, reduces the impact of cross-domain operating condition changes on diagnostic accuracy, and ensures the reliable identification ability of the model for known fault categories in the target domain. This greatly improves the generalization performance of the cross-domain fault diagnosis model and improves the fault diagnosis accuracy in actual deployment.
[0054] Furthermore, as a response to the above Figure 1 The implementation of the method shown in this invention provides a bearing fault diagnosis model training device based on soft-label conditional class alignment, such as... Figure 3 As shown, the device includes: The source domain sample construction module 31 is used to extract the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data, and combine it with the fault label corresponding to the source domain bearing vibration data to construct the source domain sample training set and the source domain sample verification set. The target domain sample construction module 32 is used to extract the target domain multi-channel feature matrix corresponding to the target domain bearing vibration data, and combine the soft label obtained by fault prediction of the target domain multi-channel feature matrix with the initial bearing fault diagnosis model to be trained, and construct the target domain sample training set and the target domain sample validation set. The model training module 33 is used to jointly train the initial bearing fault diagnosis model based on the source domain sample training set and the target domain sample training set. During the training process, the distribution alignment loss is calculated based on the feature distribution difference between the source domain samples and the target domain samples in the same fault category, and the model parameters of the initial bearing fault diagnosis model are updated based on the distribution alignment loss to obtain the bearing fault diagnosis model that has been trained. The verification module 34 is used to determine the category determination threshold based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process during the verification phase, and to verify the validity of the category determination threshold based on the target domain sample verification set, so that in the application phase, the unknown fault category that needs to be rejected for output prediction results can be identified based on the valid category determination threshold.
[0055] Furthermore, both the source domain multi-channel feature matrix and the target domain multi-channel feature matrix are extracted based on multi-feature extraction channels. The multi-feature extraction channels include channels 0 to 5, a total of six channels. Channels 1 to 4 each correspond to a fixed sub-frequency band. The sub-frequency band is any one of the four frequency ranges into which the normalized analysis frequency range is divided. The source domain sample construction module 31 includes: The first channel extraction unit is used to perform continuous wavelet transform on the bearing vibration data through channel 0, calculate the power spectrum based on the modulus square of the wavelet transform coefficients, and perform decibel logarithmic transformation and normalization on the power spectrum to obtain a logarithmic power time-frequency diagram. The second channel extraction unit is used to sequentially perform fourth-order bandpass filtering, envelope demodulation, amplitude spectrum calculation and decibel normalization on the bearing vibration data through channels 1 to 4 within their respective sub-frequency bands to obtain four independent fixed-band envelope spectra corresponding to different sub-frequency bands. The third channel extraction unit is used to calculate the kurtosis value of the signal retained after filtering the bearing vibration data in multiple candidate sub-frequency bands through channel 5, determine the candidate sub-frequency band corresponding to the maximum kurtosis value as the adaptive demodulation frequency band, and extract the envelope spectrum of the adaptive demodulation frequency band as the adaptive frequency band envelope spectrum.
[0056] Furthermore, the target domain multi-channel feature matrix includes a target domain logarithmic power time-frequency map, a target domain fixed frequency band envelope spectrum, and a target domain adaptive frequency band envelope spectrum; the initial bearing fault diagnosis model includes a time-frequency dual-branch heterogeneous feature extraction network, a feature fusion layer, and a classifier, wherein the time-frequency dual-branch heterogeneous feature extraction network includes a two-dimensional convolutional time-frequency branch and a one-dimensional convolutional spectral branch; The target domain sample construction module 32 includes: The first feature extraction unit is used to perform three convolution and max pooling operations on the logarithmic power time-frequency map of the target domain through the two-dimensional convolution time-frequency branch, abstracting the local texture into global fault semantic features layer by layer, and retaining the strong frequency domain response to obtain a deep time-frequency feature vector. The second feature extraction unit is used to extract the energy distribution features within the frequency band layer by layer from the fixed frequency band envelope spectrum and the adaptive frequency band envelope spectrum of the target domain through the one-dimensional convolutional spectral branch, and to fuse the energy distribution features in the global frequency domain through global average pooling to obtain a high-dimensional spectral feature vector. The feature fusion unit is used to concatenate the deep time-frequency feature vector and the high-dimensional spectral feature vector into a diagnostic feature vector through the feature fusion layer; The classification and prediction unit is used to classify and predict the diagnostic feature vector through the classifier to obtain the predicted probability of each fault category corresponding to the multi-channel feature matrix of the target domain. The first determining unit is used to take the probability vector consisting of all fault categories and their respective predicted probabilities as the soft label of the target domain sample.
[0057] Furthermore, the model training module 33 includes: The third feature extraction unit is used to extract the intermediate feature vector of the initial bearing fault diagnosis model for predicting the source domain samples to obtain the source domain diagnosis feature vector, and to extract the intermediate feature vector of the initial bearing fault diagnosis model for predicting the target domain samples to obtain the target domain diagnosis feature vector. The first calculation unit is used to calculate the feature covariance of the source domain diagnostic feature vector under different fault categories, and obtain the source domain feature covariance matrix. The second calculation unit is used to calculate the weighted feature covariance of the target domain diagnostic feature vector under different fault categories, using the predicted probability in the soft label of the target domain sample as the soft weight, to obtain the target domain weighted feature covariance matrix. The third calculation unit is used to calculate the difference norm between the source domain feature covariance matrix and the target domain weighted feature covariance matrix for each fault category, and to calculate the distribution alignment loss based on the feature dimension of the diagnostic feature vector and the difference norm for all fault categories.
[0058] Furthermore, in practical application scenarios, the first calculation unit is specifically used to calculate the vector average of all source domain diagnostic feature vectors belonging to the fault category for each fault category, as the source domain average feature vector of the fault category; and to calculate the source domain feature covariance matrix based on the deviation of each source domain diagnostic feature vector relative to the source domain average feature vector. The second calculation unit is specifically used to calculate, for each fault category, the weighted average of all target domain diagnostic feature vectors belonging to the fault category in the target domain sample soft label as the soft weight, as the target domain weighted average feature vector of the fault category; and to calculate the target domain weighted feature covariance matrix based on the deviation of each target domain diagnostic feature vector from the target domain weighted average feature vector.
[0059] Furthermore, the model training module 33 includes: The fourth calculation unit is used to extract the spectral line amplitude of the corresponding envelope spectral channel in each target domain sample, and calculate the regularization loss based on the spectral line amplitude of all target domain samples. The fifth calculation unit is used to convert the original predicted score vector of the source domain sample output by the initial fault diagnosis model into the predicted probability of each category for any source domain sample, calculate the negative logarithm of the predicted probability corresponding to the true category of each source domain sample and take the average to obtain the source domain classification loss. The sixth calculation unit is used to convert the original prediction score vector of the target domain sample output by the initial fault diagnosis model into the prediction probability distribution of each category for any target domain sample, calculate the information entropy of the prediction probability distribution of each target domain sample and take the average to obtain the entropy minimization loss. The loss fusion unit is used to adaptively weight and fuse the distribution alignment loss, the regularization loss, the source domain classification loss, and the entropy minimization loss based on an adaptive multi-task uncertainty weighting strategy to obtain the total loss.
[0060] Furthermore, the verification module 34: The seventh calculation unit is used to classify and predict any verification sample based on the trained bearing fault diagnosis model, extract the original prediction score vector before classifier normalization, and calculate the source domain energy score based on the original prediction score vector to obtain the source domain energy score of the verification sample. The second determining unit is used to sort the source domain energy scores of all verification samples in the source domain sample verification set in ascending order, and take the source domain energy score of the preset quantile order as the category determination threshold. The eighth calculation unit is used to input each target domain verification sample in the target domain sample verification set into the trained bearing fault diagnosis model, extract the original prediction score vector output by the classifier, and calculate the target domain energy score of each target domain verification sample. The third determining unit is used to classify fault categories whose target domain energy scores are less than or equal to the category determination threshold as known categories and fault categories whose target domain energy scores are greater than the category determination threshold as unknown categories, and to determine the known fault detection rate; if the known fault detection rate is greater than a preset indicator, then the category determination threshold is determined to be valid. The device further includes: The post-processing module is used to perform fault prediction on the feature to be predicted based on the bearing fault diagnosis model, and to extract the original prediction score vector in the prediction process to calculate the target energy score of the feature to be predicted. The filtering module is used to normalize the original predicted score vector to obtain the fault classification result if the target energy score is less than or equal to the category determination threshold, and to end the prediction if the target energy score is greater than the category determination threshold, and to output a prompt message that refuses to output the fault classification result.
[0061] This invention provides a bearing fault diagnosis model training device based on soft-label conditional class alignment. In this embodiment, the device extracts the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data and combines it with the fault labels corresponding to the source domain bearing vibration data to construct a source domain sample training set and a source domain sample validation set. It then extracts the target domain multi-channel feature matrix corresponding to the target domain bearing vibration data and combines it with the soft labels obtained from fault prediction using the initial bearing fault diagnosis model to be trained, constructing a target domain sample training set and a target domain sample validation set. The initial bearing fault diagnosis model is trained jointly based on the source domain sample training set and the target domain sample training set. During training, the distribution alignment loss is calculated based on the feature distribution differences between the source domain samples and the target domain samples on the same fault category. The model parameters of the initial bearing fault diagnosis model are updated according to the distribution alignment loss to obtain the trained bearing fault diagnosis model. In the verification stage, the category determination threshold is determined based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process. The effectiveness of the category determination threshold is verified based on the target domain sample verification set. In the application stage, the unknown fault categories that need to be rejected for output prediction results are identified based on the effective category determination threshold. This greatly reduces the feature distribution offset between the source domain and the target domain, reduces the impact of cross-domain operating condition changes on diagnostic accuracy, and ensures the reliable identification ability of the model for known fault categories in the target domain. This greatly improves the generalization performance of the cross-domain fault diagnosis model and improves the fault diagnosis accuracy in actual deployment.
[0062] According to one embodiment of the present invention, a storage medium is provided, the storage medium storing at least one executable instruction, which is capable of executing the bearing fault diagnosis model training method based on soft label conditional class alignment in any of the above method embodiments.
[0063] Figure 4 The diagram shows a structural schematic of a terminal according to an embodiment of the present invention. The specific implementation of the present invention is not limited to the specific implementation of the terminal.
[0064] like Figure 4 As shown, the terminal may include: a processor 402, a communication interface 404, a memory 406, and a communication bus 408.
[0065] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408.
[0066] Communication interface 404 is used for network communication with other devices such as clients or other servers.
[0067] The processor 402 is used to execute program 410, specifically to execute the relevant steps in the above embodiment of the bearing fault diagnosis model training method based on soft label conditional class alignment.
[0068] Specifically, program 410 may include program code that includes computer operation instructions.
[0069] Processor 402 may be a central processing unit (CPU), a specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The terminal may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.
[0070] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0071] Specifically, program 410 can be used to cause processor 402 to perform the following operations: Extract the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data, and combine it with the fault label corresponding to the source domain bearing vibration data to construct a source domain sample training set and a source domain sample validation set. Extract the target domain multi-channel feature matrix corresponding to the bearing vibration data in the target domain, and combine it with the soft label obtained by fault prediction of the target domain multi-channel feature matrix using the initial bearing fault diagnosis model to be trained, to construct a target domain sample training set and a target domain sample validation set; The initial bearing fault diagnosis model is trained jointly based on the source domain sample training set and the target domain sample training set. During the training process, the distribution alignment loss is calculated based on the feature distribution difference between the source domain samples and the target domain samples in the same fault category, and the model parameters of the initial bearing fault diagnosis model are updated based on the distribution alignment loss to obtain the bearing fault diagnosis model that has been trained. During the verification phase, a category determination threshold is determined based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process. The validity of the category determination threshold is then verified based on the target domain sample verification set. In the application phase, the unknown fault categories that require rejection of prediction results are identified based on the valid category determination threshold.
[0072] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0073] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A training method for a bearing fault diagnosis model based on soft-label conditional class alignment, characterized in that, include: Extract the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data, and combine it with the fault label corresponding to the source domain bearing vibration data to construct a source domain sample training set and a source domain sample validation set. Extract the target domain multi-channel feature matrix corresponding to the bearing vibration data in the target domain, and combine it with the soft label obtained by fault prediction of the target domain multi-channel feature matrix using the initial bearing fault diagnosis model to be trained, to construct a target domain sample training set and a target domain sample validation set; The initial bearing fault diagnosis model is trained jointly based on the source domain sample training set and the target domain sample training set. During the training process, the distribution alignment loss is calculated based on the feature distribution difference between the source domain samples and the target domain samples in the same fault category, and the model parameters of the initial bearing fault diagnosis model are updated based on the distribution alignment loss to obtain the bearing fault diagnosis model that has been trained. During the verification phase, a category determination threshold is determined based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process. The validity of the category determination threshold is then verified based on the target domain sample verification set. In the application phase, the unknown fault categories that need to be rejected for output prediction results are identified based on the valid category determination threshold. The distribution alignment loss is calculated based on the difference in feature distributions between source domain samples and target domain samples for the same fault category, including: The intermediate feature vectors of the initial bearing fault diagnosis model for predicting the source domain samples are extracted to obtain the source domain diagnosis feature vectors. The intermediate feature vectors of the initial bearing fault diagnosis model for predicting the target domain samples are extracted to obtain the target domain diagnosis feature vectors. Calculate the feature covariance of the source domain diagnostic feature vector under different fault categories to obtain the source domain feature covariance matrix; Using the predicted probabilities in the soft labels of the target domain samples as soft weights, the weighted feature covariance of the target domain diagnostic feature vector under different fault categories is calculated to obtain the target domain weighted feature covariance matrix. Calculate the difference norm between the source domain feature covariance matrix and the target domain weighted feature covariance matrix for each fault category, and calculate the distribution alignment loss based on the feature dimension of the diagnostic feature vector and the difference norm for all fault categories.
2. The bearing fault diagnosis model training method based on soft-label conditional class alignment according to claim 1, characterized in that, Both the source domain multi-channel feature matrix and the target domain multi-channel feature matrix are extracted based on multi-feature extraction channels. The multi-feature extraction channels include channels 0 to 5, a total of six channels. Channels 1 to 4 each correspond to a fixed sub-frequency band. The sub-frequency band corresponds to any one of the four frequency ranges into which the normalized analysis frequency range is divided. The process of performing multi-channel feature extraction on bearing vibration data in any domain using the aforementioned multi-feature extraction channels includes: The bearing vibration data is subjected to continuous wavelet transform through channel 0. The power spectrum is calculated based on the modulus square of the wavelet transform coefficients. The power spectrum is then subjected to decibel logarithmic transformation and normalization to obtain the logarithmic power time-frequency diagram. By sequentially performing fourth-order bandpass filtering, envelope demodulation, amplitude spectrum calculation, and decibel normalization on the bearing vibration data through channels 1 to 4 within their respective sub-frequency bands, four independent fixed-band envelope spectra corresponding to different sub-frequency bands are obtained. Through channel 5, the kurtosis values of the signals retained after filtering the bearing vibration data in multiple candidate sub-frequency bands are calculated respectively. The candidate sub-frequency band corresponding to the maximum kurtosis value is determined as the adaptive demodulation frequency band, and the envelope spectrum of the adaptive demodulation frequency band is extracted as the adaptive frequency band envelope spectrum.
3. The bearing fault diagnosis model training method based on soft-label conditional class alignment according to claim 2, characterized in that, The target domain multi-channel feature matrix includes a target domain logarithmic power time-frequency plot, a target domain fixed frequency band envelope spectrum, and a target domain adaptive frequency band envelope spectrum; the initial bearing fault diagnosis model includes a time-frequency dual-branch heterogeneous feature extraction network, a feature fusion layer, and a classifier, wherein the time-frequency dual-branch heterogeneous feature extraction network includes a two-dimensional convolutional time-frequency branch and a one-dimensional convolutional spectral branch; The process of determining the soft label for any target domain sample includes: The target domain logarithmic power time-frequency map is subjected to three convolution and max pooling operations in sequence through the two-dimensional convolution time-frequency branch. The local texture is abstracted into global fault semantic features layer by layer, while the strong frequency domain response is retained, resulting in a deep time-frequency feature vector. The energy distribution features within the frequency band are extracted layer by layer from the fixed frequency band envelope spectrum and the adaptive frequency band envelope spectrum of the target domain by the one-dimensional convolutional spectral branch. The energy distribution features in the global frequency domain are then fused by global average pooling to obtain a high-dimensional spectral feature vector. The feature fusion layer concatenates the deep time-frequency feature vector and the high-dimensional spectral feature vector into a diagnostic feature vector. The diagnostic feature vector is classified and predicted by the classifier to obtain the predicted probability of each fault category corresponding to the multi-channel feature matrix of the target domain. The probability vector consisting of all fault categories and their respective predicted probabilities is used as the soft label for the target domain sample.
4. The bearing fault diagnosis model training method based on soft-label conditional class alignment according to claim 1, characterized in that, The calculation process of the source domain feature covariance matrix includes: For each fault category, the vector average of all source domain diagnostic feature vectors belonging to the fault category is calculated as the source domain average feature vector of the fault category. The source domain feature covariance matrix is calculated based on the deviation of each source domain diagnostic feature vector from the average feature vector of the source domain. The calculation process of the target domain weighted feature covariance matrix includes: For each fault category, the predicted probability of belonging to the fault category in the soft label of the target domain sample is used as the soft weight. The weighted average of all target domain diagnostic feature vectors belonging to the fault category is calculated as the target domain weighted average feature vector of the fault category. The target domain weighted feature covariance matrix is calculated based on the deviation of each target domain diagnostic feature vector from the target domain weighted average feature vector.
5. The bearing fault diagnosis model training method based on soft label conditional class alignment according to claim 2, characterized in that, The model parameters of the initial bearing fault diagnosis model are updated based on the distribution alignment loss to obtain the fully trained bearing fault diagnosis model, including: For each target domain sample, the spectral line amplitude of the corresponding envelope spectral channel in the target domain sample is extracted, and the regularization loss is calculated based on the spectral line amplitudes of all target domain samples. For any source domain sample, the original predicted score vector output by the initial fault diagnosis model is converted into the predicted probability of each category. The negative logarithm of the predicted probability corresponding to the true category of each source domain sample is calculated and averaged to obtain the source domain classification loss. For any target domain sample, the original predicted score vector output by the initial fault diagnosis model is converted into a predicted probability distribution for each category. The information entropy of the predicted probability distribution for each target domain sample is calculated and averaged to obtain the entropy minimization loss. Based on an adaptive multi-task uncertainty weighting strategy, the distribution alignment loss, the regularization loss, the source domain classification loss, and the entropy minimization loss are adaptively weighted and fused to obtain the total loss.
6. The bearing fault diagnosis model training method based on soft-label conditional class alignment according to claim 3, characterized in that, The class determination threshold is determined based on the original prediction score vector generated by each validation sample in the source domain sample validation set during the classification prediction process, including: For any validation sample, the validation sample is classified and predicted according to the bearing fault diagnosis model that has been trained. The original prediction score vector before the classifier normalization process is extracted, and the source domain energy score is calculated based on the original prediction score vector to obtain the source domain energy score of the validation sample. The source domain energy scores of all verification samples in the source domain sample verification set are sorted in ascending order, and the source domain energy score at the preset quantile order is taken as the category determination threshold. Each target domain validation sample in the target domain sample validation set is input into the trained bearing fault diagnosis model, the original prediction score vector output by the classifier is extracted, and the target domain energy score of each target domain validation sample is calculated. Fault categories whose target domain energy score is less than or equal to the category determination threshold are designated as known categories, and fault categories whose target domain energy score is greater than the category determination threshold are designated as unknown categories, thereby determining the known fault detection rate; If the known fault detection rate is greater than the preset index, then the category determination threshold is determined to be valid; In the application phase, the method further includes: Based on the bearing fault diagnosis model, fault prediction is performed on the feature to be predicted, and the original prediction score vector in the prediction process is extracted to calculate the target energy score of the feature to be predicted. If the target energy score is less than or equal to the category determination threshold, the original predicted score vector is normalized to obtain the fault classification result. If the target energy score is greater than the category determination threshold, the prediction ends and a prompt message indicating that the fault classification result is rejected is output.
7. A bearing fault diagnosis model training device based on soft-label conditional class alignment, characterized in that, The device is used to perform the operations corresponding to the bearing fault diagnosis model training method based on soft label conditional class alignment as described in any one of claims 1-6, including: The source domain sample construction module is used to extract the source domain multi-channel feature matrix corresponding to the source domain bearing vibration data, and combine it with the fault label corresponding to the source domain bearing vibration data to construct the source domain sample training set and the source domain sample validation set. The target domain sample construction module is used to extract the target domain multi-channel feature matrix corresponding to the bearing vibration data in the target domain, and combine it with the soft label obtained by fault prediction of the target domain multi-channel feature matrix by the initial bearing fault diagnosis model to be trained, to construct the target domain sample training set and the target domain sample validation set. The model training module is used to jointly train the initial bearing fault diagnosis model based on the source domain sample training set and the target domain sample training set. During the training process, the distribution alignment loss is calculated based on the feature distribution difference between the source domain samples and the target domain samples in the same fault category, and the model parameters of the initial bearing fault diagnosis model are updated based on the distribution alignment loss to obtain the bearing fault diagnosis model that has been trained. The verification module is used to determine the category determination threshold based on the original prediction score vector generated by each verification sample in the source domain sample verification set during the classification prediction process during the verification phase, and to verify the validity of the category determination threshold based on the target domain sample verification set, so that in the application phase, the unknown fault categories that need to be rejected for output prediction results can be identified based on the valid category determination threshold.
8. A storage medium, characterized in that, The storage medium stores at least one executable instruction that causes the processor to perform the operation corresponding to the bearing fault diagnosis model training method based on soft label conditional class alignment as described in any one of claims 1-6.
9. A terminal, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the bearing fault diagnosis model training method based on soft label conditional class alignment as described in any one of claims 1-6.
Citation Information
Patent Citations
Structural health monitoring multi-type data anomaly diagnosis and processing method based on Bernoulli sparse Bayesian model
CN121579923A
Bearing fault diagnosis method, mixing machine and monitoring method
CN122286415A
