A three-domain retrieval enhanced cross-domain fault diagnosis method

By combining the construction of a three-domain view with the freezing of a large language model, the problem of zero-sample cross-domain fault diagnosis under the condition that the target domain is inaccessible is solved, and high-precision, stable and traceable fault diagnosis results are achieved, which solves the problems of low diagnostic accuracy and poor stability in the existing technology.

CN123178977APending Publication Date: 2026-11-27GUIZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611534770.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-30
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

When the target domain is completely inaccessible, the traditional domain adaptation method fails, resulting in low accuracy, poor stability, inconsistent and untraceable labels in zero-sample cross-domain fault diagnosis, and a lack of dynamic fusion of multi-physical domain information and resolution of label conflicts.

Method used

A cross-domain fault diagnosis method enhanced by three-domain retrieval is adopted. By constructing time-domain, frequency-domain, and time-frequency-domain views, the representation of the physical domain set is extracted. The frozen time-series basic encoder is used for projection mapping to generate three-domain physical vectors. The method is then combined with a frozen large language model for diagnosis, achieving adaptive weight fusion and consensus label filtering to generate traceable diagnostic results.

Benefits of technology

It improves the stability of cross-domain retrieval ranking and diagnostic robustness, ensures the consistency between diagnostic results and historical evidence of interpretation, provides engineering-readable historical evidence, and achieves the stability and traceability of diagnostic results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178977A_ABST
    Figure CN123178977A_ABST
Patent Text Reader

Abstract

The application discloses a three-domain retrieval enhanced cross-domain fault diagnosis method, relates to the field of industrial fault diagnosis, and comprises the following steps: acquiring source domain labeled samples to construct an offline three-domain knowledge base, constructing time domain, frequency domain and time-frequency domain views for source cases, obtaining three-domain physical vectors through coding projection, and combining with unlabeled descriptions to store in the database; calculating three-domain similarity for target query, determining adaptive domain weight based on local neighbor and full database background contrast, and performing voting screening after normalized fusion to obtain the same label retrieval context; inputting the query waveform and the retrieval context into a frozen large language model in parallel, outputting the fault category through a classification head, and generating a traceable explanation through a generation head. The application realizes cross-domain fault diagnosis under the condition that the target domain is completely inaccessible, and has the advantages of stable retrieval, consistent labels and traceable results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial fault diagnosis, and in particular to a cross-domain fault diagnosis method with enhanced three-domain retrieval. Background Technology

[0002] Industrial fault diagnosis (FD) identifies the health status or fault type of equipment by analyzing time series (TS) signals such as vibration, current, and acoustic signals from bearings, gearboxes, motors, pumps, and other industrial equipment. Existing data-driven methods typically window, normalize, and extract features from continuous signals, then use convolutional neural networks, Transformers, or time-series-based models to learn the mapping from signals to category labels. When the training and testing conditions are similarly distributed and there are sufficient labeled samples, these methods can achieve high diagnostic accuracy.

[0003] In real-world industrial settings, factors such as rotational speed, load, sensor location, noise levels, and equipment degradation stages frequently change, causing domain shifts between the source and target operating conditions. Common unsupervised domain adaptation methods require access to the unlabeled signals of the target operating condition and distribution alignment during the training or model selection phase. However, when new equipment or operating conditions are first put into operation, or when data access is restricted, the target domain signals, labels, and statistics are not available in advance, and zero-sample cross-domain diagnostics must be performed relying on historical cases from the source domain.

[0004] In recent years, Large Language Models (LLMs) have been used in time series analysis. Time-LLM maps time series slices to the embedding space of a frozen large language model through reprogramming, thus connecting numerical sequences with the language model. This method is mainly geared towards time series prediction and has not yet established a multi-physical domain historical case retrieval and label consistency control suitable for industrial fault diagnosis.

[0005] Therefore, there is an urgent need for a cross-domain fault diagnosis method with enhanced three-domain retrieval, which can solve the problem of zero-sample cross-domain fault diagnosis using multi-physical domain information of historical cases in the source domain when the target domain is completely inaccessible, while ensuring retrieval stability, label consistency and traceability of diagnostic results. Summary of the Invention

[0006] The purpose of this invention is to provide a cross-domain fault diagnosis method with enhanced three-domain retrieval, which solves the problems of traditional domain adaptation failure when the target domain is completely inaccessible, single-domain retrieval without dynamic fusion of multi-physical domain evidence and resolution of label conflicts, resulting in low accuracy, poor stability, inconsistent labels and lack of traceability in zero-sample cross-domain diagnosis.

[0007] To achieve the above objectives, this invention provides a cross-domain fault diagnosis method with enhanced three-domain retrieval, comprising the following steps: Step 1: Obtain labeled time series samples from the source domain, divide the labeled time series samples from the source domain into non-overlapping retrieval memory set, training set and validation set, and perform windowing and normalization preprocessing on each source case in the retrieval memory set. Step 2: Construct a time-domain view, a frequency-domain view, and a time-frequency-domain view for each source case in the preprocessed retrieval memory set; construct a physical domain set based on the time-domain view, frequency-domain view, and time-frequency-domain view. The frozen temporal-based encoder is used to extract the representations of each domain in the physical domain set. The three-domain physical vectors are obtained by projecting the domain-related vectors onto the common retrieval space and normalizing them using the second norm. ; Step 3: Extract observable statistics unrelated to category labels from the three physical views to form the signal card for the source case. And through the frozen description generator, the source case signal card Convert to natural language description Source identifier based on each source case Category tags Natural Language Description and its three-domain physical vector Building an offline three-domain knowledge base ; Step 4: Target query for diagnosis Perform the same processing steps as the source case to obtain the target query. Three-domain physical vector ; Calculate the similarity between the target query and each source case in each domain of the physical domain set. ; Calculate the adaptive domain weights of the target query in each domain of the physical domain set. After rank normalization of the similarity scores, the data is weighted and fused to obtain a fusion score for each source case. ; Step 5: Select according to the fusion score from high to low. Each candidate source case is weighted by its non-negative fusion score. The categories are voted on, and the category with the most votes is used as the consensus label. Based on the consensus label, a hard screening was performed on the offline three-domain knowledge base, retaining only source cases whose category labels matched the consensus label. The selected cases were then rearranged according to their fusion scores. Individual source cases serve as the final retrieval context. ,in If there are insufficient source cases in the screening results If there are a number of available source cases, then all available source cases will be returned. Step 6: Input the frozen large language model in parallel using the numerical waveform path and the retrieval evidence path, extract the hidden states of the frozen large language model, and connect the hidden states of the frozen large language model to the trainable classification head and the frozen generation head respectively. Through the trainable classification head, the predicted fault category and confidence of the target query are output based on the pooled hidden states. The frozen generation head receives the predicted fault category output by the trainable classification head as a fixed decision label, and under the generation constraints, generates explanatory text only based on the signal card of the target query and the final retrieval context; finally, the traceable diagnostic result is output.

[0008] Preferably, the specific process of constructing the time-domain view, frequency-domain view, and time-frequency-domain view in step 2 is as follows: For the i-th source case Let its time-domain signal be ,in The length of the signal window. The category label for the i-th source case; the time-domain view preserves the original waveform, expressed as: ; The frequency domain view uses the amplitude of the real input Fast Fourier Transform, expressed as: ; The time-frequency domain view uses the short-time Fourier transform amplitude spectrum, expressed as: ; in, Let n be the temporal amplitude of the i-th source case at time sampling point n. Let k be the frequency domain amplitude of the i-th source case at frequency index k. Let j be the time-frequency amplitude value of the i-th source case at local time frame m and frequency index k, where j is the imaginary unit. For time sampling point index, For local time frame indexing, For frequency index, For the length of the window Analysis window, For frame shift, The padding signal used for centering transformation.

[0009] Preferably, the method for generating the three-domain physical vectors in step 2 is: based on the temporal domain view. Frequency domain view and time-frequency domain view Construct a set of physical domains Using a frozen timing-based encoder For the first Views of individual source cases within each domain of the physical domain set. Feature extraction is performed to obtain the domain representation. The expression is: ; in, For the index of the physical domain set, , The dimension representing the features of each domain in the physical domain set V before its domain-related projection; Longitude-related projection P v Mapping to a common d-dimensional retrieval space and performing L2 normalization yields a three-domain physical vector. The expression is: .

[0010] Preferably, the specific process of constructing the offline three-domain knowledge base in step 3 is as follows: Observable statistics independent of category labels are extracted from the three physical views to form the signal card for the source case. and through the frozen description generator Signal card from the source case Convert to natural language description The expression is: ; Based on the source identifier of each source case in the retrieval memory set Category tags Natural Language Description and its three-domain physical vector Building an offline three-domain knowledge base The expression is: ; ; in, For the i-th source case, the entry in the offline three-domain knowledge base includes the source identifier. Category tags Natural Language Description and its three-domain physical vector , To retrieve the number of cases in the memory set.

[0011] Preferably, step 4 specifically includes the following steps: S41. Target query for diagnosis Perform the same preprocessing, three-domain transformation, frozen encoding, and projection normalization as the source case to obtain the source identifier of the target query. Category tags for the target query Target query signal card Natural language description of the target query Three-domain physical vectors of the target query ; S42. Calculate the similarity between the target query and each source case in each domain of the physical domain set. The expression is: ; in, For the index of the physical domain set, For the source case Relative to the target query in each domain of the physical domain set The rank is the result of sorting the similarities in ascending order, and the rank of the most similar source case is . ; S43. Calculate the adaptive domain weight of the target query in each domain of the physical domain set. Specifically, this involves selecting the domains with the highest similarity from the set of physical domains. For each source case, calculate its local nearest neighbor similarity. The expression is: ; in, Indicates the target query The set of similarities between the source cases in the knowledge base and each domain in the physical domain set; This means selecting the value with the highest similarity from the set. Similarity, This indicates calculating the mean; calculating the reliability of the local-global comparison. The expression is: ; in, This is a stability constant used to prevent division by zero when the standard deviation is zero. This is a truncation function. This represents the upper limit of the reliability of local-to-global comparisons. This represents the mean similarity across the entire database. Let be the standard deviation of the total database similarity, and let the total database similarity be... ; Calculate the adaptive domain weights of the target query in each domain of the physical domain set. The expression is: ; in, To minimize the retention weight, The sum of the weights of each domain is 1, and the weight of each domain is not less than b. For temperature parameters, An index for the set of physical domains; S44. Obtain the ranking of source case i in each domain of physical domain set V by sorting each domain in the physical domain set in descending order of similarity. The rankings are normalized and weighted to obtain the fusion score for each source case. The expression is: .

[0012] Preferably, in step 5, a consensus label is obtained. The specific steps are as follows: Select according to the fusion score from high to low. 1 candidate source case, construct candidate set The non-negative fusion scores of each candidate source case are used as the voting weights. The categories of each candidate source case are voted on, and the category with the highest vote score is used as the consensus label. The expression is: ; ; in, As a category, The voting score for each candidate source case.

[0013] Preferably, in step 6, the numerical waveform path is as follows: the complete query waveform is divided into slices covering all sampling points, and mapped to the hidden dimensions of the frozen large language model via slice embedding and a trainable reprogrammable adapter; the retrieval evidence path is as follows: the task description, the natural language description of the target query, and... are organized according to a fixed template. The source case includes the source identifier, category label, and natural language description; the natural language description of the target query does not include the category label, and the task description is used to instruct the frozen large language model to perform the fault diagnosis task and constrain its output format, and does not include the true category label of the current query.

[0014] Preferably, in step 6, the specific process for obtaining the predicted fault category and confidence level of the target query is as follows: Calculate the probability of each fault category, expressed as: ; in, Fault category, For the final retrieval context, For trainable reprogrammable adapters, To freeze the large language model, For trainable classification heads, This is a normalized exponential function used to convert the scores of each fault category output by the classification head into a probability distribution. This is a pooling operation used to aggregate the hidden states of the frozen large language model output to obtain a fixed-dimensional feature representation for fault classification. This is a constructor that provides hints, used to retrieve the final context according to a preset template. The organization provides input prompts for freezing large language models; The fault category with the highest probability is selected as the predicted fault category. The expression is: ; And predict the fault category The corresponding probability is used as the confidence level.

[0015] Preferably, the final traceable diagnostic results output in step 6 include: predicted fault category. Confidence level, adaptive domain weights for the target query The explanatory text and the source identifiers and fusion scores of each source case in the final retrieval context. .

[0016] Preferably, in step 6, the generated constraints include: the predicted fault category output by the trainable classifier head must not be changed, the signal card for the target query or physical facts not appearing in the final retrieval context must not be fabricated, and explicit explanations must be provided in the event of conflicting evidence.

[0017] Therefore, the cross-domain fault diagnosis method enhanced by three-domain retrieval described above, as used in this invention, has the following beneficial effects: (1) The present invention constructs three complementary physical views in the time domain, frequency domain, and time-frequency domain for the source case and the target query respectively. Based on the contrast between local neighbors and the background of the whole database, the reliability of each domain is dynamically estimated and the adaptive weight of the query is calculated. After the domain rank is normalized, the weighted fusion is performed. This enables the adaptive selection of reliable physical evidence under the condition that the target domain is inaccessible, thereby improving the stability of cross-domain retrieval ranking and the robustness of diagnosis.

[0018] (2) The present invention employs fusion The candidate score-weighted label voting and consensus label hard screening yielded the following results: Using historical cases with the same label as the retrieval context, we can structurally exclude evidence of label conflicts and ensure the consistency between the diagnostic results and the historical evidence on which the interpretation is based.

[0019] (3) The present invention adopts a dual-path structure of “numerical waveform path and retrieval evidence path” to preserve the fine-grained dynamics of the original waveform while providing engineering-readable historical evidence, avoiding the tagging overhead of long signal textification and the information loss caused by using only the summary.

[0020] (4) The present invention adopts a prediction-interpretation dual-head structure that freezes the hidden state of the large language model and connects the trainable classification head and the frozen generation head respectively. The trainable classification head outputs the predicted fault category, and the frozen generation head generates the interpretation text only based on the target query signal card and the final retrieval context under the generation constraint. This decouples the discrimination prediction and interpretation generation, makes the diagnosis results stable and traceable back to specific historical cases, and enhances the verifiability.

[0021] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0022] Fig. 1 This is an overall flowchart of a cross-domain fault diagnosis method with enhanced three-domain retrieval according to the present invention; Fig. 2 This is a flowchart of a cross-domain fault diagnosis method with enhanced three-domain retrieval according to the present invention. Detailed Implementation

[0023] The following detailed description of embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0024] Example 1 Please see Figs. 1-2 A cross-domain fault diagnosis method with enhanced three-domain retrieval includes the following steps: Step 1: Obtain labeled time series samples from the source domain. Divide these samples into non-overlapping retrieval memory, training, and validation sets. The retrieval memory set is used to build an offline three-domain knowledge base, the training set is used to optimize the lightweight reprogrammable adapter and trainable classification head, and the validation set is used for early stopping and checkpoint selection. Windowing and normalization preprocessing are then performed on each source case in the retrieval memory set.

[0025] Step 2: Construct a time-domain view, a frequency-domain view, and a time-frequency-domain view for each source case in the preprocessed retrieval memory set. The specific process is as follows: For the i-th source case... Let its time-domain signal be ,in The length of the signal window. The category label for the i-th source case; the time-domain view preserves the original waveform, expressed as: ; The frequency domain view uses the amplitude of the real input Fast Fourier Transform, expressed as: ; The time-frequency domain view uses the short-time Fourier transform amplitude spectrum, expressed as: ; in, Let n be the temporal amplitude of the i-th source case at time sampling point n. Let k be the frequency domain amplitude of the i-th source case at frequency index k. Let j be the time-frequency amplitude value of the i-th source case at local time frame m and frequency index k, where j is the imaginary unit. For time sampling point index, For local time frame indexing, For frequency index, For the length of the window Analysis window, For frame shift, The padding signal used for the centering transform. Frequency domain equivalent to... Where FFT stands for Fast Fourier Transform, rFFT stands for Real-Input Fast Fourier Transform, and "r" indicates that the input is a real-valued signal; only the real-valued signal is retained. There are three non-redundant, non-negative frequency points. The short-time Fourier transform (STFT) amplitude is used in the time-frequency domain. The three views respectively characterize the waveform morphology and the evolution of the impulse, the overall frequency components, and the frequency energy over time.

[0026] Construct a physical domain set based on the time-domain view, frequency-domain view, and time-frequency-domain view. The frozen temporal-based encoder is used to extract the representations of each domain in the physical domain set. The three-domain physical vectors are obtained by projecting the domain-related vectors onto the common retrieval space and normalizing them using the second norm. The specific process is as follows: based on the time-domain view Frequency domain view and time-frequency domain view Construct a set of physical domains Three-domain physical vectors are obtained through multi-domain view vector projection. Specifically, this involves utilizing a frozen timing-based encoder. For the first Views of individual source cases within each domain of the physical domain set. Feature extraction is performed to obtain the domain representation. The expression is: ; in, For the index of the physical domain set, , The dimension of the feature representation of each domain in the physical domain set V before the domain-dependent projection; the dimension of the feature representation of each domain in the physical domain set V. They can be the same or different; for example, for a two-dimensional time-frequency domain view, encoding and pooling can be performed along the time axis and the frequency axis respectively, and the representations of the two axes can be concatenated, so its representation dimension can be different from the representation dimensions of the time domain and the frequency domain. Longitude-related projection P v Mapping to a common d-dimensional retrieval space and performing L2 normalization yields a three-domain physical vector. The expression is: .

[0027] Projection P v Orthogonal linear projection with a fixed seed, principal component projection, random projection, or lightweight projection based on source domain training can be used. The three-domain physical vectors of the source case are calculated and cached once during the offline phase.

[0028] This embodiment adopts The vibration window is used; the frequency domain uses 513 frequency points obtained from the normalized one-sided fast Fourier transform; the short-time Fourier transform uses a 64-point window and a 32-point frame shift to form a 33×33 amplitude map; the time and frequency domains each form a 1,024-dimensional representation, and the time and frequency domains are encoded in a dual-axis manner to form a 2,048-dimensional representation, which is then projected onto... The public retrieval space is frozen, and the temporal-based encoder adopts temporal-based models such as MOMENT.

[0029] Step 3: Extract observable statistics unrelated to category labels from the three physical views to form the signal card for the source case. And through the frozen description generator, the source case signal card Convert to natural language description Source identifier based on each source case Category tags Natural Language Description and its three-domain physical vector Building an offline three-domain knowledge base The specific process is as follows: Observable statistics unrelated to category labels are extracted from the three physical views to form the signal card for the source case. and through the frozen description generator Signal card from the source case Convert to natural language description The expression is: ; The source case's signal card includes root mean square, peak value, kurtosis, number of impulses, dominant frequency, spectral centroid, frequency band energy, time-frequency energy concentration, and dominant frequency trajectory. The natural language description is used to record source information such as source file, operating condition, window position, or database primary key. Neither the natural language description nor the signal card of the source case contains category labels in the generation prompts. The generation prompt is: input the instruction text to the frozen description generator, which guides the description generator to generate a natural language description based on the signal card of the source case. Based on the source identifier of each source case in the retrieval memory set Category tags Natural Language Description and its three-domain physical vector Building an offline three-domain knowledge base The expression is: ; ; in, For the i-th source case, the entry in the offline three-domain knowledge base includes the source identifier. Category tags Natural Language Description and its three-domain physical vector , To retrieve the number of cases in the memory set, the similarity calculation for the target query uses only three-domain physical vectors. Category tags Used only for voting and filtering after retrieval fusion; Natural Language Description It is only appended to the final search context after the case is selected.

[0030] Step 4: Target query for diagnosis Perform the same processing steps as the source case to obtain the target query. Three-domain physical vector ; Calculate the similarity between the target query and each source case in each domain of the physical domain set. ; Calculate the adaptive domain weights of the target query in each domain of the physical domain set. After rank normalization of the similarity scores, the data is weighted and fused to obtain a fusion score for each source case. Specifically, it includes the following steps: S41. Target query for diagnosis Perform the same preprocessing, three-domain transformation, frozen encoding, and projection normalization as the source case to obtain the source identifier of the target query. Target query Category tags Target query signal card Target query Natural Language Description With target query Three-domain physical vector ; S42. Calculate the similarity between the target query and each source case in each domain of the physical domain set. The expression is: ; in, For the index of the physical domain set, For the source case Relative to the target query in each domain of the physical domain set The rank is the result of sorting the similarities in ascending order, and the rank of the most similar source case is . Its value range is ; S43. To determine whether a physical domain has a clear neighborhood structure for the current query, calculate the adaptive domain weight of the target query in each domain of the physical domain set. Specifically, this involves selecting the domains with the highest similarity from the set of physical domains. For each source case, calculate its local nearest neighbor similarity. The expression is: ; in, Indicates the target query The set of similarities between the source cases in the knowledge base and each domain in the physical domain set; This means selecting the value with the highest similarity from the set. Similarity, This indicates calculating the mean. Calculate the reliability of local-global comparison The expression is: ; in, This is a stability constant used to prevent division by zero when the standard deviation is zero. This is a truncation function. This represents the upper limit of the reliability of local-to-global comparisons. This represents the mean similarity across the entire database. Let be the standard deviation of the total database similarity, and let the total database similarity be... The more prominent the local nearest neighbor similarity is relative to the overall database background, the better. The larger the value, the more distinctive the field is to the current query.

[0031] Calculate the adaptive domain weights of the target query in each domain of the physical domain set. The expression is: ; in, To minimize the retention weight, The sum of the weights of each domain is 1, and the weight of each domain is not less than b. The minimum retained weight b prevents any domain in the physical domain set from being completely ignored. Temperature is a parameter used to control the weight distribution. An index for the set of physical domains; S44. To eliminate the influence of the original similarity scales of different domains, the ranking of source case i in each domain of the physical domain set V is obtained by sorting each domain in the physical domain set in descending order of similarity. The rankings are normalized and weighted to obtain the fusion score for each source case. The expression is: .

[0032] In this embodiment, , , , .

[0033] Step 5: Select according to the fusion score from high to low. 10 candidate source cases, construct Top- The initial candidate selection uses the non-negative fusion score of each candidate source case as the voting weight. The categories are voted on, and the category with the most votes is used as the consensus label. The specific steps are as follows: Select according to the fusion score from high to low. 1 candidate source case, construct candidate set The non-negative fusion scores of each candidate source case are used as the voting weights. The categories of each candidate source case are voted on, and the category with the highest vote score is used as the consensus label. The expression is: ; ; in, As a category, The voting score for each candidate source case.

[0034] Based on this consensus label, a hard filter is performed on the offline three-domain knowledge base, retaining only those category labels that match the consensus label (i.e., The source cases were selected and then rearranged by fusion score in the screening results. Individual source cases serve as the final retrieval context. (i.e., Top-) Selected context), where If there are insufficient source cases in the screening results If there are any, then all available source cases are returned without adding conflicting labels. This results in historical evidence that is consistent in labeling, has controlled length, and can be traced back to its source.

[0035] In this embodiment, and .

[0036] Step 6: Input the numerical waveform path and the retrieval evidence path into the frozen large language model in parallel to extract the hidden states of the frozen large language model. The numerical waveform path involves dividing the complete query waveform into slices covering all sampling points, and mapping these slices to the hidden dimensions of the frozen large language model via slice embedding and a trainable / reprogrammable adapter. The retrieval evidence path involves organizing the task description, the natural language description of the target query, and... according to a fixed template. The source case includes the source identifier, category label, and natural language description; the natural language description of the target query does not include the category label, and the task description is used to instruct the frozen large language model to perform the fault diagnosis task and constrain its output format, and does not include the true category label of the current query.

[0037] The hidden states of the frozen large language model are connected to the trainable classification head and the frozen generation head, respectively. The prediction-interpretation dual-head diagnosis uses the trainable classification head to output the predicted fault category and confidence level of the target query based on the pooled hidden states. Specifically, the probability of each fault category is calculated using the following expression: ; in, Fault category, For the final retrieval context, For trainable reprogrammable adapters, To freeze the large language model, For trainable classification heads, This is a normalized exponential function used to convert the scores of each fault category output by the classification head into a probability distribution. This is a pooling operation used to aggregate the hidden states of the frozen large language model output to obtain a fixed-dimensional feature representation for fault classification. This is a constructor that provides hints, used to retrieve the final context according to a preset template. The organization freezes input prompts for the large language model; it uses cross-entropy training on source domain labels and only updates... and The temporal-based encoder, fixed projection, large language model body, and generation head remain frozen.

[0038] The fault category with the highest probability is selected as the predicted fault category. The expression is: ; And predict the fault category The corresponding probability is used as the confidence level.

[0039] The frozen generation head receives the predicted fault category output by the trainable classification head as a fixed decision label, and under generation constraints, generates explanatory text based solely on the signal card of the target query and the final retrieval context; the final output is a traceable diagnostic result.

[0040] The final traceable diagnostic results include: predicted fault category. Confidence level, adaptive domain weights for the target query The explanatory text and the source identifiers and fusion scores of each source case in the final retrieval context. Traceability is the backtracking of input feature summaries and source cases, and is not equivalent to a formal causal proof of the failure mechanism. The feature summary includes the signal card of the target query and the natural language description.

[0041] The generation constraints include: the predicted fault category output by the trainable classifier head must not be changed; the signal card for the target query or physical facts not appearing in the final retrieval context must not be fabricated; and explicit explanations must be provided in the event of conflicting evidence.

[0042] In this embodiment, the frozen large language model can be a local model such as Llama3.

[0043] Example 2 This embodiment provides a specific implementation of a cross-domain fault diagnosis method enhanced by three-domain retrieval, and divides it into three stages: offline database construction, model training, and deployment inference, as detailed below: Offline database construction phase: An offline three-domain knowledge base is built using the source domain retrieval memory set, and the trainable reprogrammable adapter and trainable classification head are optimized using the source domain training set that does not overlap with the retrieval memory set; the source domain validation set is used for early stopping and checkpoint selection.

[0044] Deployment and inference phase: Keep the offline three-domain knowledge base and all frozen model parameters unchanged. Each target query only needs to calculate the three-domain physical vector and signal card once, and then perform retrieval and prediction-interpretation dual-head diagnostics, without requiring target domain gradient updates. When a new verified source case is added, only its three-domain physical vector and natural language description need to be generated and incrementally written to the offline three-domain knowledge base.

[0045] During the model training phase, the following training configuration was used: fixed random seed of 42, AdamW optimizer, and learning rate of 2×10⁻⁶. -4 Weight decay 1×10 -4The batch size is 4, the gradient accumulation is 8, and the training duration is a maximum of 12 epochs and a minimum of 5 epochs. If the validation loss does not improve for 3 consecutive epochs, the training stops early, and the checkpoint with the lowest validation loss is retained. When low reliability, low voting advantage, or low classification confidence occurs, a "manual review required" flag can be output, and candidate cases and fusion scores are retained for manual review.

[0046] This invention can also be implemented as a system comprising a data preprocessing module, a three-domain construction module, an encoding projection module, an offline knowledge base module, a reliability estimation module, a rank fusion module, a voting filtering module, a waveform reprogramming module, a classification module, an interpretation generation module, and a source tracing recording module, and can be deployed on a server, edge computing device, or cloud. The above method is implemented by a processor executing program instructions in memory, and therefore can also be applied to electronic devices, computer-readable storage media, and computer program products.

[0047] Example 3 To verify the cross-domain migration performance of the three-domain retrieval enhanced cross-domain fault diagnosis method (TriRAG) of this invention under different data sources, equipment states, and operating conditions, this embodiment conducted comparative experiments on three publicly available bearing fault datasets: CWRU, SEU, and UORED, and compared the classification accuracy with several existing methods. The experimental results are shown in Table 1: Table 1: Comparison of classification accuracy of the TriRAG method of the present invention and the contrastive method on three sets of cross-domain diagnostic tasks.

[0048] Table 1 lists the classification accuracy of different methods on three cross-domain diagnostic tasks: CWRU, SEU, and UORED, in Chinese tabular form. Under the same source domain independent experimental protocol, TriRAG achieved an average accuracy of 95.60% on 12 directed cross-condition tasks in CWRU, an improvement of 0.97 percentage points compared to Time-LLM's 94.63%; an average accuracy of 67.04% on the two migration directions in SEU, an improvement of 1.17 percentage points compared to TimeRAG's 65.87%; and an average accuracy of 71.00% on the five development-failure stage domain leave-one task in UORED, an improvement of 1.13 percentage points compared to WDCNN's 69.87%. These results demonstrate that the present invention exhibits good average cross-domain migration performance under different data sources, equipment states, and operating condition changes. These results are intended to illustrate the technical effectiveness and do not imply that the method achieves the highest accuracy on every individual migration task.

[0049] Therefore, this invention employs a cross-domain fault diagnosis method enhanced by three-domain retrieval. It constructs three complementary physical views—time domain, frequency domain, and time-frequency domain—for the source case and target query, respectively. Based on the contrast between local nearest neighbors and the entire database background, it dynamically estimates the reliability of each domain, calculates adaptive query weights, and then performs weighted fusion after intra-domain rank normalization. This enables adaptive selection of reliable physical evidence under conditions where the target domain is inaccessible, improving the stability of cross-domain retrieval ranking and diagnostic robustness. Through fusion... The candidate score-weighted label voting and consensus label hard screening yielded the following results: Using historical cases with the same label as the retrieval context, the structure eliminates label conflict evidence, ensuring consistency between the diagnostic results and the historical evidence on which the interpretation is based. Through a dual-path structure of numerical waveform path and retrieval evidence path, the fine-grained dynamics of the original waveform are preserved while providing engineering-readable historical evidence, avoiding the labeling overhead of long signal text and the information loss caused by using only summaries. By freezing the hidden state of the large language model and connecting the trainable classification head and the frozen generation head respectively, the prediction-interpretation dual-head structure is achieved. The trainable classification head outputs the predicted fault category, and the frozen generation head generates the interpretation text only based on the target query signal card and the final retrieval context under the generation constraints. This decouples the discrimination prediction and interpretation generation, making the diagnostic results stable and traceable back to specific historical cases, thus enhancing verifiability.

[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A cross-domain fault diagnosis method with enhanced three-domain retrieval, characterized in that, Includes the following steps: Step 1: Obtain labeled time series samples from the source domain, divide the labeled time series samples from the source domain into non-overlapping retrieval memory set, training set and validation set, and perform windowing and normalization preprocessing on each source case in the retrieval memory set. Step 2: Construct a time-domain view, a frequency-domain view, and a time-frequency-domain view for each source case in the preprocessed retrieval memory set; Construct a physical domain set based on the time-domain view, frequency-domain view, and time-frequency-domain view. The frozen temporal-based encoder is used to extract the representations of each domain in the physical domain set. The three-domain physical vectors are obtained by projecting the domain-related vectors onto the common retrieval space and normalizing them using the second norm. ; Step 3: Extract observable statistics unrelated to category labels from the three physical views to form the signal card for the source case. And through the frozen description generator, the source case signal card Convert to natural language description Source identifier based on each source case Category tags Natural Language Description and its three-domain physical vector Building an offline three-domain knowledge base ; Step 4: Target query for diagnosis Perform the same processing steps as the source case to obtain the target query. Three-domain physical vector ; Calculate the similarity between the target query and each source case in each domain of the physical domain set. ; Calculate the adaptive domain weights of the target query in each domain of the physical domain set. After rank normalization of the similarity scores, the data is weighted and fused to obtain a fusion score for each source case. ; Step 5: Select according to the fusion score from high to low. Each candidate source case is weighted by its non-negative fusion score. The categories are voted on, and the category with the most votes is used as the consensus label. ; Based on the consensus label, a hard screening is performed on the offline three-domain knowledge base, retaining only source cases whose category labels match the consensus label. The selected cases are then rearranged according to their fusion scores. Individual source cases serve as the final retrieval context. ,in If there are insufficient source cases in the screening results If there are a number of available source cases, then all available source cases will be returned. Step 6: Input the frozen large language model in parallel using the numerical waveform path and the retrieval evidence path, extract the hidden states of the frozen large language model, and connect the hidden states of the frozen large language model to the trainable classification head and the frozen generation head respectively. Through the trainable classification head, the predicted fault category and confidence of the target query are output based on the pooled hidden states. The frozen generation head receives the predicted fault category output by the trainable classification head as a fixed decision label, and under the generation constraints, generates explanatory text only based on the signal card of the target query and the final retrieval context; finally, the traceable diagnostic result is output.

2. The cross-domain fault diagnosis method with enhanced three-domain retrieval according to claim 1, characterized in that, The specific process of constructing the time-domain view, frequency-domain view, and time-frequency-domain view in step 2 is as follows: For the i-th source case Let its time-domain signal be ,in The length of the signal window. The category label for the i-th source case; the time-domain view preserves the original waveform, expressed as: ; The frequency domain view uses the amplitude of the real input Fast Fourier Transform, expressed as: ; The time-frequency domain view uses the short-time Fourier transform amplitude spectrum, expressed as: ; in, Let n be the temporal amplitude of the i-th source case at time sampling point n. Let k be the frequency domain amplitude of the i-th source case at frequency index k. Let j be the time-frequency amplitude value of the i-th source case at local time frame m and frequency index k, where j is the imaginary unit. For time sampling point index, For local time frame indexing, For frequency index, For the length of the window Analysis window, For frame shift, The padding signal used for centering transformation.

3. The cross-domain fault diagnosis method with enhanced three-domain retrieval according to claim 2, characterized in that, The three-domain physical vectors are generated in step 2 as follows: based on the temporal view. Frequency domain view and time-frequency domain view Construct a set of physical domains Using a frozen timing-based encoder For the first Views of individual source cases within each domain of the physical domain set. Feature extraction is performed to obtain the domain representation. The expression is: ; in, For the index of the physical domain set, , The dimension representing the features of each domain in the physical domain set V before its domain-related projection; Longitude-related projection P v Mapping to a common d-dimensional retrieval space and performing L2 normalization yields a three-domain physical vector. The expression is: 。 4. The cross-domain fault diagnosis method with enhanced three-domain retrieval according to claim 3, characterized in that, The specific process of constructing the offline three-domain knowledge base in step 3 is as follows: Observable statistics independent of category labels are extracted from the three physical views to form the signal card for the source case. and through the frozen description generator Signal card from the source case Transformed into a natural language description of the source case The expression is: ; Based on the source identifier of each source case in the retrieval memory set Category tags Natural Language Description and its three-domain physical vector Building an offline three-domain knowledge base The expression is: ; ; in, For the i-th source case, the entry in the offline three-domain knowledge base contains the source identifier of the source case. Category tags Natural Language Description and its three-domain physical vector , To retrieve the number of cases in the memory set.

5. The cross-domain fault diagnosis method with enhanced three-domain retrieval according to claim 4, characterized in that, Step 4 specifically includes the following steps: S41. Target query for diagnosis Perform the same preprocessing, three-domain transformation, frozen encoding, and projection normalization as the source case to obtain the source identifier of the target query. Category tags for the target query Target query signal card Natural language description of the target query Three-domain physical vectors of the target query ; S42. Calculate the similarity between the target query and each source case in each domain of the physical domain set. The expression is: ; in, For the index of the physical domain set, For the source case Relative to the target query in each domain of the physical domain set The rank is the result of sorting the similarities in ascending order, and the rank of the most similar source case is . ; S43. Calculate the adaptive domain weight of the target query in each domain of the physical domain set. Specifically: Take the domains with the highest similarity from the physical domain set. For each source case, calculate its local nearest neighbor similarity. The expression is: ; in, Indicates the target query The set of similarities between the source cases in the knowledge base and each domain in the physical domain set; This means selecting the value with the highest similarity from the set. Similarity, This indicates calculating the mean. Calculate the reliability of local-global comparison The expression is: ; in, This is a stability constant used to prevent division by zero when the standard deviation is zero. This is a truncation function. This represents the upper limit of the reliability of local-to-global comparisons. This represents the mean similarity across the entire database. Let be the standard deviation of the total database similarity, and let the total database similarity be... ; Calculate the adaptive domain weights of the target query in each domain of the physical domain set. The expression is: ; in, To minimize the retention weight, The sum of the weights of each domain is 1, and the weight of each domain is not less than b. For temperature parameters, An index for the set of physical domains; S44. Obtain the ranking of source case i in each domain of physical domain set V by sorting each domain in the physical domain set in descending order of similarity. The rankings are normalized and weighted to obtain the fusion score for each source case. The expression is: 。 6. The cross-domain fault diagnosis method with enhanced three-domain retrieval according to claim 5, characterized in that, In step 5, obtain the consensus label. The specific steps are as follows: Select according to the fusion score from high to low. 1 candidate source case, construct candidate set The non-negative fusion scores of each candidate source case are used as the voting weights. The categories of each candidate source case are voted on, and the category with the highest vote score is used as the consensus label. The expression is: ; ; in, As a category, The voting score for each candidate source case.

7. The cross-domain fault diagnosis method with enhanced three-domain retrieval according to claim 6, characterized in that: In step 6, the numerical waveform path is as follows: the complete query waveform is divided into slices covering all sampling points, and mapped to the hidden dimensions of the frozen large language model via slice embedding and a trainable / reprogrammable adapter; the retrieval evidence path is as follows: the task description, the natural language description of the target query, and... are organized according to a fixed template. The source case includes the source identifier, category label, and natural language description; the natural language description of the target query does not include the category label, and the task description is used to instruct the frozen large language model to perform the fault diagnosis task and constrain its output format, and does not include the true category label of the current query.

8. The cross-domain fault diagnosis method with enhanced three-domain retrieval according to claim 7, characterized in that: In step 6, the specific process for obtaining the predicted fault category and confidence level for the target query is as follows: Calculate the probability of each fault category, expressed as: ; in, Fault category, For the final retrieval context, For trainable reprogrammable adapters, To freeze the large language model, For trainable classification heads, This is a normalized exponential function used to convert the scores of each fault category output by the classification head into a probability distribution. This is a pooling operation used to aggregate the hidden states of the frozen large language model output to obtain a fixed-dimensional feature representation for fault classification. This is a constructor that provides hints, used to retrieve the final context according to a preset template. The organization provides input prompts for freezing large language models; The fault category with the highest probability is selected as the predicted fault category. The expression is: ; And predict the fault category The corresponding probability is used as the confidence level.

9. The cross-domain fault diagnosis method with enhanced three-domain retrieval according to claim 8, characterized in that, The final traceable diagnostic results output in step 6 include: predicted fault category. Confidence level, adaptive domain weights for the target query The explanatory text and the source identifiers and fusion scores of each source case in the final retrieval context. .

10. The cross-domain fault diagnosis method with enhanced three-domain retrieval according to claim 9, characterized in that: In step 6, the constraints include: the predicted fault category output by the trainable classifier head must not be changed, the signal card for the target query or physical facts not appearing in the final retrieval context must not be fabricated, and explicit explanations must be provided in the event of conflicting evidence.