A cross-domain industrial equipment fault diagnosis method and system based on discriminative prior guided diffusion and knowledge active retrieval
By distinguishing between prior-guided diffusion and active knowledge retrieval, the problems of inconsistent distribution and knowledge transfer in cross-condition industrial time-series signals are solved, achieving more accurate and stable fault diagnosis.
Patent Information
- Application Number
- CN202611711251.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-11-02
- Publication Date
- 2026-11-27
AI Technical Summary
Problems include inconsistent source and target domain distributions in cross-condition industrial time-series signals, overconfidence in deterministic diagnostic results, and knowledge transfer issues related to interference from specific segments in the local domain.
We employ a method based on discriminative prior guided diffusion and active knowledge retrieval. We extract the latent representation of segments through a shared variational encoder, generate discriminative semantic priors, calculate the segment transferability score, and use a backdiffusion denoising network to predict the fault category.
It improves the accuracy, stability, and reliability of fault diagnosis for industrial timing signals across pressure, load, or platform, avoids overconfidence in deterministic point estimation, and balances predictive distribution modeling capabilities with fault category discrimination capabilities.
Smart Images

Figure CN123179142A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial equipment fault diagnosis, and more specifically, to a cross-domain industrial equipment fault diagnosis method and system based on discriminative prior guided diffusion and active knowledge retrieval. Background Technology
[0002] Vibration, pressure, and acoustic time-series signals collected from industrial pipelines, rotating machinery, and process equipment under different pressure, load, speed, or platform conditions typically exhibit significant distribution differences. In practical applications, source operating condition data is readily labeled with fault tags, while target domain data from new operating conditions or platforms often lacks tags. Therefore, cross-domain fault diagnosis needs to be performed under conditions where target domain tags are unavailable.
[0003] Existing unsupervised adaptive domain methods mostly employ deterministic feature extraction and point estimation classification, reducing domain differences through global or subdomain distribution alignment. When faced with various heterogeneous operating conditions, the target domain samples may contain perturbations or ambiguous semantics not covered by the source domain. Deterministic classifiers struggle to represent the reliability of predictions, easily producing diagnostic results with high confidence but incorrect classification.
[0004] Furthermore, different local segments of industrial time-series signals exhibit varying degrees of cross-domain transferability. Existing global alignment methods typically treat each local segment equally, potentially introducing domain-specific perturbations into the adaptation process and weakening the domain-invariant segments that truly possess diagnostic semantics. While diffusion classification can describe the predicted distribution, if its denoising trajectory lacks explicit task-discriminative priors and constraints from locally transferable knowledge, it still struggles to balance uncertainty estimation with cross-domain discriminative performance. Summary of the Invention
[0005] The technical problem to be solved by this invention is:
[0006] To address the issues of inconsistent source and target domain distributions in cross-condition industrial time-series signals, overconfidence in deterministic diagnostic results, and knowledge transfer issues caused by interference from specific segments in the local domain.
[0007] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0008] This invention provides a cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval, comprising the following steps:
[0009] S100. Acquire the runtime sequence signals of cross-domain industrial equipment, construct and align the segment latent representations; acquire labeled source domain datasets and unlabeled target domain datasets respectively; during the training phase, divide each time-series signal into multiple continuous time-series segments, and encode each time-series segment using a variational encoder shared by the source and target domains to extract the segment latent sequences; the shared variational encoder outputs the mean and log-variance of the latent distribution of each time-series segment, and obtains random latent representations through reparameterization operations; jointly train the segment latent representations using a shared decoder, segment discriminator, and deterministic classifier.
[0010] S200: Generate discriminative semantic priors and construct a prior-guided label state diffusion process; perform global average pooling on the fragment latent sequence obtained in step S100, and input the pooled representation into a deterministic classifier trained using only source domain labels; the output of the deterministic classifier is linearly mapped to form a global discriminative semantic prior, which is used to constrain the category semantics of the diffusion trajectory.
[0011] S300. Calculate the segment transferability score and perform proactive knowledge retrieval using cross-attention; reuse the domain probability distribution output by the segment discriminator for each potential segment for transferability estimation, and use the normalized domain probability entropy as the segment transferability score to obtain transferable semantic features.
[0012] S400: Train the backdiffusion denoising network using discriminative semantic priors and transferable semantic features; after completing the representation learning in step S100, fix the shared variational encoder, shared decoder, fragment discriminator, and deterministic classifier, and train the backdiffusion denoising network using labeled source domain samples to obtain the backdiffusion transfer distribution; during training, randomly select the diffusion time step, construct the noisy label state according to the clean label state of the source domain, and input the transferable semantic features obtained in step S300 into the denoising network;
[0013] S500 performs multi-trajectory backdiffusion on the target domain samples and outputs the industrial equipment fault category; for each unlabeled target domain sample, it sequentially calls the shared variational encoder, deterministic classifier and fragment discriminator to obtain the target domain fragment latent sequence, discriminative semantic prior, conditional sequence and fragment transferability score; and initializes the noisy label state centered on the pseudo-label distribution generated by the deterministic classifier.
[0014] Further, in step S100,
[0015] Runtime sequence signals of labeled source domain industrial equipment and unlabeled target domain industrial equipment were collected to construct source domain datasets. and target domain dataset :
[0016]
[0017] in, and They represent the first Each source domain time-series signal and its fault category label Indicates the first A labelless target domain time-series signal and These represent the number of samples in the source domain and the number of samples in the target domain, respectively.
[0018] Extracting fragment latent sequences using a variational encoder shared by the source and target domains :
[0019]
[0020] in, Indicates the source domain or the target domain. Represents the time-series signal of the source or target domain. The parameter is Shared variational encoder, Indicates the number of time segments. Indicates the first The potential representation of a time sequence segment;
[0021] The shared variational encoder outputs the mean and log-variance of the latent distribution for each time segment, and obtains a random latent representation through a reparameterization operation:
[0022]
[0023] in, and They represent the first The mean and log-variance of the latent distribution of each time segment. Indicates standard Gaussian noise. This represents element-wise multiplication;
[0024] Joint optimization of signal reconstruction and latent distribution regularization:
[0025]
[0026] in, Indicates the sample index. Indicates the first One input sample, This represents the union of the source domain sample set and the unlabeled target domain sample set. Indicates the first Sample The latent random representation obtained by the shared variational encoder, The parameter is The decoding and reconstruction distribution; This represents the variational a posteriori given by the shared variational encoder; Indicates the KL divergence regularization weight; Indicates the Kullback-Leibler divergence;
[0027] Reduce domain disparities through fragment-level adversarial training:
[0028]
[0029] in, Represents the set of samples in the source domain Expectation calculation is performed on the samples in the dataset. Represents the target domain sample set Expectation calculation is performed on the samples in the dataset. The parameter is Fragment discriminator; Represents the source domain. A potential segment; Indicates the target domain. A potential segment; This represents the adversarial domain alignment loss computed through the gradient inversion layer and the fragment discriminator;
[0030] Maintain the discriminative nature of the fault category in the underlying representation:
[0031]
[0032] in, Represents source domain samples; Indicates the source domain fault category label; This represents the class probability output by the deterministic classifier; This represents a potential fragment of the source domain after pooling operations; ;
[0033] The latent representation of a segment is jointly trained using a shared decoder, a segment discriminator, and a deterministic classifier. The joint training objective is:
[0034]
[0035] in, This represents the variational learning loss consisting of the signal reconstruction term and the Kullback-Leibler divergence term. and These represent the weights of the adversarial domain alignment loss and the classification loss, respectively.
[0036] Further, in step S200,
[0037] Global average pooling is performed on the latent sequence fragments, and the class probabilities output by the deterministic classifier are linearly mapped to construct a discriminative semantic prior.
[0038]
[0039] in, Represents the first in an industrial timing signal The latent feature vectors of each time segment This represents a trainable linear mapping layer. This represents the potential representation of global pooling. The parameter is Deterministic classifier, This indicates the semantic prior for discrimination;
[0040] Using discriminative semantic priors to guide the diffusion from clean label states to noisy label states, the closed-form transition from a clean label state to any diffusion step is: :
[0041]
[0042] in, Indicates a multivariate Gaussian distribution. Indicates a clean label status. Indicates the first The noisy label state of each diffusion step , Indicates the single-step retention coefficient. Indicates from step 1 to step 2. The cumulative retention factor of the step, Indicates the first Signal retention coefficients for each diffusion step Indicates the first The noise variance of each diffusion step. Represents the identity matrix.
[0043] Further, in step S300,
[0044] The domain probability distribution output by the fragment discriminator is reused, and the information entropy of the domain probability distribution is used to construct the fragment transferability score:
[0045]
[0046] in, The parameter is The segment discriminator, Represents the domain probability distribution of each time segment. This represents the latent sequence of a fragment extracted by a shared variational encoder. This indicates that the information entropy is normalized. The information entropy function is represented by... ;
[0047] The fragment latent sequence and discriminative semantic prior are concatenated into a conditional sequence, and the fragment transferability score vector is expanded:
[0048]
[0049] in, This indicates a splicing operation. Indicates the first The transferable scores corresponding to each segment This represents a conditional sequence consisting of local fragment labels and global discriminative semantic priors. This represents the expanded segment transferability score vector, with the score corresponding to the discriminative semantic prior set to 1.
[0050] Construct a query vector based on the current noisy tag status and diffusion time step. Construct key vectors based on conditional sequences Sum value vector :
[0051]
[0052] in, This indicates the tag state embedding function. This represents the diffusion time step embedding function. , and These represent the mapping matrices for queries, keys, and values, respectively. Indicates feature splicing;
[0053] By modulating cross-attention weights using fragment transferability score vectors, transferable semantic features are constructed.
[0054]
[0055] in, This represents the cross-attention weights after transferable modulation. This represents transferable semantic features obtained through proactive knowledge retrieval. This represents the activation function that transforms a vector into a probability distribution.
[0056] Further, in step S400,
[0057] A denoising network is trained using labeled source domain samples, with a fixed shared variational encoder, shared decoder, segment discriminator, and deterministic classifier. The backward transition distribution for recovering the previous labeled state from the current noisy labeled state is as follows:
[0058]
[0059] in, The parameter is The reverse transition distribution, Indicates the first The transfer variance of each reverse diffusion step. Indicates the reverse-shifted mean:
[0060]
[0061] in, This represents the noise estimate at the output of the denoising network;
[0062] The diffusion denoising loss is constructed by estimating the actual noise added during the forward diffusion process and the noise output of the denoising network:
[0063]
[0064] in, This represents the Gaussian noise added during the forward diffusion process. Indicates the diffusion denoising loss;
[0065] The denoising network learns to recover the clean label distribution from the noisy label state by minimizing the mean square error between the real noise and the estimated noise, guided by both discriminative semantic priors and transferable semantic features.
[0066] Further, in step S500,
[0067] For samples in the target domain, extract potential sequences, discriminate semantic priors and transferable semantic features, initialize noisy label states centered on the pseudo-label distribution generated by the deterministic classifier, and perform backdiffusion step by step according to the following formula:
[0068] Among them, superscript Indicates the target domain. Indicates the back-transfer standard deviation. This represents back-diffused random noise. This indicates the semantic prior for target domain discrimination. This represents the transferable semantic features of the target domain obtained through proactive knowledge retrieval; This indicates the label state of the target domain sample in the previous diffusion step; This indicates that the denoising network is in the first... Noise estimation of the output of each reverse diffusion step;
[0069] Backdiffusion is repeatedly performed on samples from the same target domain using different random noise levels to obtain multiple prediction distributions. The average of these multiple prediction distributions is then calculated, and the fault category is output.
[0070]
[0071] in, Indicates the number of back-diffusion trajectories. Indicates the first The predicted distribution obtained from the reverse diffusion trajectories, Indicates the average predicted distribution. Indicates the candidate fault category, Represents the target domain sample. Indicates the target domain category label. This represents the average predicted distribution of the c-th category. Indicates the type of industrial equipment fault in the output;
[0072] For the same target domain sample, back diffusion is repeated a preset number of times using different random noise to obtain multiple prediction distributions; the average of the multiple prediction distributions is calculated to reduce the prediction fluctuations caused by a single random trajectory, and the category with the highest probability in the average prediction distribution is taken as the fault diagnosis result of industrial equipment.
[0073] A cross-domain industrial equipment fault diagnosis system based on discriminative prior guided diffusion and active knowledge retrieval is provided. The system has program modules corresponding to the above steps and executes the steps in the above-mentioned cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval during runtime.
[0074] A computer-readable storage medium storing a computer program configured to, when invoked by a processor, implement the steps of a cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval.
[0075] Compared with the prior art, the beneficial effects of the present invention are:
[0076] This invention describes characterization uncertainty and prediction uncertainty separately in the same technology chain by sharing variational latent representation and label distribution diffusion, which can avoid overconfident diagnosis caused by relying solely on deterministic point estimation.
[0077] This invention uses the output of a deterministic classifier as a priori discriminative semantic guide to guide the diffusion trajectory, so that the random denoising process maintains the semantics of task-related categories, taking into account both the ability to model the predictive distribution and the ability to discriminate fault categories.
[0078] The present invention uses the domain recognition entropy of the multiplexed fragment discriminator to form a fragment portability score, and uses this score to modulate cross-attention to achieve active retrieval of domain-invariant local fragments and suppression of domain-specific perturbations.
[0079] This invention eliminates the need for target domain labels and source / target domain paired samples. Through multiple random backdiffusions and predictive distribution averaging, it improves the accuracy, stability, and reliability of fault diagnosis for industrial timing signals across pressure, load, or platform. Attached Figure Description
[0080] Figure 1 This is a flowchart of a cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval in an embodiment of the present invention;
[0081] Figure 2 The images show t-SNE (t-distributed random neighborhood embedding) visualizations of feature representations under different domain adaptation strategies in embodiments of the present invention. Among them, (a) is a t-SNE visualization of the original data representation, (b) is a t-SNE visualization of the latent representation after alignment by the method of the present invention, (c) is a t-SNE visualization of the representation after DSAN alignment, and (d) is a t-SNE visualization of the representation after CoTMix alignment. Detailed Implementation
[0082] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0083] Specific Implementation Plan 1: Combining Figure 1 As shown, this invention provides a cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval, comprising the following steps:
[0084] S100. Obtain the runtime sequence signals of cross-domain industrial equipment, construct and align the latent representations of the segments; obtain the labeled source domain datasets respectively. and unlabeled target domain dataset The source domain dataset consists of timing signals from industrial equipment during operation and their fault category labels, while the target domain dataset contains only timing signals from industrial equipment during operation. During the training phase, no target domain fault category labels are used; each timing signal is divided into... Each time segment is a continuous time segment, and each time segment is encoded using a variational encoder shared by the source and target domains.
[0085] Specifically, including,
[0086] Runtime sequence signals of labeled source domain industrial equipment and unlabeled target domain industrial equipment were collected to construct source domain datasets. and target domain dataset :
[0087]
[0088] in, and They represent the first Each source domain time-series signal and its fault category label Indicates the first A labelless target domain time-series signal and These represent the number of samples in the source domain and the number of samples in the target domain, respectively.
[0089] Extracting fragment latent sequences using a variational encoder shared by the source and target domains :
[0090]
[0091] in, Indicates the source domain or the target domain. Represents the time-series signal of the source or target domain. The parameter is Shared variational encoder, Indicates the number of time segments. Indicates the first The potential representation of a time sequence segment;
[0092] The shared variational encoder outputs the mean and log-variance of the latent distribution for each time segment, and obtains a random latent representation through a reparameterization operation:
[0093]
[0094] in, and They represent the first The mean and log-variance of the latent distribution of each time segment. Indicates standard Gaussian noise. This represents element-wise multiplication;
[0095] The formula for jointly optimizing signal reconstruction and latent distribution regularization is:
[0096]
[0097] in, Indicates the sample index. Indicates the first One input sample, This represents the union of the source domain sample set and the unlabeled target domain sample set. Indicates the first Sample The latent random representation obtained by the shared variational encoder, The parameter is The decoding and reconstruction distribution; This represents the variational a posteriori given by the shared variational encoder; Indicates the KL divergence regularization weight; Indicates the Kullback-Leibler divergence;
[0098] Reducing domain disparity through fragment-level adversarial training, the corresponding formula is:
[0099]
[0100] in, Represents the set of samples in the source domain Expectation calculation is performed on the samples in the dataset. Represents the target domain sample set Expectation calculation is performed on the samples in the dataset. The parameter is Fragment discriminator; Represents the source domain. A potential segment; Indicates the target domain. A potential segment; This represents the adversarial domain alignment loss computed through the gradient inversion layer and the fragment discriminator;
[0101] To maintain the discriminative nature of the fault category in the latent representation, the corresponding formula is:
[0102]
[0103] in, Represents source domain samples; Indicates the source domain fault category label; This represents the class probability output by the deterministic classifier; This represents a potential fragment of the source domain after pooling operations; ;
[0104] The latent representation of a segment is jointly trained using a shared decoder, a segment discriminator, and a deterministic classifier. The joint training objective is:
[0105]
[0106] in, This represents the variational learning loss, consisting of the signal reconstruction term and the Kullback-Leibler divergence term (relative entropy). and These represent the weights of the adversarial domain alignment loss and the classification loss, respectively.
[0107] The shared decoder reconstructs the input signal based on the latent representation, the fragment discriminator identifies the domain origin of the fragment through the gradient inversion layer, and the shared variational encoder updates along the opposite gradient direction to reduce domain-specific variations in the fragment latent representation;
[0108] S200: Generate discriminative semantic priors and construct a prior-guided label state diffusion process; perform global average pooling on the fragment latent sequence obtained in step S100, and input the pooled representation into a deterministic classifier trained only with source domain labels; the deterministic classifier is not directly used as the final diagnostic module, and its output is linearly mapped to form a global discriminative semantic prior, which is used to constrain the category semantics of the diffusion trajectory.
[0109] Specifically, including,
[0110] Global average pooling is performed on the latent sequence fragments, and the class probabilities output by the deterministic classifier are linearly mapped to construct a discriminative semantic prior.
[0111]
[0112] in, Represents the first in an industrial timing signal The latent feature vectors of each time segment This represents a trainable linear mapping layer. This represents the potential representation of global pooling. The parameter is Deterministic classifier, This indicates the semantic prior for discrimination;
[0113] Using discriminative semantic priors to guide the diffusion from clean label states to noisy label states, the closed-form transition from a clean label state to any diffusion step is: :
[0114]
[0115] in, Indicates a multivariate Gaussian distribution. Indicates a clean label status. Indicates the first The noisy label state of each diffusion step , Indicates the single-step retention coefficient. Indicates from step 1 to step 2. The cumulative retention factor of the step, Indicates the first Signal retention coefficients for each diffusion step Indicates the first The noise variance of each diffusion step. Represents the identity matrix;
[0116] S300. Calculate the segment transferability score and perform proactive knowledge retrieval using cross-attention. The domain probability distribution output by the segment discriminator for each potential segment is reapplied for transferability estimation. Domain-specific segments contain obvious domain source information, resulting in lower output entropy from the segment discriminator. Domain-invariant segments are difficult for the segment discriminator to determine their domain source, resulting in higher output entropy. Therefore, the normalized domain probability entropy is used as the segment transferability score.
[0117] Specifically, including,
[0118] The domain probability distribution output by the fragment discriminator is reused, and the information entropy of the domain probability distribution is used to construct the fragment transferability score:
[0119]
[0120] in, The parameter is The segment discriminator, Represents the domain probability distribution of each time segment. This represents the latent sequence of a fragment extracted by a shared variational encoder. This indicates that the information entropy is normalized. The information entropy function is represented by... This represents the normalized segment transferability score;
[0121] The fragment latent sequence and discriminative semantic prior are concatenated into a conditional sequence, and the fragment transferability score vector is expanded:
[0122]
[0123] in, This indicates a splicing operation. Indicates the first The transferable scores corresponding to each segment This represents a conditional sequence consisting of local fragment labels and global discriminative semantic priors. This represents the expanded segment transferability score vector, with the score corresponding to the discriminative semantic prior set to 1.
[0124] Construct a query vector based on the current noisy tag status and diffusion time step. Construct key vectors based on conditional sequences Sum value vector :
[0125]
[0126] in, This indicates the tag state embedding function. This represents the diffusion time step embedding function. , and These represent the mapping matrices for queries, keys, and values, respectively. Indicates feature splicing;
[0127] By modulating cross-attention weights using fragment transferability score vectors, transferable semantic features are constructed.
[0128]
[0129] in, The feature dimension of the key vector. This represents the cross-attention weights after transferable modulation. This represents transferable semantic features obtained through proactive knowledge retrieval. This represents the activation function that transforms a vector into a probability distribution;
[0130] In each backdiffusion step, the transferability score directly modulates the cross-attention weights; temporal segments with higher scores contribute more to transferable semantic features, while domain-specific segments with lower scores are suppressed; the score corresponding to the global discriminative semantic prior is fixed at 1 to continuously retain task discrimination guidance;
[0131] S400: Train the backdiffusion denoising network using discriminative semantic priors and transferable semantic features; after completing the representation learning in step S100, fix the shared variational encoder, shared decoder, fragment discriminator, and deterministic classifier, and train the backdiffusion denoising network using only labeled source domain samples; during training, randomly select the diffusion time step, construct the noisy label state according to the clean label state of the source domain, and input the transferable semantic features obtained in step S300 into the denoising network;
[0132] Specifically, including,
[0133] A denoising network is trained using labeled source domain samples, with a fixed shared variational encoder, shared decoder, segment discriminator, and deterministic classifier. The backward transition distribution for recovering the previous labeled state from the current noisy labeled state is as follows:
[0134]
[0135] in, The parameter is The reverse transition distribution, Indicates the first The transfer variance of each reverse diffusion step. The reverse transition mean is expressed as follows:
[0136]
[0137] in, This represents the noise estimate at the output of the denoising network;
[0138] The diffusion denoising loss is constructed by estimating the actual noise added during the forward diffusion process and the noise output of the denoising network:
[0139]
[0140] in, This represents the Gaussian noise added during the forward diffusion process. Indicates the diffusion denoising loss;
[0141] The denoising network learns to recover the clean label distribution from the noisy label state by minimizing the mean square error between the real noise and the estimated noise, guided by both discriminative semantic priors and transferable semantic features.
[0142] S500 performs multi-trajectory backdiffusion on the target domain samples and outputs the industrial equipment fault category; for each unlabeled target domain sample, the shared variational encoder, deterministic classifier and fragment discriminator are called in sequence to obtain the target domain fragment latent sequence, discriminative semantic prior, conditional sequence and fragment transferability score; the noisy label state is initialized with the pseudo-label distribution generated by the deterministic classifier as the center.
[0143] Specifically, including,
[0144] For samples in the target domain, extract potential sequences, discriminate semantic priors and transferable semantic features, initialize noisy label states centered on the pseudo-label distribution generated by the deterministic classifier, and perform backdiffusion step by step according to the following formula:
[0145] Among them, superscript Indicates the target domain. Indicates the back-transfer standard deviation. This represents back-diffused random noise. This indicates the semantic prior for target domain discrimination. This represents the transferable semantic features of the target domain obtained through proactive knowledge retrieval; This indicates the label state of the target domain sample in the previous diffusion step; This indicates that the denoising network is in the first... Noise estimation of the output of each reverse diffusion step;
[0146] Backdiffusion is repeatedly performed on samples from the same target domain using different random noise levels to obtain multiple prediction distributions. The average of these multiple prediction distributions is then calculated, and the fault category is output.
[0147]
[0148] in, Indicates the number of back-diffusion trajectories. Indicates the first The predicted distribution obtained from the reverse diffusion trajectories, Indicates the average predicted distribution. Indicates the candidate fault category, Represents the target domain sample. Indicates the target domain category label. This represents the average predicted distribution of the c-th category. Indicates the type of industrial equipment fault in the output;
[0149] For the same target domain sample, back diffusion is repeated a preset number of times using different random noise to obtain multiple prediction distributions; the average of the multiple prediction distributions is calculated to reduce the prediction fluctuations caused by a single random trajectory, and the category with the highest probability in the average prediction distribution is taken as the fault diagnosis result of industrial equipment.
[0150] Specific Implementation Scheme 2: The present invention provides a cross-domain industrial equipment fault diagnosis system based on discriminative prior guided diffusion and active knowledge retrieval. This system has program modules corresponding to the above steps, and executes the steps in the above-mentioned cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval when running.
[0151] The other combinations and connections in this implementation scheme are the same as in Specific Implementation Scheme 1.
[0152] Specific Implementation Scheme 3: The present invention provides a computer-readable storage medium storing a computer program configured to, when called by a processor, implement the steps of a cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval.
[0153] The other combinations and connections in this implementation scheme are the same as in Specific Implementation Scheme 1.
[0154] experiment
[0155] The effectiveness of the method of the present invention is verified by taking the fault diagnosis of industrial equipment under negative pressure wave cross-pressure conditions as an example.
[0156] 1. Experimental setup;
[0157] The experimental data used the negative pressure wave dataset NPWD, with signals acquired from the ZJ-CSGD pipeline simulation platform. The experimental pipeline was 180.2 m long, the sampling frequency was 1024 Hz, and the collected flow rate was fixed at 10 m^3 / h. The data included three operating conditions: low pressure (LP), medium pressure (MP), and high pressure (HP), and four health states: normal state (NS), small leakage (SL), medium leakage (ML), and large leakage (LL).
[0158] Using LP, MP, and HP as the source or target domains respectively, six unsupervised cross-domain diagnostic tasks are constructed: LP→MP, LP→HP, MP→LP, MP→HP, HP→LP, and HP→MP. During the training phase of each task, only the source domain fault category labels are used; the target domain fault category labels are not included in the training.
[0159] The method of this invention is implemented in PyTorch and trained on a single NVIDIA GeForce RTX4090 GPU with 24 GB of VRAM. All experiments were independently repeated 5 times. Specific parameters were set as follows: diffusion steps = 20, temporal segments = 8, latent dimension = 128, hidden dimension = 256, and adversarial domain alignment loss weight = 0.01.
[0160] 2. Comparison algorithm;
[0161] To comprehensively evaluate the performance of the method of this invention in fault diagnosis of industrial time-series signals across pressure conditions, the following six unsupervised domain adaptive algorithms are selected for comparison, detailed below:
[0162] DSAN: Fine-grained alignment of relevant source domain subdomains and target domain subdomains using local maximum mean differences;
[0163] FixBi: Constructs an intermediate domain connecting the source and target domains using a fixed-ratio hybrid construction.
[0164] CM: Learns the mapping from noisy states to data states using a consistency function;
[0165] CLUDA: Combining semantically preserving contrastive learning, adversarial domain alignment, and nearest neighbor contrastive constraint learning to learn temporally invariant representations;
[0166] CoTMix: Generates source domain dominant views and target domain dominant views through cross-domain temporal fusion, and reduces domain differences by using contrastive learning;
[0167] OUDA: Balancing domain-shared feature invariance with domain-specific feature diversity.
[0168] 3. Quantitative performance evaluation;
[0169] Accuracy and macro-average F1 were used as quantitative evaluation indicators. Tables 1 and 2 show the mean and standard deviation of five repeated experiments for six cross-stress migration tasks.
[0170] The method of this invention achieved the highest accuracy and macro-average F1 on all six transfer tasks. After combining the calculations of the two sets of tasks, the average accuracy of the method of this invention was 84.20%, and the average macro-average F1 was 84.16%. Compared with the best-performing comparative algorithm OUDA, this represents an improvement of 11.02 percentage points and 16.45 percentage points, respectively, indicating that discriminative prior guided diffusion and active knowledge retrieval can simultaneously improve the accuracy and stability of cross-domain diagnosis.
[0171] Table 1 Performance Evaluation Results (%) of Migration Task (I) within the Negative Pressure Wave Data Domain
[0172]
[0173] Table 2 Performance Evaluation Results (%) of the Negative Pressure Wave Data Domain Migration Task (II)
[0174]
[0175] 4. Visual assessment;
[0176] To intuitively analyze the cross-domain feature representation effects of different methods, t-SNE was used to perform dimensionality reduction visualization of the features obtained from the original data, the method of this invention, DSAN, and CoTMix. The results are as follows: Figure 2 As shown. Figure 2 In (a) of the original data, there is a clear gap between the source domain and the target domain; Figure 2 (b) in the figure corresponds to the alignment latent representation of the method of the present invention, in which source domain samples of the same category are more closely clustered with target domain samples, and clear intervals are maintained between different fault categories; Figure 2 In (c), the DSAN still exhibits feature overlap. Figure 2 CoTMix in (d) still exhibits local source-target gaps and cluster splits. The above results demonstrate that the method of this invention achieves a better balance between cross-domain alignment and fault category discriminability.
[0177] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval, characterized in that, Includes the following steps: S100. Acquire the runtime sequence signals of cross-domain industrial equipment, construct and align the segment latent representations; acquire labeled source domain datasets and unlabeled target domain datasets respectively; during the training phase, divide each time-series signal into multiple continuous time-series segments, and encode each time-series segment using a variational encoder shared by the source and target domains to extract the segment latent sequences; the shared variational encoder outputs the mean and log-variance of the latent distribution of each time-series segment, and obtains random latent representations through reparameterization operations; jointly train the segment latent representations using a shared decoder, segment discriminator, and deterministic classifier. S200: Generate discriminative semantic priors and construct a prior-guided label state diffusion process; perform global average pooling on the fragment latent sequence obtained in step S100, and input the pooled representation into a deterministic classifier trained using only source domain labels; the output of the deterministic classifier is linearly mapped to form a global discriminative semantic prior, which is used to constrain the category semantics of the diffusion trajectory. S300. Calculate the segment transferability score and perform proactive knowledge retrieval using cross-attention; reuse the domain probability distribution output by the segment discriminator for each potential segment for transferability estimation, and use the normalized domain probability entropy as the segment transferability score to obtain transferable semantic features. S400: Train the backdiffusion denoising network using discriminative semantic priors and transferable semantic features; after completing the representation learning in step S100, fix the shared variational encoder, shared decoder, fragment discriminator and deterministic classifier, and train the backdiffusion denoising network using labeled source domain samples to obtain the back transfer distribution. During training, a diffusion time step is randomly selected, a noisy label state is constructed based on the clean label state of the source domain, and the transferable semantic features obtained in step S300 are input into the denoising network. S500 performs multi-trajectory backdiffusion on the target domain samples and outputs the industrial equipment fault category; for each unlabeled target domain sample, it sequentially calls the shared variational encoder, deterministic classifier and fragment discriminator to obtain the target domain fragment latent sequence, discriminative semantic prior, conditional sequence and fragment transferability score; and initializes the noisy label state centered on the pseudo-label distribution generated by the deterministic classifier.
2. The cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval as described in claim 1, characterized in that: In step S100, Runtime sequence signals of labeled source domain industrial equipment and unlabeled target domain industrial equipment were collected to construct source domain datasets. and target domain dataset : in, and They represent the first Each source domain time-series signal and its fault category label Indicates the first A labelless target domain time-series signal and These represent the number of samples in the source domain and the number of samples in the target domain, respectively. Extracting fragment latent sequences using a variational encoder shared by the source and target domains : in, Indicates the source domain or the target domain. Represents the time-series signal of the source or target domain. The parameter is Shared variational encoder, Indicates the number of time segments. Indicates the first The potential representation of a time sequence segment; The shared variational encoder outputs the mean and log-variance of the latent distribution for each time segment, and obtains a random latent representation through a reparameterization operation: in, and They represent the first The mean and log-variance of the latent distribution of each time segment. Indicates standard Gaussian noise. This represents element-wise multiplication; Joint optimization of signal reconstruction and latent distribution regularization: in, Indicates the sample index. Indicates the first One input sample, This represents the union of the source domain sample set and the unlabeled target domain sample set. Indicates the first Sample The latent random representation obtained by the shared variational encoder, The parameter is The decoding and reconstruction distribution; This represents the variational a posteriori given by the shared variational encoder; Indicates the KL divergence regularization weight; Indicates the Kullback-Leibler divergence; Reduce domain disparities through fragment-level adversarial training: in, Represents the set of samples in the source domain Calculate the expected value of the samples in the dataset. Represents the target domain sample set Calculate the expected value of the samples in the dataset. The parameter is Fragment discriminator; Represents the source domain. A potential segment; Indicates the target domain. A potential segment; This represents the adversarial domain alignment loss computed through the gradient inversion layer and the fragment discriminator; Maintain the discriminative nature of the fault category in the underlying representation: in, Represents source domain samples; Indicates the source domain fault category label; This represents the class probability output by the deterministic classifier; This represents a potential fragment of the source domain after pooling operations; ; The latent representation of a segment is jointly trained using a shared decoder, a segment discriminator, and a deterministic classifier. The joint training objective is: in, This represents the variational learning loss consisting of the signal reconstruction term and the Kullback-Leibler divergence term. and These represent the weights of the adversarial domain alignment loss and the classification loss, respectively.
3. The cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval as described in claim 2, characterized in that: In step S200, Global average pooling is performed on the latent sequence fragments, and the class probabilities output by the deterministic classifier are linearly mapped to construct a discriminative semantic prior. in, Represents the first in an industrial timing signal The latent feature vectors of each time segment This represents a trainable linear mapping layer. This represents the potential representation of global pooling. The parameter is Deterministic classifier, This indicates the semantic prior for discrimination; Using discriminative semantic priors to guide the diffusion from clean label states to noisy label states, the closed-form transition from a clean label state to any diffusion step is: : in, Indicates a multivariate Gaussian distribution. Indicates a clean label status. Indicates the first The noisy label state of each diffusion step , Indicates the single-step retention coefficient. Indicates from step 1 to step 2. The cumulative retention factor of the step, Indicates the first Signal retention coefficients for each diffusion step Indicates the first The noise variance of each diffusion step. Represents the identity matrix.
4. The cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval as described in claim 3, characterized in that: In step S300, The domain probability distribution output by the fragment discriminator is reused, and the information entropy of the domain probability distribution is used to construct the fragment transferability score: in, The parameter is The segment discriminator, Represents the domain probability distribution of each time segment. This represents the latent sequence of a fragment extracted by a shared variational encoder. This indicates that the information entropy is normalized. Represents the information entropy function. This represents the normalized segment transferability score; The fragment latent sequence and discriminative semantic prior are concatenated into a conditional sequence, and the fragment transferability score vector is expanded: in, This indicates a splicing operation. Indicates the first The transferable scores corresponding to each segment This represents a conditional sequence consisting of local fragment labels and global discriminative semantic priors. This represents the expanded segment transferability score vector, with the score corresponding to the discriminative semantic prior set to 1; Construct a query vector based on the current noisy tag status and diffusion time step. Construct key vectors based on conditional sequences Sum value vector : in, This indicates the tag state embedding function. This represents the diffusion time step embedding function. , and These represent the mapping matrices for queries, keys, and values, respectively. Indicates feature splicing; By modulating cross-attention weights using fragment transferability score vectors, transferable semantic features are constructed. in, The feature dimension of the key vector. This represents the cross-attention weights after transferable modulation. This represents transferable semantic features obtained through proactive knowledge retrieval. This represents the activation function that transforms a vector into a probability distribution.
5. The cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval as described in claim 4, characterized in that: In step S400, A denoising network is trained using labeled source domain samples, with a fixed shared variational encoder, shared decoder, segment discriminator, and deterministic classifier. The backward transition distribution for recovering the previous labeled state from the current noisy labeled state is as follows: in, The parameter is The reverse transition distribution, Indicates the first The transfer variance of each reverse diffusion step. Indicates the reverse-shifted mean: in, This represents the noise estimate at the output of the denoising network; The diffusion denoising loss is constructed by estimating the actual noise added during the forward diffusion process and the noise output of the denoising network: in, This represents the Gaussian noise added during the forward diffusion process. Indicates the diffusion denoising loss; The denoising network learns to recover the clean label distribution from the noisy label state by minimizing the mean square error between the real noise and the estimated noise, guided by both discriminative semantic priors and transferable semantic features.
6. The cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval as described in claim 5, characterized in that: In step S500, For samples in the target domain, extract potential sequences, discriminate semantic priors and transferable semantic features, initialize noisy label states centered on the pseudo-label distribution generated by the deterministic classifier, and perform backdiffusion step by step according to the following formula: Among them, superscript Indicates the target domain. Indicates the back-transfer standard deviation. This represents back-diffused random noise. This indicates the semantic prior for target domain discrimination. This represents the transferable semantic features of the target domain obtained through proactive knowledge retrieval; This indicates the label state of the target domain sample in the previous diffusion step; Indicates the denoising network in the th... Noise estimation of the output of each reverse diffusion step; Backdiffusion is repeatedly performed on samples from the same target domain using different random noise levels to obtain multiple prediction distributions. The average of these multiple prediction distributions is then calculated, and the fault category is output. in, Indicates the number of back-diffusion trajectories. Indicates the first The predicted distribution obtained from the reverse diffusion trajectories, Indicates the average predicted distribution. Indicates the candidate fault category, Represents the target domain sample. Indicates the target domain category label. This represents the average predicted distribution of the c-th category. Indicates the type of industrial equipment fault in the output; For the same target domain sample, back diffusion is repeated a preset number of times using different random noise to obtain multiple prediction distributions; the average of the multiple prediction distributions is calculated to reduce the prediction fluctuations caused by a single random trajectory, and the category with the highest probability in the average prediction distribution is taken as the fault diagnosis result of industrial equipment.
7. A cross-domain industrial equipment fault diagnosis system based on discriminative prior guided diffusion and active knowledge retrieval, characterized in that: The system has a program module corresponding to the steps of any one of the claims 1-6 above, and executes the steps in the above-described method for cross-domain industrial equipment fault diagnosis based on discriminative prior guided diffusion and active knowledge retrieval when it is run.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program configured to, when invoked by a processor, implement the steps of any one of claims 1-6: a cross-domain industrial equipment fault diagnosis method based on discriminative prior guided diffusion and active knowledge retrieval.
