Physical guiding single-classification anomaly detection method for rotating components of railway vehicles under variable operating conditions
By combining angular domain regularization and block reconstruction Transformer with a controlled residual fusion mechanism of adaptive differentiable physical evidence branch, the problems of inconsistent feature scales and insufficient weak anomaly recognition in the anomaly detection of rotating parts of rail vehicles under varying working conditions are solved, achieving high-precision and stable anomaly detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING UNIV OF CIVIL ENG & ARCHITECTURE
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-21
AI Technical Summary
Under varying operating conditions, existing methods for detecting anomalies in rotating components of rail vehicles suffer from problems such as inconsistent feature scales, insufficient weak anomaly recognition capabilities, and a lack of physical interpretability of detection results. These methods struggle to achieve high-precision and stable anomaly detection under complex operating conditions.
Vibration signals are uniformly mapped to a consistent angular domain scale through angular domain normalization. A block reconstruction Transformer is used to learn local segments and construct an adaptive differentiable physical evidence branch. Anomaly detection is then performed by combining this with a controlled residual fusion mechanism.
It achieves high-precision, stable, and interpretable anomaly detection of rotating components of rail vehicles under varying operating conditions, improves the sensitivity to local weak anomalies and boundary anomalies, and enhances the physical interpretability of the detection results.
Smart Images

Figure CN122432899A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rail transit equipment condition monitoring technology, and in particular to a method for detecting single-class anomalies in the physical guidance of rotating components of rail vehicles under varying operating conditions. Background Technology
[0002] In rail transit systems, critical rotating components such as bogie bearings and wheelsets operate in complex environments for extended periods. Their vibration signals are affected by multiple factors, including speed fluctuations, track excitation, and structural transmission paths, exhibiting significant non-stationary characteristics. In actual operation and maintenance, most rotating machinery fault diagnosis methods rely on sufficient fault samples and clear category labels, using supervised learning models to achieve state classification. However, in the actual operation of rail vehicles, acquiring abnormal samples is costly and lacks complete type coverage, making it difficult to effectively apply multi-class modeling methods. Furthermore, while some single-class anomaly detection methods rely solely on normal sample modeling, they typically rely on statistical distance, boundary descriptions, or reconstruction errors for discrimination, failing to adequately utilize physically meaningful anomalous features in vibration signals such as impact, modulation, and resonance, making it difficult to balance detection accuracy and result interpretability.
[0003] On the other hand, under varying operating conditions, signal segments of the same time length often correspond to different turning angle ranges. Directly modeling in the time domain can easily lead to inconsistent feature representations, affecting the model's learning stability of normal patterns. Furthermore, existing deep learning-based anomaly detection methods mostly focus on overall reconstruction or global distribution modeling, lacking sufficient sensitivity to local weak anomalies and boundary anomalies, making them prone to missed detections. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a physical-guided single-class anomaly detection method for rotating components of rail vehicles under varying operating conditions, which solves the problems of inconsistent feature scales, insufficient weak anomaly recognition ability, and lack of physical interpretability of detection results in anomaly detection of rotating components of rail vehicles when relying solely on normal samples under varying operating conditions.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for detecting single-class anomalies in the physical guidance of rotating components of a rail vehicle under varying working conditions, which includes: acquiring vibration signals of key rotating components of a rail vehicle, and combining rotation frequency information to perform angular domain normalization on the vibration signals to obtain vibration signal samples under a unified angular domain scale.
[0008] The vibration signal samples are divided into blocks to form a patch sequence, which is then input into the block reconstruction Transformer to obtain the reconstruction error of each patch and form a sample-level baseline anomaly score.
[0009] Based on the vibration signal samples, an adaptive differentiable physical evidence branch is constructed to extract physical evidence from cyclic modulation, subband envelope kurtosis and ringing response. The sample-level benchmark anomaly score and the physical evidence are fused with controlled residuals to obtain a fused anomaly score.
[0010] Transformer model training is divided into two stages. The first stage establishes a normal state reference distribution based on normal samples. The second stage freezes the block reconstruction of Transformer, introduces pseudo outlier exposure, and performs abnormal boundary learning and detection score calibration. Abnormal state discrimination is performed based on the fusion of abnormal scores and thresholds.
[0011] As a preferred embodiment of the physical guidance single-classification anomaly detection method for rotating components of rail vehicles under varying working conditions described in this invention, the step of combining rotation frequency information to perform angular domain normalization on the vibration signal includes: determining the effective time length of the vibration signal based on the preset number of rotation cycles and the corresponding rotation frequency; extracting a signal segment of the corresponding length from the original vibration signal; and interpolating and resampling the signal segment to map it into a fixed-length angular domain representation.
[0012] As a preferred embodiment of the physical guidance single-classification anomaly detection method for rotating components of rail vehicles under varying working conditions described in this invention, the method for obtaining the reconstruction error of each patch includes: dividing the normalized vibration signal into blocks according to a sliding window to obtain a patch sequence, and then inputting the resulting tokens into a Transformer encoder after linear mapping; using the encoder to learn the temporal dependencies between local segments; and recovering each patch through a reconstruction head; and using the degree of deviation between each patch and the corresponding reconstruction result as the reconstruction error of each patch.
[0013] As a preferred embodiment of the physical guidance single-class anomaly detection method for rotating components of rail vehicles under varying working conditions described in this invention, the step of forming a sample-level benchmark anomaly score includes: sorting the reconstruction errors of each patch, selecting the top k patches with the largest reconstruction errors, and aggregating the reconstruction errors of the top k patches to obtain the sample-level benchmark anomaly score.
[0014] As a preferred embodiment of the physical guidance single-class anomaly detection method for rotating components of rail vehicles under varying operating conditions described in this invention, the adaptive differentiable physical evidence branch includes cyclic modulation evidence, subband envelope kurtosis evidence, and ringing response evidence.
[0015] By performing modulation spectrum analysis along the time axis on the short-time Fourier power plot of the vibration signal sample, and then performing soft pooling after removing the DC component and normalizing, evidence of cyclic modulation is obtained.
[0016] By dividing the vibration signal sample into sub-bands in the frequency domain, reconstructing the time-domain components of each sub-band and extracting the envelope information, the corresponding envelope kurtosis is calculated based on the envelope information; after introducing sub-band recalibration, the envelope kurtosis of each sub-band is soft-pooled to obtain sub-band envelope kurtosis evidence.
[0017] By generating a damped sine kernel and performing a one-dimensional matched convolution with the vibration signal sample, the peak response is RMS normalized and then soft-pooled to obtain evidence of the ringing response.
[0018] As a preferred embodiment of the physical guidance single-class anomaly detection method for rotating components of rail vehicles under varying operating conditions described in this invention, the controlled residual fusion includes: standardizing and sparsely triggering the physical evidence to obtain valid physical evidence; inputting the sample-level benchmark anomaly score and the valid physical evidence into a gating network to adaptively learn the weights of different evidence components; introducing a boundary activation mechanism to apply physical enhancement to samples close to the decision boundary; generating a fusion residual based on the boundary activation mechanism, the weights of different evidence components, and the valid physical evidence; and superimposing the fusion residual onto the sample-level benchmark anomaly score to obtain a fusion anomaly score.
[0019] As a preferred embodiment of the physical guidance single-class anomaly detection method for rotating components of rail vehicles under varying working conditions described in this invention, the step of establishing a normal state reference distribution based on normal samples includes training only the block reconstruction Transformer, enabling the block reconstruction Transformer to learn stable reconstruction rules on the normal sample distribution, establishing a normal state reference distribution, and providing sample-level benchmark anomaly scores for subsequent physical enhancement and boundary learning.
[0020] The introduction of pseudo-outlier exposure includes a second-stage frozen block reconstruction Transformer, constructing pseudo-anomalies based on normal samples to provide boundary learning signals; the construction of pseudo-anomalies includes applying perturbations to normal samples, the perturbations being selected from one or more of shock-ringing, narrowband amplitude modulation, mixed perturbations, low-frequency drift, local random missing data, and saturation pruning, and scaling the amplitude according to the standard deviation of the original samples, so that the pseudo-anomalies maintain a reasonable amplitude scale and form structural deviations based on the normal signals; after the second stage is completed, the fused anomaly score is compared with a threshold, and when the fused anomaly score exceeds the threshold, it is determined to be an abnormal state, otherwise it is determined to be a normal state.
[0021] Secondly, the present invention provides a physical guidance single-classification anomaly detection system for rotating components of rail vehicles under variable working conditions, including: an angular domain normalization module, used to acquire vibration signals of key rotating components of rail vehicles, and combine rotation frequency information to perform angular domain normalization on the vibration signals to obtain vibration signal samples under a unified angular domain scale;
[0022] The block reconstruction processing module is used to divide the vibration signal samples into blocks to form a patch sequence, and input it into the block reconstruction Transformer to obtain the reconstruction error of each patch and form a sample-level benchmark anomaly score.
[0023] The physical evidence extraction module is used to construct an adaptive differentiable physical evidence branch based on vibration signal samples, and extract physical evidence from cyclic modulation, subband envelope kurtosis and ringing response.
[0024] The controlled residual fusion module is used to fuse sample-level benchmark anomaly scores with physical evidence using controlled residuals to obtain fused anomaly scores.
[0025] The training and anomaly construction module is used to perform two-stage training. In the first stage, a normal state reference distribution is established based on normal samples. In the second stage, the Transformer is frozen and reconstructed in blocks and pseudo outlier exposure is introduced. Pseudo-anomalies are constructed by perturbating normal samples to learn anomaly boundaries and calibrate detection scores.
[0026] The anomaly detection module compares the fusion anomaly score with a threshold. When the fusion anomaly score exceeds the threshold, it is determined to be an abnormal state; otherwise, it is determined to be a normal state.
[0027] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the physical guidance single-classification anomaly detection method for rotating components of rail vehicles under varying working conditions as described in the first aspect of the present invention.
[0028] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the physical guidance single-classification anomaly detection method for rotating components of rail vehicles under varying operating conditions as described in the first aspect of the present invention.
[0029] The beneficial effects of this invention are as follows: By introducing angular domain normalization, vibration signals under different rotational speeds are uniformly mapped to a consistent angular domain scale, ensuring that local segments of each sample maintain a physical correspondence, reducing feature drift caused by varying operating conditions from the source, and improving the stability of subsequent modeling. Based on this, a block-based reconstruction Transformer is used to slide-block the angular domain signal and learn the dependencies between segments. By aggregating reconstruction errors to form a baseline anomaly score, effective characterization of local weak anomalies is achieved, avoiding anomaly dilution caused by overall averaging. Simultaneously, by constructing an adaptive differentiable physical evidence branch, physical evidence is extracted from three dimensions: modulation structure, impact characteristics, and resonance response. Combined with specific operations such as sub-band division, envelope kurtosis calculation, and matched convolution, the anomaly discrimination results have a clear mechanistic basis. Furthermore, by introducing a controlled residual fusion mechanism, the baseline anomaly score is enhanced only when approaching the discrimination boundary, suppressing score drift of normal samples and improving the separability between boundary samples and weak anomalies. Thus, under the condition of training only with normal samples, anomaly detection performance with high accuracy, stability, and interpretability under complex operating conditions is achieved. Attached Figure Description
[0030] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a flowchart of a single-classification anomaly detection method for the physical guidance of rotating components of a rail vehicle under varying operating conditions.
[0032] Figure 2 This is an overall flowchart of the anomaly detection method based on physical guidance for reconstructing Transformer.
[0033] Figure 3 An adaptive differentiable physical evidence branch structure diagram for an anomaly detection method based on physical guidance to reconstruct Transformer.
[0034] Figure 4 This is a structural diagram of the security residual fusion module for an anomaly detection method based on physical guidance for reconstructing Transformer.
[0035] Figure 5 The diagram shows the experimental platform of the BJTU-RAO bogie drive system, which is based on the anomaly detection method of physically guided Transformer reconstruction.
[0036] Figure 6This is a comparison of the accuracy and F1 score of different methods for various fault types in scenario 1 of the BJTU-RAO dataset, which is a physical-guided Transformer anomaly detection method.
[0037] Figure 7 This paper presents a fusion of anomaly score ranking distribution diagrams under normal and different fault states for an anomaly detection method based on physical guidance for reconstructing Transformer.
[0038] Figure 8 Heatmaps showing the accuracy and F1 score of different methods for anomaly detection based on physically guided Transformer reconstruction in scenario 2 of the BJTU-RAO dataset.
[0039] Figure 9 A comparison chart of overall performance and gain for each category before and after the second stage is introduced for the anomaly detection method based on physical guidance to reconstruct Transformer.
[0040] Figure 10 To introduce the abnormality score distribution diagrams of the front and rear normal samples, rolling elements, and cage samples in the second stage of the anomaly detection method based on physical guidance for Transformer reconstruction, we introduce the following:
[0041] Figure 11 This is a graph showing the average contribution of three types of physical evidence items under different categories for anomaly detection methods based on physical guidance for reconstructing Transformers.
[0042] Figure 12 The local response and two-stage score evolution diagram of a typical boundary sample for an anomaly detection method based on physical-guided reconstruction of Transformer.
[0043] Figure 13 This diagram shows the field data acquisition platform for a metro train bogie system, which is based on a physical-guided Transformer anomaly detection method.
[0044] Figure 14 This is a comparison of the accuracy and F1 score of different methods for anomaly detection based on physically guided Transformer reconstruction on the subway train dataset.
[0045] Figure 15 This is a comparison of anomaly recall rates for different methods on the subway train dataset, based on a physical-guided Transformer reconstruction anomaly detection method. Detailed Implementation
[0046] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0047] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0048] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0049] Example 1, refer to Figures 1-4 As one embodiment of the present invention, this embodiment provides a method for detecting single-class anomalies in the physical guidance of rotating components of rail vehicles under varying operating conditions, including the following steps:
[0050] like Figure 2 The diagram illustrates a physical guidance framework for single-class anomaly detection of rotating components under varying operating conditions, namely a kinematic angle domain warping and physical residual fusion framework. This framework first warps the original vibration signals under different rotational speeds to a unified angle domain using a kinematic angle domain warping module, reducing modeling bias caused by inconsistencies in the physical scale of local segments. Then, a block-based reconstruction Transformer learns the local structure of normal samples and their cross-segment dependencies, outputting a sample-level baseline anomaly score. Based on this, an adaptive differentiable physical evidence branch extracts differentiable physical evidence from three complementary angles: cyclic modulation, subband envelope kurtosis, and ringing response. A safety residual fusion module then uses this evidence to correct the baseline anomaly score using monotonically controlled residuals. Finally, a two-stage training and novel anomaly enhancement construction strategy are combined to complete boundary learning dependent solely on normal samples, and discrimination calibration is achieved through quantile thresholding. This framework aims to maintain the stability of normal sample scores while improving sensitivity and physical interpretability for weak anomalies and boundary samples.
[0051] S1: Obtain vibration signals of key rotating components of the rail vehicle, and perform angular domain normalization on the vibration signals in combination with rotation frequency information to obtain vibration signal samples under a unified angular domain scale.
[0052] Under varying operating conditions, time-domain segments of the same length do not correspond to fixed rotation ranges. If the time-domain is directly divided into blocks, it will be difficult to maintain consistent physical meaning for local segments in different samples. Therefore, Angular Domain Normalization (KODA) is introduced before the main detection process. Let the original vibration signal be... The corresponding frequency conversion is The preset number of rotation cycles to be captured is The effective time length of the sample is:
[0053]
[0054] Extract a length of [length] from the original signal. The segment, denoted as Then, through interpolation and resampling, it is mapped to a fixed length. Angular domain normalized vibration signal The formula is expressed as:
[0055]
[0056] in, This represents the interpolation resampling operator. After this processing, input samples from different speeds and operating conditions can enter subsequent processing at a unified angular domain scale, thereby establishing a unified reference benchmark.
[0057] In this embodiment, the vibration signal after angular domain normalization is segmented to extract local structural information. Specifically, the vibration signal sample is divided into multiple local segments by a sliding window according to a preset length and step size, and each local segment is defined as a patch. The patch is used to characterize the variation features of the vibration signal within a local time range, enabling the model to simultaneously capture signal patterns where local anomalies and overall normality coexist. By representing the vibration signal at the patch level, it helps to avoid the dilution of weak anomalous features when directly modeling the overall signal, thereby improving the sensitivity to local anomalies.
[0058] After obtaining the patch sequence, each patch is linearly mapped to a fixed-dimensional vector representation, defined as a token. This token serves as the input unit of the Transformer encoder, representing the feature information of the corresponding patch. By mapping patches to tokens, the original vibration signal can be transformed into a representation suitable for sequence modeling, enabling the Transformer to model the dependencies between different patches and thus learn the local structure of the vibration signal and its cross-segment correlation features.
[0059] S2: The vibration signal sample is divided into blocks to form a patch sequence, and the block reconstruction Transformer is input to obtain the reconstruction error of each patch and form a sample-level benchmark anomaly score.
[0060] Compared to point-level modeling, block representation is more suitable for describing signal features where local anomalies coexist with overall normality in rotating components. Inspired by the block reconstruction approach, it is combined with a single-class anomaly detection task. This is applied to the normalized angular domain signal. According to length Step size is The input signal is divided into blocks using a sliding window to obtain a patch sequence, which is then linearly mapped to form tokens before being input into the Transformer encoder. The encoder learns the temporal dependencies between local segments, while the reconstruction head reconstructs each patch to characterize the deviation of the input signal from the normal pattern. The reconstruction error of a patch is defined as follows:
[0061]
[0062] Since only normal samples are used during the training phase, the model learns stable local structures and their combinations under normal conditions. When anomalous shocks, ringing, or modulation structures exist in the samples, the reconstruction error of the corresponding patches will increase significantly. Considering that weak anomalies usually only appear in a few local regions, Top-k aggregation is used to define a sample-level baseline anomaly score. :
[0063]
[0064] in, The first one with the largest reconstruction error A set of indexes for each patch; This indicates the number of patches selected. This score preserves local anomaly responses while avoiding global averaging that dilutes weak anomaly features.
[0065] S3: Based on the vibration signal samples, construct an adaptive differentiable physical evidence branch, extract physical evidence from cyclic modulation, subband envelope kurtosis and ringing response, and fuse the sample-level benchmark anomaly score and physical evidence with controlled residuals to obtain a fused anomaly score.
[0066] The baseline anomaly score primarily reflects the reconstruction deviation of the input signal relative to the normal pattern, but its representation of local transient, modulation, and resonance anomalies remains limited. Therefore, an Adaptive Differentiable Physical Evidence (A-DPE) branch is introduced to supplement the baseline score with physical evidence possessing clear mechanistic meaning. Unlike offline computation and fixed-parameter handcrafted features, this branch embeds the physical evidence extraction process into the model as a learnable differentiable module and performs adaptive optimization through backpropagation in the second stage. The structure of the A-DPE branch is as follows: Figure 3 As shown.
[0067] Its output is represented as:
[0068]
[0069] in, , and These represent cyclic modulation evidence, subband envelope kurtosis evidence, and ringing response evidence, respectively.
[0070] Cyclic modulation evidence is obtained by performing modulation spectrum analysis along the time axis on the short-time Fourier power plot of the input signal, and is used to characterize the time-frequency energy modulation structure caused by periodic impulses. Let... For the short-time Fourier transform of the input signal, Given the time-frequency energy distribution, the cyclic modulation response can be expressed as:
[0071]
[0072] in, This represents the cyclic modulation response function, used to characterize the modulation intensity of the input signal at different modulation frequencies; This represents the modulation frequency variable, used to describe the modulation component of periodic impulses in the frequency domain; This represents the time-frequency energy distribution of the input signal. Represents a time variable. Represents frequency variables; Indicates a time index; This represents the complex exponential modulation term, used to map time-frequency energy to the corresponding modulation frequency component. Represents the imaginary unit;
[0073] After removing the DC component and normalizing the response, adaptive aggregation of the modulation response is performed using soft pooling to obtain evidence of cyclic modulation. .
[0074] The sub-band envelope kurtosis evidence first divides the input signal into sub-bands in the frequency domain, then reconstructs the time-domain components of each sub-band and extracts the Hilbert envelope, calculating the corresponding envelope kurtosis to highlight the impulsive and non-Gaussian characteristics of the impulse response. Let the th... The envelope signal of each sub-band is Its kurtosis is defined as:
[0075]
[0076] in, Indicates the first The envelope kurtosis corresponding to each subband is used to characterize the impulse characteristics of the subband signal; Indicates a sub-band index; This indicates the expectation operation, used to perform statistical averaging on the quantities within the dialogue box; Indicates the first The envelope signal of each sub-band; Indicates the first The mean of the envelope signal of each individual; This represents the envelope signal after removing the mean; Indicates the first The standard deviation of the envelope signal of each individual; Indicates the first The variance of the envelope signal of each individual; This represents the nonnegative stability constant. Based on this, learnable subband recalibration is introduced, and evidence for subband envelope kurtosis is obtained through soft pooling aggregation. .
[0077] The ringing response evidence is designed to address narrowband damped oscillations commonly seen after fault impacts. A set of damped sine kernels is adaptively generated using a learnable center frequency and damping coefficient, and then one-dimensionally matched convolved with the input signal to characterize local resonant damping modes. Each ringing core is defined as:
[0078]
[0079] in, and They represent the first The center frequency and damping coefficient of each ringing core; Indicates the first Each ringing core in time The response function at the location; Indicates the first One ringing kernel function; The index representing the ringing core; Represents a time variable; This represents the exponential decay term, used to describe the decay characteristics of the ringing signal over time.
[0080] After convolution matching the ringing kernel with the input signal, the peak response is RMS normalized, and ringing response evidence is obtained through soft pooling aggregation. .
[0081] The three types of evidence mentioned above correspond to periodic modulation, shock pulse, and local resonance attenuation structures, respectively. They can supplement the abnormal information that is difficult to fully express from the perspective of different mechanisms, and achieve adaptive adjustment of the evidence response through learnable parameters and differentiable extraction process, thereby providing physically meaningful evidence support for subsequent abnormal score enhancement.
[0082] To avoid the unconditional aggregation of physical evidence leading to an overall increase in the scores of normal samples and introducing additional false positives, a controlled residual fusion module, SAFE-RF, based on the baseline outlier scores, was designed. The structure of the SAFE-RF module is as follows: As shown, the physical evidence is first standardized based on the running statistics of normal samples, and only valid responses significantly higher than the normal background are retained through a sparse triggering function. Then, the baseline anomaly score and the triggered physical evidence are jointly input into a gating network to adaptively learn the weights of different evidence components. At the same time, a boundary activation mechanism is introduced so that physical enhancement mainly acts on samples close to the decision boundary.
[0083] The fused residual can be written as:
[0084]
[0085] in, Indicates the anomaly score based on the baseline. Boundary activation function, Indicates the gating weight, This represents valid physical evidence after standardization and sparse triggering. This represents the fusion residual, used to correct for the baseline outlier score at the sample level; Represents the boundary activation function; Indicates the baseline abnormality score; An index representing a component of physical evidence.
[0086] Final fusion anomaly score Defined as:
[0087]
[0088] in, is the non-negative residual strength coefficient. Because the residual term is always non-negative, SAFE-RF provides a monotonic and controlled enhancement to the baseline outlier score, rather than directly replacing the baseline discrimination result. This module constrains physical evidence to a complementary correction that only works near the boundaries, thereby improving sensitivity to boundary samples and weak outliers while maintaining the stability of scores for normal samples.
[0089] S4: Transformer model training is divided into two stages. The first stage establishes a normal state reference distribution based on normal samples. The second stage freezes the block reconstruction of Transformer, introduces pseudo outlier exposure, and performs abnormal boundary learning and detection score calibration. Abnormal state discrimination is performed based on the fusion of abnormal scores and thresholds.
[0090] In a single-class anomaly detection setting, the training objectives of the block reconstruction Transformer and the physical augmentation branch are not consistent. The former needs to learn stable reconstruction patterns on the normal sample distribution, while the latter needs to augment boundary samples using physical evidence without compromising the stability of this scoring. If joint optimization is performed directly in the early stages of training, the physical residuals may prematurely interfere with the modeling of normal patterns. Therefore, a two-stage training strategy is adopted.
[0091] The first stage only trains the block-based reconstruction Transformer, and its goal is:
[0092]
[0093] in, Indicates the number of patches; This represents the loss function of the block reconstruction Transformer in the first stage, used to measure the difference between the reconstructed structure and the original input; Indicates the patch index; Indicates the first The reconstruction result of each patch; Indicates the first The original input of each patch.
[0094] This stage is only used to establish a stable normal reference distribution, while the sample-level benchmark outlier scores are still obtained from the Top-k aggregation in the inference stage, thus providing a reliable foundation for subsequent physical augmentation and boundary learning.
[0095] The second stage freezes the block-based Transformer reconstruction, optimizing only A-DPE, SAFE-RF, and related gating parameters. Since the training set does not contain real fault samples, a pseudo-outlier exposure (NAC-OE) mechanism is further introduced to construct pseudo-anomalies based on normal samples, providing boundary learning signals. Perturbation mechanisms include impact-ringing, narrowband amplitude modulation, mixed perturbations, low-frequency drift, local random dropout, and saturation pruning, with amplitude scaling based on the original sample standard deviation to ensure that the constructed samples originate from normal signals and maintain a reasonable amplitude scale, while also possessing learnable structural deviations. The purpose of NAC-OE is to provide learnable boundary signals for the second stage. Compared to arbitrary random perturbations deviating from real operating conditions, this structured construction method based on normal samples more closely approximates the anomaly patterns in engineering signals, thus helping the physical branch and fusion module learn more reasonable anomaly side boundaries.
[0096] The total loss in the second stage is defined as:
[0097]
[0098] in, Used to learn the boundary between normal samples and pseudo-abnormal samples. Used to limit the fusion score from deviating from the benchmark score. Used to suppress unwanted physical activation; This represents the total loss function for the second stage of training, used to comprehensively constrain the optimization objective of the model during the boundary learning and fusion process; This represents the weighting coefficient corresponding to the alignment loss, used to adjust the strength of the alignment constraint in the total loss; This represents the weighting coefficient corresponding to the gating loss, used to adjust the strength of the gating constraint in the total loss.
[0099] During the inference phase, the model first outputs a baseline anomaly score, which is then fused into a fusion anomaly score using A-DPE and SAFE-RF. The final threshold is quantized based on the normal sample scores in the validation set according to a preset false alarm rate. An anomaly is determined when the fusion score exceeds the threshold; otherwise, it is considered normal. Thus, the two-stage training, while stabilizing the normal pattern modeling, constrains physical augmentation and boundary learning in subsequent stages, enabling the proposed framework to possess scoring stability, boundary sensitivity, and physical interpretability under varying operating conditions.
[0100] This embodiment also provides a single-class anomaly detection system for the physical guidance of rotating components of rail vehicles under varying operating conditions, including:
[0101] The angular domain normalization module is used to acquire vibration signals of key rotating components of rail vehicles and perform angular domain normalization on the vibration signals in combination with rotation frequency information to obtain vibration signal samples under a unified angular domain scale.
[0102] The block reconstruction processing module is used to divide the vibration signal samples into blocks to form a patch sequence, and input the block reconstruction Transformer to obtain the reconstruction error of each patch and form a sample-level benchmark anomaly score.
[0103] The physical evidence extraction module is used to construct adaptive differentiable physical evidence branches based on vibration signal samples, and extract physical evidence from cyclic modulation, subband envelope kurtosis and ringing response.
[0104] The controlled residual fusion module is used to fuse sample-level benchmark anomaly scores with physical evidence using controlled residuals to obtain fused anomaly scores.
[0105] The training and anomaly construction module is used to perform two-stage training. In the first stage, a normal state reference distribution is established based on normal samples. In the second stage, the Transformer is frozen and reconstructed in blocks, and pseudo-outlier exposure is introduced. Pseudo-anomalies are constructed by perturbating normal samples to learn anomaly boundaries and calibrate detection scores.
[0106] The anomaly detection module compares the fusion anomaly score with a threshold. When the fusion anomaly score exceeds the threshold, it is determined to be an abnormal state; otherwise, it is determined to be a normal state.
[0107] Example 2, refer to Figures 5-12 As an embodiment of the present invention, a single-class anomaly detection method for physical guidance of rotating components of rail vehicles under variable working conditions is provided. In order to verify the beneficial effects of the present invention, a simulation experiment is conducted for scientific demonstration.
[0108] BJTU-RAO is the bogie dataset from Beijing Jiaotong University, and it is the world's first publicly available dataset for simulating faults in the transmission system of rail transit train bogies. The vibration signal from the left axle box was selected for analysis. The axle box bearing model is HRB352213, and the sampling frequency is 64kHz. Figure 5 This is a diagram of the BJTU-RAO test bench. Based on the BJTU-RAO's operating condition settings, three speed conditions—20Hz, 40Hz, and 60Hz—can be obtained under no lateral load. Based on this, two cross-condition anomaly detection scenarios are constructed: Scenario 1 involves 40Hz training and 60Hz testing, and Scenario 2 involves 40Hz training and 20Hz testing. During the training phase, only healthy samples under the 40Hz condition are used; during testing, healthy and faulty samples under the corresponding operating conditions are used for evaluation. The sample categories and classification methods used in the training and testing phases are as follows: As shown.
[0109] surface BJTU-RAO Dataset Training and Test Set Sample Classification Table
[0110] train normal samples test Inner ring failure, outer ring failure, rolling element failure, and cage failure
[0111] On the BJTU-RAO dataset, the average accuracy and average F1 score of each method under scenario 1 are listed below. and The corresponding results under scenario 2 are listed below. and To verify the effectiveness of the proposed method, comparison models were selected including 1D-ConvAE, OCSVM, iForest, DeepSVDD, and KDE. Typical methods such as LSTM-AE and VAE are used. These methods cover different categories, including reconstruction error modeling, boundary description, density estimation, isolation mechanisms, and temporal representation, and can comprehensively verify the anomaly detection performance of the proposed method from multiple perspectives. The experimental results of Scenario 1 are visualized as follows: Figure 5The figure shows a comparison of the average accuracy and average F1 score of different methods. The two bar charts show the classification accuracy and classification F1 score of each method for the four anomaly classes, while the line charts correspond to the overall accuracy and overall F1 score on the entire test set. For ease of visualization, the complexity curve is plotted using a non-linear scale. From the results, we can conclude that:
[0112] 1) In terms of accuracy, the proposed method exhibits the best anomaly detection capability. Under cross-condition conditions, its overall accuracy reaches 94.72%, and the detection accuracy for all four types of anomalies remains at the highest level. In contrast, other models show lower overall accuracy than the proposed method under cross-condition migration due to changes in the distribution of normal patterns and anomaly features.
[0113] 2) The proposed method also achieved the best F1 score. This indicates that the proposed method can more effectively balance the recall of anomalous samples while ensuring detection accuracy. In contrast, other models have lower F1 scores for some anomaly types, indicating that their detection stability is still insufficient in cross-condition scenarios.
[0114] surface Accuracy Comparison Table of Different Methods in Scenario 1 of BJTU-RAO Dataset
[0115]
[0116] surface Comparison table of F1 scores for different methods in scenario 1 of the BJTU-RAO dataset.
[0117]
[0118] surface Accuracy Comparison Table of Different Methods in Scenario 2 of BJTU-RAO Dataset
[0119]
[0120] Table 5. Comparison of F1 scores for different methods in Scenario 2 of the BJTU-RAO dataset.
[0121]
[0122] Figure 7The results show the fused anomaly score ranking of normal and various abnormal states. It can be seen that the score curves for all four types of abnormal samples are generally above those for normal samples, indicating that the model output can effectively reflect the difference in the degree of abnormality between the fault state and the normal state. For outer race and rolling element faults, the interval between their score curves and the normal state is larger, and the separation effect is more obvious; for inner race and cage faults, the overall distribution shows a clear upward trend. These results demonstrate that the proposed method still has good state characterization ability under varying operating conditions and can effectively distinguish between normal states and multiple types of fault states.
[0123] Next, a heatmap will be drawn to visually analyze the detection results of different methods in terms of accuracy and F1 score under scenario 2, such as... Figure 8 As shown in the figure, considering the more significant differences across operating conditions in scenario 2, this figure can more clearly reflect the performance distribution of each method under difficult migration conditions. The color intensity reflects the corresponding performance value, with darker colors indicating better detection performance. The figure shows that the proposed method performs best in scenario 2 in both overall and sub-categorical metrics, indicating that it has more stable and superior anomaly detection capabilities under cross-operating conditions.
[0124] To verify the effectiveness of the second stage, an ablation control experiment was set up. Considering that the cross-condition transfer in scenario 2 is more difficult, a basic model containing only the first stage and a complete model incorporating the second stage were constructed in this scenario, and compared and evaluated using consistent training settings.
[0125] like Figure 9 As shown, the model improved across all metrics after introducing the second stage. The most significant improvement was in recall score, indicating that the second stage more effectively enhanced the model's ability to identify anomalous samples, thereby reducing false negatives and improving overall detection performance. This result is consistent with... Figure 10 The consistent changes in the score distribution indicate that the physical evidence enhancement introduced in the second stage mainly affects weak anomalies and boundary samples close to the threshold, thereby improving the separability of normal and abnormal samples in the score space.
[0126] Furthermore, from Figure 10 As shown on the right, the gains of the second stage vary across different fault categories. The gains are most significant for rolling element and cage anomalies, while the gains for the other two types of anomalies are relatively smaller. This indicates that the second stage does not produce uniform gains across all categories, but rather is more beneficial for supplementing the base model's discrimination information for some weak anomaly patterns and difficult-to-identify categories, thereby further improving the model's recognition capability at the category level.
[0127] To further analyze the mechanism of the second stage in anomaly detection, from Figure 10The diagram illustrates the anomaly score distributions for normal, rolling element, and cage samples under Phase 1 and Phase 2, with dashed lines representing discrimination thresholds. In Phase 1, the anomaly score distributions of the three sample types still overlapped to some extent, with some anomaly samples near the threshold, resulting in insufficient differentiation between normal and anomaly samples. After introducing Phase 2, the anomaly scores for rolling element and cage samples shifted significantly upwards overall, and the number of samples exceeding the threshold increased significantly, while the score distribution of normal samples changed relatively little, remaining mainly concentrated in the lower range. This indicates that the supplementary physical evidence extraction and controlled score enhancement mechanisms introduced in Phase 2 can more effectively target weakly anomaly and boundary samples, enabling a clearer separation between them and normal samples in the score space.
[0128] In summary, the results show that the second stage not only improved the overall detection indicators, but also brought differentiated gains at the category level, and further improved the separation effect of abnormal score distribution, thus verifying the effectiveness of its design.
[0129] The interpretability of the proposed method is visualized and analyzed at both the category and sample levels. Figure 11 The average contribution of the three types of physical evidence to the fusion score is presented under different categories. It can be seen that the evidence contribution of the normal class samples is generally low, while the contributions of the rolling element and cage class samples are significantly higher, indicating that the supplementary physical evidence extracted in the second stage can effectively reflect the difference in the degree of anomalousness between the fault state and the normal state. In the current scenario and the statistically analyzed categories, ringing evidence shows a higher average contribution, followed by kurtosis evidence, while cyclic modulation evidence is relatively low, indicating that ringing response and impact-related evidence play a more significant role in anomalous enhancement.
[0130] like Figure 12 As shown, the local responses and two-stage score changes of two representative boundary samples are further illustrated. Stage 1 was able to capture local anomalous perturbations on the key patch and showed some reconstruction bias, but its overall anomalous score was still close to the discrimination threshold, and the discrimination result was not yet stable. After introducing the second stage, the sample scores all moved significantly upward and exceeded the threshold, indicating that the second stage could further enhance weak anomalies and boundary samples by utilizing supplementary physical evidence, based on the local anomaly localization in Stage 1. Therefore, this method can not only identify which local segments the anomalies mainly occur in, but also explain how these local anomalies affect the final discrimination result through evidence fusion, thus demonstrating good interpretability.
[0131] Example 3, referring to Figures 13-15 As an embodiment of the present invention, a single-class anomaly detection method for physical guidance of rotating components of rail vehicles under variable working conditions is provided. In order to verify the beneficial effects of the present invention, a simulation experiment is conducted for scientific demonstration.
[0132] To further verify the generalization performance and practical application value of the proposed method in real engineering scenarios, a vibration dataset from the bogie system of a Chinese urban rail train was introduced. Figure 13 This is a data collection diagram. The data was collected during the operation of a Type A metro train on the depot line; the relevant parameters are as follows: As shown. The dataset contains one normal state and three abnormal states, and the definitions of each fault type are as follows. As shown. Unlike the standard bearing partial faults in publicly available test bench data, this dataset was collected during the actual operation of vehicles. The signals contain more complex operating condition fluctuations, line excitations, and environmental interference, thus enabling a more realistic verification of the applicability of the proposed anomaly detection method under field conditions.
[0133] surface Operating conditions and sampling parameter table
[0134]
[0135] surface Fault Type Description Table
[0136]
[0137] On this dataset, the same single-class anomaly detection setting as the BJTU-RAO dataset is used. and The accuracy and F1 scores of different methods on the urban rail train dataset are presented. Figure 14 A bubble chart was plotted showing the accuracy versus F1 of different models on this dataset. In the chart, the vertical axis represents accuracy, and the bubble size represents F1. It can be seen that the proposed method achieved the highest accuracy and F1 on this dataset, indicating that it maintains strong anomaly discrimination ability under real-world line operating conditions. From an overall performance perspective, the proposed method achieved an overall accuracy of 90.68% and an overall F1 of 0.949, both the highest values among all compared methods. Compared to the best-performing comparative method 1D-ConvAE, the proposed method improved overall accuracy by 12.13% and overall F1 by 0.076; compared to OCSVM, it improved by 14.23% and 0.091, respectively. Considering the more complex anomaly patterns and stronger sample fluctuations under real-world operating conditions, this demonstrates that the proposed method can still establish a more stable normal state representation on real urban rail train data and more effectively identify anomalies.
[0138] Considering the more serious risks of misclassifying anomalous samples as normal samples in actual operation, anomaly recall was introduced in addition to accuracy and F1 score to evaluate the sensitivity of each method to anomalous samples. The results are as follows: Figure 15As shown in the figure, the proposed method still achieves the highest anomaly recall rate, indicating that it can identify more abnormal samples and effectively reduce the risk of missed detections. In contrast, while other methods have some detection capabilities on certain metrics, they still have significant shortcomings in anomaly recall, indicating that they are less sensitive to identifying complex abnormal states in the field.
[0139] surface Accuracy comparison table of different methods on the subway train dataset
[0140]
[0141] surface Comparison table of F1 scores of different methods on the subway train dataset
[0142]
[0143] To address the issues of scarce fault samples, ambiguous anomaly boundaries, and insufficient interpretability of critical rotating components in rail transit under varying operating conditions, a physical guidance framework KODA-PRF for single-class anomaly detection is proposed. This framework can achieve stable identification of anomalies across operating conditions using only normal samples for training, and also possesses strong anomaly discrimination ability, operating condition adaptability, and physical interpretability.
[0144] Experimental results on the BJTU-RAO public dataset and real-world urban rail train datasets demonstrate that the proposed method achieves competitive performance in cross-condition anomaly detection tasks, exhibiting consistent advantages in overall metrics, boundary sample identification, and interpretability. In both cross-condition scenarios of the BJTU-RAO dataset, the proposed method achieves optimal results. In scenario 1, the overall accuracy and overall F1 score reach 94.72% and 0.968, respectively, while in scenario 2, they reach 86.72% and 0.917, respectively. Furthermore, the method shows more balanced performance across different fault types, demonstrating strong capabilities in normal state modeling and anomaly detection under changing conditions. On the real-world urban rail train dataset, facing more complex operating condition fluctuations, track excitations, and environmental disturbances, the proposed method also achieves the best overall performance, with an overall accuracy of 90.68% and an overall F1 score of 0.949. This further illustrates that the method is not only suitable for cross-condition anomaly detection tasks on publicly available testbed data but also maintains high detection accuracy and good generalization ability under data conditions that more closely resemble actual engineering scenarios.
[0145] Overall, KODA-PRF provides a single-classification anomaly detection method for critical rotating components in rail transit under varying operating conditions, combining operating condition regularization, local reconstruction deviation, and physical evidence enhancement.
[0146] Although KODA-PRF has achieved good experimental results on both publicly available cross-condition datasets and real-world urban rail train datasets, its performance boundaries and engineering application capabilities still have room for improvement. Firstly, the current experiments primarily validated two typical cross-condition transfer scenarios: 40Hz training and 60Hz testing, and 40Hz training and 20Hz testing. While these scenarios can reflect the model's detection capabilities under changing operating conditions, the speed fluctuation range, environmental interference intensity, and excitation sources in real-world rail transit systems are often more complex, and anomaly patterns may be more diverse. Therefore, the current experiments cannot fully cover all possible operating condition changes that may occur in real-world service environments. Further validation of the proposed method's stability and generalization capabilities is needed on a wider range of speed transfers, more complex operating conditions, and more field data.
[0147] Secondly, current work primarily focuses on offline experimental verification and has not yet completed long-term deployment testing in actual online monitoring systems. Although the proposed method demonstrates significant advantages in metrics such as accuracy, F1 score, and anomaly recall, in real-world applications, the model not only needs good detection accuracy but also needs to consider threshold stability, continuous monitoring reliability, real-time inference efficiency, and engineering deployment costs. Especially on automotive or edge hardware platforms, the model's computational overhead, inference latency, and long-term operational stability still require further verification through actual deployment. Therefore, future work will focus on online deployment, long-term monitoring, and expansion into complex fault scenarios to further advance the proposed method from laboratory verification to engineering applications.
[0148] This embodiment also provides a computer device applicable to the single-class anomaly detection method for the physical guidance of rotating components of rail vehicles under varying operating conditions, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the single-class anomaly detection method for the physical guidance of rotating components of rail vehicles under varying operating conditions as proposed in the above embodiment.
[0149] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0150] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the physical guidance single-class anomaly detection method for rotating components of a rail vehicle under varying operating conditions, as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0151] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. 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 be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for detecting single-class anomalies in the physical guidance of rotating components of rail vehicles under varying operating conditions, characterized in that, include: Vibration signals of key rotating components of rail vehicles are acquired, and the vibration signals are angularly normalized by combining rotation frequency information to obtain vibration signal samples at a unified angular domain scale. The vibration signal samples are divided into blocks to form a patch sequence, which is then input into the block reconstruction Transformer to obtain the reconstruction error of each patch and form a sample-level baseline anomaly score. Based on the vibration signal samples, an adaptive differentiable physical evidence branch is constructed to extract physical evidence from cyclic modulation, subband envelope kurtosis and ringing response. The sample-level benchmark anomaly score and the physical evidence are fused with controlled residuals to obtain a fused anomaly score. Transformer model training is divided into two stages. The first stage establishes a normal state reference distribution based on normal samples. The second stage freezes the block reconstruction of Transformer, introduces pseudo outlier exposure, and performs abnormal boundary learning and detection score calibration. Abnormal state discrimination is performed based on the fusion of abnormal scores and thresholds.
2. The method for detecting single-class anomalies in the physical guidance of rotating components of rail vehicles under varying operating conditions as described in claim 1, characterized in that: The angular domain normalization of the vibration signal by combining frequency information includes determining the effective time length of the vibration signal based on the preset number of rotation cycles and the corresponding frequency, extracting a signal segment of the corresponding length from the original vibration signal, and interpolating and resampling the signal segment to map it into a fixed-length angular domain representation.
3. The method for detecting single-class anomalies in the physical guidance of rotating components of rail vehicles under varying operating conditions as described in claim 2, characterized in that: The process of obtaining the reconstruction error of each patch includes dividing the normalized vibration signal into blocks according to a sliding window to obtain a patch sequence, forming a token through linear mapping, and inputting it into a Transformer encoder. The encoder is used to learn the temporal dependencies between local segments, and each patch is recovered through a reconstruction head. The degree of deviation between each patch and the corresponding reconstruction result is taken as the reconstruction error of each patch.
4. The method for detecting single-class anomalies in the physical guidance of rotating components of rail vehicles under varying operating conditions as described in claim 3, characterized in that: The process of forming a sample-level baseline anomaly score includes sorting the reconstruction errors of each patch, selecting the top k patches with the largest reconstruction errors, and aggregating the reconstruction errors of the top k patches to obtain the sample-level baseline anomaly score.
5. The method for detecting single-class anomalies in the physical guidance of rotating components of rail vehicles under varying operating conditions as described in claim 4, characterized in that: The adaptive differentiable physical evidence branch includes cyclic modulation evidence, subband envelope kurtosis evidence, and ringing response evidence; By performing modulation spectrum analysis along the time axis on the short-time Fourier power plot of the vibration signal sample, and then performing soft pooling after removing the DC component and normalizing, evidence of cyclic modulation is obtained. By dividing the vibration signal sample into sub-bands in the frequency domain, reconstructing the time-domain components of each sub-band and extracting the envelope information, the corresponding envelope kurtosis is calculated based on the envelope information; after introducing sub-band recalibration, the envelope kurtosis of each sub-band is soft-pooled to obtain sub-band envelope kurtosis evidence. By generating a damped sine kernel and performing a one-dimensional matched convolution with the vibration signal sample, the peak response is RMS normalized and then soft-pooled to obtain evidence of the ringing response.
6. The method for detecting single-class anomalies in the physical guidance of rotating components of rail vehicles under varying operating conditions as described in claim 5, characterized in that: The controlled residual fusion includes: standardizing and sparsely triggering the physical evidence to obtain valid physical evidence; inputting the sample-level benchmark anomaly score and the valid physical evidence into a gating network to adaptively learn the weights of different evidence components; introducing a boundary activation mechanism to apply physical enhancement to samples close to the decision boundary; generating a fusion residual based on the boundary activation mechanism, the weights of different evidence components, and the valid physical evidence; and superimposing the fusion residual onto the sample-level benchmark anomaly score to obtain a fusion anomaly score.
7. The method for detecting single-class anomalies in the physical guidance of rotating components of rail vehicles under varying operating conditions as described in claim 6, characterized in that: The establishment of a normal state reference distribution based on normal samples includes training only the block reconstruction Transformer, enabling the block reconstruction Transformer to learn stable reconstruction rules on the normal sample distribution, establishing a normal state reference distribution, and providing sample-level benchmark anomaly scores for subsequent physical augmentation and boundary learning. The introduction of pseudo-outlier exposure includes a second-stage frozen block reconstruction Transformer, constructing pseudo-anomalies based on normal samples to provide boundary learning signals; the construction of pseudo-anomalies includes applying perturbations to normal samples, the perturbations being selected from one or more of shock-ringing, narrowband amplitude modulation, mixed perturbations, low-frequency drift, local random missing data, and saturation pruning, and scaling the amplitude according to the standard deviation of the original samples, so that the pseudo-anomalies maintain a reasonable amplitude scale based on the normal signals and form structural deviations; After the second stage is completed, the fusion anomaly score is compared with a threshold. If the fusion anomaly score exceeds the threshold, it is determined to be an abnormal state; otherwise, it is determined to be a normal state.
8. A single-class anomaly detection system for the physical guidance of rotating components of rail vehicles under varying operating conditions, based on the single-class anomaly detection method for the physical guidance of rotating components of rail vehicles under varying operating conditions as described in any one of claims 1 to 7, characterized in that: The angular domain normalization module is used to acquire vibration signals of key rotating components of rail vehicles and perform angular domain normalization on the vibration signals in combination with rotation frequency information to obtain vibration signal samples under a unified angular domain scale. The block reconstruction processing module is used to divide the vibration signal samples into blocks to form a patch sequence, and input it into the block reconstruction Transformer to obtain the reconstruction error of each patch and form a sample-level benchmark anomaly score. The physical evidence extraction module is used to construct an adaptive differentiable physical evidence branch based on vibration signal samples, and extract physical evidence from cyclic modulation, subband envelope kurtosis and ringing response. The controlled residual fusion module is used to fuse sample-level benchmark anomaly scores with physical evidence using controlled residuals to obtain fused anomaly scores. The training and anomaly construction module is used to perform two-stage training. In the first stage, a normal state reference distribution is established based on normal samples. In the second stage, the Transformer is frozen and reconstructed in blocks and pseudo outlier exposure is introduced. Pseudo-anomalies are constructed by perturbating normal samples to learn anomaly boundaries and calibrate detection scores. The anomaly detection module compares the fusion anomaly score with a threshold. When the fusion anomaly score exceeds the threshold, it is determined to be an abnormal state; otherwise, it is determined to be a normal state.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the physical guidance single-class anomaly detection method for rotating components of rail vehicles under varying working conditions as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the physical guidance single-class anomaly detection method for rotating components of rail vehicles under varying working conditions as described in any one of claims 1 to 7.