A garment production line equipment fault traceability analysis method

By introducing a fault semantic perturbation device and a dual-branch feature encoding network into the fault diagnosis of garment production line equipment, causal feature decoupling and adaptive optimization are achieved, solving the problem of insufficient causal interpretability in existing technologies, improving the interpretability and real-time performance of diagnosis, and making it suitable for complex dynamic environments.

CN122365266APending Publication Date: 2026-07-10GUANGDONG JINDING ZHIZAO GARMENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610490971.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-14
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing fault diagnosis methods for garment production line equipment cannot effectively mine and distinguish between robust semantic features and sensitive causal features, lack causal attribute decoupling tools, and fail to provide a structured causal explanation chain for the interpretation of diagnostic results. They cannot support counterfactual reasoning and tracing capabilities, and lack automation and real-time performance in multi-source heterogeneous signal coordination and cross-operating condition consistency discrimination.

Method used

By acquiring the original time-series signal and combining it with the semantic labels of typical operating conditions of the equipment to generate a time-semantic label sequence, a local perturbation with semantic alignment is applied using a fault semantic perturbation device, a dual-branch feature encoding network is constructed to decouple causal features, and a perturbation robustness score and semantic sensitivity vector are generated. The fault report is output by combining it with the fault classifier, and the model is adaptively optimized by using counterfactual feature vectors.

Benefits of technology

It significantly improves the causal identification capability and interpretability of diagnostic results for equipment failures in garment production lines, reduces deployment and maintenance costs, is suitable for resource-constrained and variable operating conditions, and provides accurate causal explanation and traceability capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365266A_ABST
    Figure CN122365266A_ABST
Patent Text Reader

Abstract

This invention relates to a fault tracing and analysis method for garment production line equipment. Addressing the challenges of processing multi-source heterogeneous sensor data and the interpretability of causal models in garment production lines, it proposes a fault identification and causal attribution method based on operational condition semantics and disturbance analysis. This method includes multi-source sensor data normalization and operational condition semantic mask construction, generation of physically constrained causal disturbance samples, dual-channel feature encoding to decouple causal features, counterfactual reasoning to measure the contribution of the causal subspace to the diagnostic results, and finally, generation of a structured fault report containing a causal inference chain. Furthermore, it can dynamically optimize the model feature space partitioning based on new fault modes. This scheme achieves efficient alignment and utilization of data diversity and dynamism in complex industrial environments, improves the accuracy of fault diagnosis and the transparency of decision support, and significantly enhances the interpretability and adaptability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault diagnosis and cause-effect analysis technology for garment production line equipment, and in particular to a method for tracing the source of faults in garment production line equipment. Background Technology

[0002] Current fault identification, analysis, and diagnosis technologies for garment production line equipment primarily rely on correlation-based data-driven pattern recognition methods. Most solutions employ traditional feature engineering combined with supervised learning models to train a fault mode recognition model on a large amount of signal data collected from multiple heterogeneous sensors in the equipment. In these methods, engineering practice commonly uses mainstream classification models such as support vector machines, random forests, and deep neural networks, and employs techniques like sliding windows, statistical feature extraction, and specific operating condition labeling to encode the raw signals. These models, combined with anomaly detection, cluster analysis, and pattern matching techniques, effectively improve the equipment health monitoring and preliminary automated diagnostic capabilities of garment production lines.

[0003] In recent years, the industry has gradually introduced deep learning models such as convolutional neural networks, recurrent neural networks, and self-attention mechanisms to enhance the model's ability to extract features and identify faults in high-dimensional, heterogeneous industrial time-series signals. At the same time, end-to-end models are used to solve the problem of model sharing and transfer across multiple devices and operating conditions. Some manufacturers are attempting to integrate limited fault trees, expert systems, or Bayesian networks to achieve simple logical inference and auxiliary interpretation of diagnostic results.

[0004] However, existing representative technologies still have significant limitations. In the actual scenario of garment production lines, due to the wide variety of equipment types, complex processes, uneven sensor deployment environments, and sparse historical fault annotations, intelligent diagnostic systems based on correlation modeling generally face the following problems: First, current feature extraction and fault identification processes rely excessively on the correlation between signals, failing to reveal the deep causal mechanisms between equipment failures and specific operating conditions. With the intelligent development of garment manufacturing, users' demands for the interpretability, traceability, and decision-making credibility of automated diagnostic results are rapidly increasing. Judgments based solely on model-predicted probabilities are insufficient to provide structured causal support for equipment management and maintenance decisions, severely impacting user trust and system efficiency.

[0005] Secondly, existing approaches to improving diagnostic interpretability mainly include manually constructing knowledge graphs, modeling causal chains of failures, and using Bayesian networks or logical rule constraints. However, these methods are costly to deploy and maintain, heavily reliant on historical knowledge accumulation and expert teams, and cannot handle flexible and reliable transfer in scenarios involving rapid equipment replacement and large-scale unlabeled samples.

[0006] Furthermore, some technical approaches based on statistical testing and time-series causal analysis (such as Granger test, LSTM causal modeling, PC algorithm, and instrumental variable method) often require a large amount of high-quality data, complex parameter tuning, and special data structure assumptions. They are less friendly to on-site edge computing capabilities and data environment, which limits their practical applicability in industries with high variability such as garment manufacturing.

[0007] Furthermore, traditional feature engineering fails to distinguish between "robust features" and "causal features," and hybrid characterization cannot clearly define the independence between the system baseline mechanism and the fault characterization mechanism. Once the equipment operating conditions are slightly disturbed or a new type of fault mode appears, the classification model may suffer from insufficient generalization ability or mode aliasing, leading to a decrease in the robustness and reliability of the diagnostic results.

[0008] Existing technologies have significant shortcomings and urgently need improvement in the following aspects: The diagnostic model lacks precise tools for decoupling causal attributes because it cannot effectively mine and distinguish between "robust semantic features" related to the basic operating status of equipment and "sensitive causal features" that are activated only under specific faults.

[0009] The interpretation of diagnostic results mainly focuses on probability output or display of highly correlated features, making it difficult to provide a structured causal explanation chain and failing to support attribution analysis and source tracing capabilities based on counterfactual reasoning.

[0010] Solutions that rely on external knowledge graphs or expert rule bases are not suitable for manufacturing sites with weak historical data and constantly updated fault types, and the models are difficult to adapt and be deployed in a portable manner.

[0011] Existing methods are severely lacking in automation, real-time performance, and maintainability in areas such as multi-source heterogeneous signal coordination, cross-condition consistency judgment, and model adaptive optimization.

[0012] Therefore, there is an urgent need for a novel fault diagnosis solution for garment equipment that does not require the construction of external causal graphs, does not rely on expert databases or complex graph structure modeling, and can directly and automatically complete robust and causal feature decoupling, causal attribution strength quantification, and has a structured causal chain output based on equipment operation data. This type of solution should improve diagnostic interpretability, traceability, and user decision-making confidence in resource-constrained and variable operating conditions, effectively supporting the refined and intelligent management of garment production line equipment. Summary of the Invention

[0013] This application provides a method for tracing and analyzing equipment failures in a garment production line, aiming to solve one of the problems or issues of the existing technology mentioned in the background section.

[0014] This application provides a method for tracing and analyzing equipment failures in a garment production line, specifically including: S1: Obtain the original time-series signal and combine it with the semantic labels of typical operating conditions of the equipment to generate a time-semantic label sequence, and construct a synchronous normalized dataset; S2: Based on the synchronous normalized dataset and the time-semantic label sequence, a semantically aligned local perturbation is applied to the original time-series signal using a fault semantic perturbation device to generate a perturbation sample set; S3: Input the disturbance sample set into the dual-branch feature coding network, wherein the main branch learns the original signal representation, the disturbance sensing branch calculates the difference gradient before and after the disturbance, and generates a disturbance robustness score and semantic sensitivity vector based on the output of the main branch and the disturbance sensing branch. The output of the dual-branch feature coding network is connected to the fault classifier to output the fault category probability distribution, denoted as the original probability distribution. S4: Perform causal feature decoupling based on the perturbation robustness score and the semantic sensitivity vector, and divide the feature space into a robust subspace and a causal subspace; S5: Freeze the network parameters corresponding to the robust subspace, fine-tune the causal subspace according to the response state of the causal subspace under a specific fault label, and generate a counterfactual feature vector by removing or zeroing the activation response of the causal subspace. S6: Calculate the change using the counterfactual feature vector and the output probability distribution of the fault classifier, and generate an attribution strength index; S7: Combine the attribution strength index and the fault category probability to make a fusion judgment and generate a fault report.

[0015] S8: Dynamically update the cross-sample consistency constraint threshold of the causal subspace based on the structured causal explanation chain in the fault report to achieve adaptive optimization of the model for newly emerging fault modes.

[0016] The fault tracing and analysis method for garment production line equipment provided in this application has the following beneficial effects: (1) This application effectively overcomes the problem of lack of causal interpretability caused by the reliance on statistical correlation modeling in traditional garment production line equipment fault diagnosis methods by introducing a "fault semantic perturbator" driven by working condition semantic labels and a dual-channel perturbation perception coding mechanism. Existing technologies generally adopt black-box deep learning models or shallow feature classification strategies, which are difficult to distinguish between co-occurrence patterns and real cause relationships. They are prone to misjudgment and cannot provide credible attribution basis when facing multi-source noise, working condition drift or sparse labeling scenarios. This scheme applies semantically aligned local perturbation to the original time series signal and constructs a learning path for the difference response before and after the perturbation. This enables the model to explicitly capture those key feature dimensions that are sensitive to specific fault semantics, thereby generating a "semantic sensitivity vector" with physical meaning, which significantly improves the causal pointing ability in the fault discrimination process. At the same time, it combines "perturbation robustness scoring" to achieve decoupling and separation of robust representation and causal response, ensuring that the system can still stably identify the core variables that are truly involved in fault propagation in complex dynamic environments, thereby greatly enhancing the interpretability of diagnostic results and the credibility of decision-making.

[0017] (2) Furthermore, this invention designs a counterfactual feature weighting mechanism and a structured causal explanation chain output architecture that does not require external knowledge injection, breaking through the bottlenecks of high computational overhead, strong prior dependence, and difficulty in real-time updates in the deployment of traditional causal inference methods in industrial sites. Unlike the technical route that requires the construction of knowledge graphs, the execution of Bayesian inference, or graph structure learning, this solution is entirely driven by the inherent semantic perturbation characteristics of equipment operation data. Without introducing additional rule bases or domain expert intervention, it generates "counterfactual feature vectors" by freezing robust subspaces and fine-tuning causal subspaces, quantitatively evaluating the contribution strength of each causal dimension to the current fault judgment, and outputting a complete explanation chain including attribution ranking, component mapping, and semantic matching degree, realizing the leap from "what" to "why". This mechanism not only avoids complex iterative verification and parameter tuning processes, but also has good online adaptability, especially suitable for the actual conditions of diverse equipment models, frequent updates, limited edge computing power, and scarce historical fault samples in the garment manufacturing scenario, significantly reducing the deployment threshold and operation and maintenance costs.

[0018] In summary, this solution constructs an end-to-end, self-driven, and lightweight causal and explainable fault tracing analysis framework, which enables accurate identification and mechanism-level attribution of faults in key equipment of garment production lines without external knowledge dependence. It takes into account diagnostic accuracy, real-time response, and system maintainability, and provides a new paradigm for equipment health management in intelligent manufacturing environment that combines practicality and theoretical depth. Attached Figure Description

[0019] Figure 1 This is the main flowchart of a method for tracing and analyzing equipment failures in a garment production line.

[0020] Figure 2 This is a sub-flowchart of a method for tracing and analyzing equipment failures in a garment production line.

[0021] Figure 3 This is another sub-flowchart of a method for tracing the source of equipment failures in a garment production line. Detailed Implementation

[0022] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0023] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0024] like Figure 1 As shown, this application provides a method for tracing the source of equipment failures in a garment production line, specifically including: S1: Obtain the original time-series signal and combine it with the semantic labels of typical operating conditions of the equipment to generate a time-semantic label sequence, and construct a synchronous normalized dataset; S2: Based on the synchronous normalized dataset and the time-semantic label sequence, a semantically aligned local perturbation is applied to the original time-series signal using a fault semantic perturbation device to generate a perturbation sample set; S3: Input the disturbance sample set into the dual-branch feature coding network, wherein the main branch learns the original signal representation, the disturbance sensing branch calculates the difference gradient before and after the disturbance, and generates a disturbance robustness score and semantic sensitivity vector based on the output of the main branch and the disturbance sensing branch. The output of the dual-branch feature coding network is connected to the fault classifier to output the fault category probability distribution, denoted as the original probability distribution. S4: Perform causal feature decoupling based on the perturbation robustness score and the semantic sensitivity vector, and divide the feature space into a robust subspace and a causal subspace; S5: Freeze the network parameters corresponding to the robust subspace, fine-tune the causal subspace according to the response state of the causal subspace under a specific fault label, and generate a counterfactual feature vector by removing or zeroing the activation response of the causal subspace. S6: Calculate the change using the counterfactual feature vector and the output probability distribution of the fault classifier, and generate an attribution strength index; S7: Combine the attribution strength index and the fault category probability to make a fusion judgment and generate a fault report.

[0025] S8: Dynamically update the cross-sample consistency constraint threshold of the causal subspace based on the structured causal explanation chain in the fault report to achieve adaptive optimization of the model for newly emerging fault modes.

[0026] Step S1: Obtain the original time-series signal and generate a time-semantic label sequence by combining it with the semantic labels of typical operating conditions of the equipment, and construct a synchronized normalized dataset. Specifically, this includes: S1.1: Data access and processing are performed on the multi-source heterogeneous sensors deployed in the sewing machines, cutting tables and ironing units of the garment production line to obtain a set of raw time-series signals including vibration acceleration, current waveforms and temperature changes, forming an initial industrial control data stream to be processed.

[0027] It should be noted that the time-semantic label sequence refers to a time-semantic mapping sequence formed by labeling each time window with the corresponding working condition category on the time axis of the original time-series signal based on the typical working condition semantic labels of the sewing machine, cutting table, and ironing unit (such as high-speed start-stop, positioning deviation, and temperature control instability). The synchronous normalized dataset refers to the dataset obtained by aligning all signals on the time axis through multi-rate resampling and clock synchronization calibration of the original signals collected by vibration, current, and temperature sensors deployed on the sewing machine, cutting table, and ironing unit, then normalizing the amplitude of each sensor dimension to the [0,1] interval using range normalization, and finally merging the processed multi-source data according to the time index. This dataset retains the sensor position difference and working condition difference information.

[0028] The physical interface signal acquisition initialization is performed on the multi-source heterogeneous sensors deployed in the sewing machines, cutting tables, and ironing units of the garment production line. Data access sessions are established and unique device identifiers are locked while ensuring the stable operation of each sensor. Analog-to-digital conversion parameters are calibrated for the triaxial mechanical vibration signals detected by the vibration acceleration sensor. A digital waveform sequence meeting industrial control standards is generated based on sampling accuracy and range settings. Bandwidth filtering and DC bias compensation are applied to the equipment operating current waveform acquired by the current sensor. Effective AC components are extracted within a set frequency range and a continuous sampling stream is constructed to eliminate power supply noise interference. Multi-point temperature scale linear correction is performed on the equipment surface temperature change sequence acquired by the temperature sensor. A time-continuous temperature signal stream is output by combining the sampling period and thermal inertia compensation coefficient, ensuring reference consistency between temperature channels. The above three types of digital signals are grouped according to the sensor's physical location and device number, and stored in the industrial control data buffer using a time-series index, forming an original time-series signal set containing vibration acceleration sequences, current waveform sequences, and temperature change sequences. Through the data access processing flow, the raw outputs of multi-source heterogeneous sensors are uniformly transformed into the initial industrial control data stream to be processed, so as to achieve input consistency in subsequent clock synchronization and semantic annotation stages.

[0029] For example, a set of vibration acceleration sensors is deployed at the spindle end of a sewing machine in a garment production line, with a range of 20g and a sampling frequency of 5kHz. A current sensor with a bandwidth of 0~1kHz and a current range of 0~10A is built into the cutting bed control unit. A temperature sensor with a temperature range of 0~200℃ and a sampling frequency of 10Hz is installed on the surface of the hot plate in the ironing unit. The vibration signal is converted by a 24-bit ADC and then a bandpass filter is used to extract the mechanical vibration component from 0.5~500Hz. The current signal is separated into a 50Hz fundamental component and high-order harmonics are removed by fast Fourier transform. The temperature signal is corrected for ambient temperature drift by multi-point thermal calibration. In the data access session, all sensor signals are recorded with a unified timestamp. The vibration sequence length is 5000 samples, the current waveform is 1000 samples, and the temperature sequence is 100 samples. The initial industrial control data stream formed by grouped storage ensures that the input data quality of subsequent multi-rate resampling and clock synchronization processing is significantly improved, and the vibration characteristics, power characteristics, and thermal state characteristics all have high availability and consistency.

[0030] S1.2: Perform multi-rate resampling and clock synchronization calibration based on the initial industrial control data stream to eliminate timestamp deviations between sensors with different sampling frequencies and generate a synchronized multi-dimensional timing signal matrix with a unified time reference.

[0031] The input conditions for performing multi-rate resampling and clock synchronization calibration on the initial industrial control data stream output from step S1.1 are: raw time-series signals such as vibration acceleration, current waveforms, and temperature changes collected by different types of sensors deployed in sewing machines, cutting tables, and ironing units. These signals exhibit inconsistencies in sampling frequency, sampling period, and clock reference. For this input data, a unified target sampling frequency is first established for sensor signals with different sampling frequencies. A combination of piecewise linear interpolation and window-weighted convolution is used to downsample high-frequency signals and upsample low-frequency signals to achieve multi-rate resampling. Subsequently, a global timestamp set is extracted based on the resampled signal sequence to construct a sensor time deviation model. The least squares fitting method is used to calculate the clock drift compensation coefficient. The formula for calculating the compensation coefficient is: in This represents the timestamp of the i-th observed signal after resampling. This represents the reference time under a unified benchmark, where n is the number of sample points. Based on the aforementioned compensation coefficients, a timeline linear transformation is performed on the signals from each sensor, aligning the timestamps of different signals to the unified benchmark. After alignment, cross-dimensional synchronization detection is performed, calculating the correlation coefficient between the signal amplitude and phase within the corresponding time segment for each sensor. Outliers with correlation coefficients below a set threshold are removed to ensure the effectiveness of clock synchronization. The signals, after resampling and clock synchronization calibration, are combined according to sensor dimensions to output a synchronized multidimensional time-series signal matrix with a unified time benchmark.

[0032] By combining multi-rate resampling with clock drift compensation, the multi-source heterogeneous original signals from the previous step are transformed into a multi-dimensional time-series signal matrix that is time-consistent, frequency-uniform, and synchronized, thereby achieving the expected technical effect of eliminating timestamp deviations between sensors with different sampling frequencies.

[0033] S1.3: Use a predefined knowledge graph of clothing equipment operating conditions to perform semantic annotation mapping on the synchronized multidimensional time-series signal matrix to extract typical operating condition semantic tags corresponding to high-speed start-stop, positioning deviation and temperature control instability scenarios, and establish an association index between signal segments and operating condition semantics.

[0034] The synchronized multi-dimensional time-series signal matrix, after multi-rate resampling and clock synchronization calibration, is input into the garment equipment operating condition knowledge graph retrieval module to establish a mapping rule set between equipment operating condition nodes and sensor signal feature dimensions.

[0035] For each working condition node in the mapping rule set, feature matching calculation is performed to extract signal pattern segments containing high-speed start and stop of the sewing machine, positioning deviation of the cutting bed, and temperature control instability of the ironing unit, forming a candidate signal segment set.

[0036] Based on the input of candidate signal fragment sets into the working condition label decision tree model, the node splitting strategy is used to make a combination of multi-dimensional features such as vibration acceleration, current waveform, and temperature change to generate a preliminary label sequence corresponding to the working condition label.

[0037] The confidence level of the initial label sequence is calculated, and a probability-based label selection algorithm is used to remove and correct low-confidence labels in order to improve the accuracy of semantic annotation.

[0038] The filtered operating condition labels are indexed with the corresponding signal segments to form an association index table between signal segments and operating condition semantic labels.

[0039] Through the semantic annotation mapping process described above, the synchronized multi-dimensional time-series signal matrix from the previous step is transformed into typical operating condition semantic labels for equipment, including high-speed start-stop, positioning deviation, and temperature control instability scenarios. This enables traceable association between signal segments and operating condition semantics, providing precise semantic boundaries for subsequent dynamic window cutting and time-semantic mask generation.

[0040] For example, in the data collected by the sensors of a sewing machine on a garment production line, the vibration acceleration signal is sampled at 200Hz, the cutting bed current signal at 50Hz, and the ironing unit temperature signal at 10Hz. The synchronized multi-dimensional time-series signal matrix after processing by S1.2 contains three feature channels. This matrix is ​​input into the working condition knowledge graph retrieval module. The mapping rule set defines the feature matching conditions for the high-speed start / stop node as follows: the peak vibration acceleration is greater than 2.5 × g and the current waveform shows two zero-crossings within 0.2 seconds; the positioning deviation node is defined as the cutting bed current waveform showing a continuous low-frequency component and the displacement encoder signal deviation exceeding 0.8 mm; the temperature control instability node is defined as the temperature signal fluctuating by more than 5 degrees Celsius within a 10-second window. After feature matching, 12 candidate segments for high-speed start / stop, 5 candidate segments for positioning deviation, and 8 candidate segments for temperature control instability are extracted. The initial label sequence is calculated using the input decision tree model, and confidence levels are calculated. Labels with confidence levels below 0.7 are removed using a label filtering algorithm, ultimately generating 10 high-speed start-stop label sequences, 5 positioning deviation label sequences, and 7 temperature control instability label sequences. An association index table is then established with the corresponding signal segments. This table significantly improves the accuracy of time-semantic mask generation in subsequent dynamic window segmentation, ensuring the stability of the causal inference module's identification of operating condition boundaries.

[0041] S1.4: Perform dynamic window cutting and binarization encoding processing based on the typical operating condition semantic labels of the equipment to generate a time-semantic mask sequence that can identify the time period of a specific operating condition, thereby realizing the conversion of operating condition semantic information into a time-domain mask signal.

[0042] S1.5: Combine the synchronized multidimensional time-series signal matrix with the time-semantic mask sequence to perform range normalization and spatial alignment fusion processing to construct a synchronized normalized dataset that simultaneously contains sensor location difference information and production condition difference information, thus completing the data preparation for causal inference.

[0043] Data mapping initialization processing is performed on the synchronized multidimensional time-series signal matrix and time-semantic mask sequence output from the preceding sub-step S1.4. The matrix row and column indices are assigned to correspond with the operational condition labels in the mask sequence using a fusion underlying format that fixes positional and semantic difference information. For each sensor location, the range of the full-time domain signal is calculated for that dimension. A range normalization method is used to proportionally map the amplitude of all sampling points in that dimension to the [0,1] interval. The normalization coefficient is determined based on the difference between the maximum and minimum values ​​in that dimension, expressed by the following formula: in, The original amplitude. The maximum value of this dimension. The minimum value in this dimension is used. Spatial coordinate vectorization is performed using a normalized matrix, encoding the original sensor physical locations into three-dimensional position vectors. After normalization in each dimension, the relative position difference coefficient is calculated using the Euclidean distance matrix to ensure that spatial information maintains proportional consistency during the fusion process. Based on the time-semantic mask sequence, each time segment in the normalized signal matrix is ​​appended with corresponding operating condition semantic encoding, forming a fusion vector set with temporal semantics. A spatial alignment fusion algorithm is then used to merge the normalized vectors of different sensor locations and different operating condition labels within the same time segment into a unified data record. Column vector rearrangement is performed on the fused record set to ensure that spatial difference information and operating condition difference information are output at fixed index positions in the dataset. Through range normalization and spatial alignment fusion processing, the time-series matrix and semantic mask sequence from the previous step are transformed into a unified format synchronously normalized dataset that simultaneously contains positional and operating condition differences, achieving data preparation for causal inference.

[0044] For example, for a production line containing a sewing machine vibration sensor, a current sensor, and a temperature sensor, in a synchronized multidimensional time-series matrix under a unified time reference, the full-time range of the sewing machine vibration channel is 0.85g, with the normalized maximum value corresponding to an amplitude of 1.0 and the minimum value corresponding to an amplitude of 0.0; the range of the cutting bed current channel is 2.4A, with the normalized amplitude range mapped to [0,1]; and the range of the temperature control unit's temperature channel is 18℃, also normalized to [0,1]. Position encoding uses three-dimensional coordinates based on the equipment layout diagram. The sewing machine position vector is (1.2,0.5,0.0), the cutting bed position vector is (0.0,1.8,0.0), and the ironing unit position vector is (2.4,0.5,0.0). The normalized Euclidean distance matrix calculation result is used as the position difference coefficient matrix input to the spatial fusion algorithm. In the time-semantic mask sequence, high-speed start-stop labels are mapped to code "001", positioning deviations are mapped to code "010", and temperature control instability is mapped to code "100". The corresponding time segments are fused, and the spatial difference coefficients and semantic codes are retained and output at fixed index positions. The dataset output by this implementation significantly improves the matching degree between spatial information and semantic labels in causal inference. The fused records maintain high consistency in the subsequent semantic perturbator processing stage, effectively enhancing the stability of causal feature decoupling.

[0045] Step S2: Based on the synchronized normalized dataset and the time-semantic label sequence, a semantically aligned local perturbation is applied to the original time-series signal using a fault semantic perturbation device to generate a perturbation sample set. Specifically, this includes: S2.1: Based on the working condition semantic tags in the time-semantic tag sequence, perform semantic boundary localization processing on the original time-series signal to extract key time window segments.

[0046] It should be noted that the fault semantic disturbance is a module that uses a time-semantic label sequence as a guide and applies a nonlinear transformation related to the semantics of the operating condition to the amplitude and frequency components of the original time series signal only within the time window corresponding to the semantic label of a specific operating condition, thereby generating a locally meaningful disturbance signal. Its input is the original time series signal and the time-semantic label sequence, and its output is a disturbance sample set.

[0047] Based on the working condition semantic tags in the time-semantic tag sequence, the multi-dimensional time-series signal matrix after synchronous normalization is called as the input data source. Semantic tag index retrieval is performed on the vibration acceleration, current waveform and temperature change data measured by each sensor in the signal matrix to lock the mask mark positions corresponding to the high-speed start and stop of the sewing machine, the positioning deviation of the cutting bed and the temperature control instability of the ironing unit.

[0048] Based on the locked position, a time-domain parsing operation is performed on the mask identifiers corresponding to each label, and the continuous mask identifier segments are converted into absolute timestamp segments according to the device signal sampling frequency to determine the start and end times of the semantic boundary.

[0049] Multidimensional signal slicing is performed on the determined timestamp segments. The original time-domain data and frequency-domain transformed data corresponding to the operating condition labels are extracted in each segment. The frequency-domain transformation adopts fast Fourier transform and is padded with zeros according to the sampling length to ensure transformation accuracy.

[0050] The above slice data is subjected to feature energy threshold detection. Signal segments with energy below the background noise baseline are marked as redundant segments and removed to retain only time windows containing significant operating condition features.

[0051] The retained time windows are grouped according to the operating condition category. Start and end time indexing and sensor location labeling are performed on the data of each group of time windows. The output is a set of key time window segments containing semantic labels, timestamp ranges, location indexes and signal segment data.

[0052] By using semantic boundary localization processing, the synchronized normalized data and time-semantic label sequence from the previous step are transformed into time window data that combines signal physical integrity and semantic orientation, thereby enabling accurate data localization for the subsequent construction of semantic perturbation parameter space.

[0053] For example, in a batch of a garment production line, the sampling frequency of the sewing machine vibration sensor is 256Hz, the sampling frequency of the cutting bed current sensor is 128Hz, and the sampling frequency of the ironing unit temperature sensor is 64Hz. In the time-semantic tag sequence, the timestamp range corresponding to the high-speed start / stop tag is 12.500s to 15.750s, the positioning deviation tag ranges from 35.000s to 36.500s, and the temperature control instability tag ranges from 50.250s to 54.000s. The mask positions are located using an index retrieval system and converted into sample point ranges. For example, the sample point range for the sewing machine signal corresponding to the high-speed start / stop segment is 3200. 4032, the sample point range corresponding to the cutting bed segment is 4480. 4672, the sample point range corresponding to the temperature control instability segment is 3216. 3456. Perform an FFT transform on the signal within the above range to extract the amplitude spectrum and phase information, and calculate the energy value of each segment. ,in For amplitude coefficient, For frequency index, The sample size is specified. Segments with energy values ​​lower than the background baseline value of 0.05 are discarded. The final output is a set of key time window segments, which can ensure a significant improvement in positioning accuracy in the subsequent perturbation parameter space construction stage and support the targeted perturbation processing of specific working condition characteristics by the causal inference model.

[0054] S2.2: Construct a semantic perturbation parameter space using the key time window segment, and perform nonlinear mapping transformation on the signal amplitude and frequency components within the key time window segment to generate an initial perturbation vector set.

[0055] Based on the key time window segments extracted in the preceding steps, a semantic perturbation parameter space is constructed for the multi-dimensional time-series signals related to high-speed start-up and shutdown of the sewing machine, cutting bed positioning deviation, and temperature control instability of the ironing unit, to form a quantitative basis for subsequent local perturbation processing. For vibration acceleration, current waveform, and temperature change signals within the key time window, a multi-resolution amplitude mapping model is established in the signal amplitude domain. A controllable nonlinear gain coefficient is introduced in different amplitude intervals through a parameterized piecewise function to adjust the local shape of the original amplitude curve to reflect the semantic characteristics of specific operating conditions. In the frequency domain, a combination of multi-bandpass filter banks and nonlinear spectrum remapping is used to perform semantic tag-based strength adjustments on the energy distribution of each frequency band, forming a composite perturbation vector primitive defined by amplitude and frequency perturbations. In the signal domain, a two-dimensional perturbation matrix is ​​constructed using amplitude and frequency perturbation primitives. The interaction effect between amplitude and frequency components is quantified through a bivariate nonlinear transformation function, forming a perturbation parameter space with semantic orientation of equipment operating conditions. For different operating condition labels, semantic weight mapping is performed within the constructed disturbance parameter space. This associates the parameter combinations of specific labels with the corresponding disturbance vector generation paths, and adds normalized identifiers to the generated disturbance vectors to ensure semantic consistency in subsequent processing chains. Through the above parameter space construction and nonlinear mapping processing, key time window segments are transformed into an initial set of disturbance vectors with specific operating condition semantics that can be used for causal inference, thus realizing the preparation of basic local disturbance data for the fault semantic disturbance device.

[0056] For example, under high-speed start-stop conditions on a garment production line, a piecewise nonlinear gain function adjustment is performed on the vibration acceleration signal amplitude range of 0.2g to 1.5g, where the gain coefficient curve is set to a maximum peak at 0.8g to highlight the high-speed start-stop impact characteristics. For the current waveform signal in the 50Hz to 200Hz frequency band, a bandpass filter bank combined with spectrum remapping is used to enhance the energy value in this frequency band to reflect the semantic characteristics of the drive motor load changes. For the temperature change signal in the 1Hz to 5Hz frequency band, an attenuation mapping is set to reduce the interference of high-frequency temperature control fluctuations on the extracted disturbance vector. During the construction of the disturbance parameter space, amplitude disturbance primitives and frequency disturbance primitives are combined into a two-dimensional disturbance matrix, and a nonlinear bivariate mapping function is used. in and These are the weighting coefficients for the amplitude and frequency components, respectively. and The input values ​​are used for the perturbation primitives. The parameter combinations corresponding to the high-speed start-stop label are mapped to the two-dimensional perturbation matrix generation path to obtain numerical instances of the initial perturbation vector set. A normalized identifier value of 0.95 is added to maintain semantic matching. During the verification phase, the intermediate perturbation vector, under the input of the dual-branch feature encoding network, significantly improves the response amplitude of the causal sensitivity vector in the high-speed start-stop fault mode, achieving the technical effect of local perturbation triggering causal interpretability.

[0057] S2.3: Based on the initial perturbation vector set and the synchronous normalized dataset, an adaptive weight superposition algorithm is used to apply semantically aligned local perturbation processing to the original time series signal to construct an intermediate perturbation signal sequence that reflects the response characteristics of the device under micro-perturbation conditions.

[0058] S2.4: Perform causal consistency verification on the intermediate disturbance signal sequence, remove abnormal samples that cause the physical meaning of the signal to fail due to excessive disturbance intensity, and select a subset of valid disturbance signals that meet the physical constraints of equipment operation.

[0059] S2.5: Perform a pairing and recombination operation based on the effective perturbation signal subset and the synchronization normalized dataset to generate the perturbation sample set.

[0060] like Figure 2 As shown, step S3 involves inputting the perturbation sample set into a dual-branch feature encoding network. The main branch learns the original signal representation, and the perturbation sensing branch calculates the gradient of difference before and after the perturbation. Based on the outputs of the main branch and the perturbation sensing branch, a perturbation robustness score and semantic sensitivity vector are generated. The output of the dual-branch feature encoding network is connected to a fault classifier to output the fault category probability distribution, denoted as the original probability distribution. Specifically, this includes: S3.1: Perform convolution kernel mapping processing on the original time-series signals in the disturbance sample set, and use a convolutional neural network with shared weights to extract the basic time-frequency feature map containing the device operating status, as the initial representation data of the main branch.

[0061] It should be noted that the dual-branch feature encoding network refers to a deep neural network that includes two parallel branches: a backbone branch and a perturbation-aware branch. The backbone branch uses a three-layer convolutional neural network (convolutional kernel size 5×5, 3×3, 3×3, number of channels 32, 64, 128) to extract the basic time-frequency feature map of the original signal. The perturbation-aware branch calculates the difference gradient of the feature map before and after the perturbation and outputs the perturbation robustness score. The outputs of the two branches are fused through an attention gating mechanism to generate a semantic sensitivity vector.

[0062] For the original time-series signals in the paired and recombined perturbation sample set, the input tensor, based on the synchronous normalization matrix of multi-source heterogeneous sensors in the garment production line, is divided into channel dimensions according to sensor type (vibration acceleration, current waveform, temperature change) to ensure that the physical quantity categories are consistent during convolution kernel mapping.

[0063] In the convolution operation, a shared weight convolution kernel is used. The two-dimensional convolution structure performs convolution scanning along the time and frequency axes. The size of the convolution kernel is set according to the sensor sampling resolution and the expected granularity of time and frequency features to avoid imbalance in the convolution filtering effect of different sensor components.

[0064] Batch normalization is performed on the convolution results to bring the feature responses of signals from different batches back to a uniform statistical distribution range. The batch normalization parameters are determined by minimizing the objective function of cross-batch differences to ensure the consistency of subsequent feature extraction.

[0065] A nonlinear activation function is applied to the normalized convolution output, and a rectified function that matches the sparsity of the time-frequency features is selected to enhance the weight of high-amplitude responses in the feature representation while suppressing the influence of background noise.

[0066] Dimensionality reduction is performed in both the time and frequency domains through pooling operations. The pooling window size is matched with the convolution kernel stride. Max pooling is used to capture the peak values ​​of the working condition features, and the output forms a basic time-frequency feature map, which serves as the initial representation data for the main branch.

[0067] Through the above convolution kernel mapping, batch normalization, nonlinear activation and dual-domain pooling processing, the original time-series signal in the perturbation sample set of the previous step is transformed into a high-dimensional time-frequency feature map that can comprehensively reflect the operating status of the equipment, thus achieving the expected technical effect of providing a stable and distinguishable representation basis for the main branch.

[0068] S3.2: Perform differential operation processing on the basic time-frequency feature map and the disturbance time-series signal processed by the fault semantic disturbance device, so as to calculate the difference gradient matrix of the feature response before and after the disturbance using the gradient backpropagation mechanism, which serves as the input data of the disturbance sensing branch.

[0069] S3.3: Perform norm normalization on the differential gradient matrix, and use statistical distribution analysis to quantify the fluctuation amplitude of each feature dimension under semantic perturbation, generating a perturbation robustness score vector.

[0070] S3.4: Based on the perturbation robustness score vector and the basic time-frequency feature map, a weighted mask fusion is performed, and an attention gating mechanism is used to filter out the feature components that respond significantly to the semantic labels of specific working conditions, and a semantic sensitivity vector is generated.

[0071] The initial condition for performing weighted mask fusion processing on the perturbation robustness score vector and the basic time-frequency feature map is that the perturbation robustness score vector has been calculated by preorder norm normalization to obtain the quantified value of the stability of each feature dimension under a specific semantic perturbation, and the basic time-frequency feature map is the time-frequency domain representation matrix of the device operating status output by the main branch convolution kernel. The two are element-wise weighted in a feature-dimension-wise product manner. The amplitude of each time-frequency unit in the basic time-frequency feature map is scaled proportionally according to the perturbation robustness score to form a feature matrix including stability weighting. This feature matrix is ​​input into an attention gating mechanism, and the correlation strength between each feature unit and the operating condition semantic label is evaluated by constructing a multi-head attention weight vector, and the weight coefficient matrix is ​​extracted. The perturbation robustness score is used as a static stability prior and tensor concatenated with the attention weight coefficient matrix. Masking logic is used to perform saliency retention processing on feature components with correlation strength higher than a preset threshold in the joint matrix, and feature components with correlation strength lower than the threshold are set to zero, forming a semantically sensitive feature subset. A normalization operator is used to perform amplitude normalization on the semantically sensitive feature subset to ensure dimensional consistency and numerical comparability among different sensitive features. Through the weighted mask fusion and attention filtering processes described above, the perturbation stability measure and basic time-frequency feature representation from the previous step are transformed into a quantifiable fault causal correlation strength vector, thereby achieving semantically sensitive feature extraction based on causal interpretability.

[0072] For example, for the synchronized normalized timing signal of a sewing machine during high-speed start-stop operation, the values ​​of each dimension of the perturbation robustness score vector are set between 0.65 and 0.88, and the basic time-frequency feature map is a convolutional output matrix of 128 frequency points × 64 time slices. During weighted processing, the amplitude of each frequency point is first multiplied by the corresponding perturbation robustness score to obtain a stability-weighted feature matrix. This matrix is ​​then input into a multi-head attention mechanism, with 8 attention heads set. Scaled dot product attention is used to calculate the association strength between each feature unit and the semantic label "high-speed start-stop," where the attention score calculation formula is: in, To query the vector matrix, The key vector matrix, The normalization factor is the square root of the key vector dimension. The resulting attention weight coefficient matrix is ​​concentrated between 0.72 and 0.91 in terms of association strength distribution. After concatenating the perturbation robustness score vector with the attention weight matrix, the feature components with an association strength greater than 0.80 are masked and preserved to form a semantically sensitive feature subset, with the number of features being 15% of the original number of features. The semantically sensitive vector generated after normalization is assigned to the causal subspace in the causal feature decoupling step of the classification model. The validation results show that this vector significantly improves the causal association discrimination ability in the fault classification stage and can stably identify the same high-sensitivity frequency band and time slice combination in multiple batches of high-speed start-stop fault data.

[0073] S3.5: Perform tensor concatenation and standardization on the perturbation robustness score vector and the semantic sensitivity vector, and use a multi-task learning head to output a dual-channel encoding result containing robustness and causal sensitivity measures.

[0074] Input validation is performed on the perturbation robustness score vector and semantic sensitivity vector generated in step S3.4 to ensure that their dimensions match and their data types are consistent, thereby eliminating the risk of tensor concatenation failure due to differences in vector length.

[0075] The validated perturbation robustness score vector and semantic sensitivity vector are concatenated using tensors. The encapsulated multidimensional splicing operator connects two types of vectors along a unified feature channel dimension, forming a composite feature tensor that contains both stability and sensitivity information.

[0076] The composite feature tensor is standardized by calculating the mean and standard deviation of each element in the batch dimension and applying the following standardization formula: in, These are the original eigenvalues. This is the batch average. The batch standard deviation ensures the consistency of numerical distribution among different feature components.

[0077] The standardized composite feature tensor is input into a preset multi-task learning head structure. In this structure, robustness measurement output branches and causal sensitivity measurement output branches are set in sequence. Robustness score vectors and causal sensitivity score vectors are generated by using shared bottom weights and independent task-specific fully connected layers, respectively.

[0078] Parallel sampling of the outputs from the two branches is performed and tensor concatenation is used to form a dual-channel encoded result. Logically, the robustness measure and the causal sensitivity measure are kept independent, while they are merged into a unified inference output interface.

[0079] By employing the tensor concatenation, standardization, and multi-task branching methods described above, the perturbation robustness score and semantic sensitivity vector from the previous step are transformed into encoded results containing dual-channel metric information. This enables the dual-branch feature encoding network to output high-quality feature metrics with causal explanatory power and stability assessment capabilities in the final inference stage.

[0080] like Figure 3 As shown, step S4 involves performing causal feature decoupling based on the perturbation robustness score and the semantic sensitivity vector, dividing the feature space into a robust subspace and a causal subspace. Specifically, this includes: S4.1: Perform multi-dimensional tensor concatenation processing on the perturbation robustness score and semantic sensitivity vector to construct a joint feature mapping matrix that includes temporal stability measure and operating condition sensitivity measure, which serves as the input benchmark data for subsequent dynamic threshold calculation.

[0081] It should be noted that the perturbation robustness score refers to the norm-normalized value of the difference in feature response before and after semantic perturbation for each feature dimension, with a value range of [0,1]. The closer the value is to 1, the less sensitive the feature dimension is to semantic perturbation and the stronger its robustness. The semantic sensitivity vector is a high-dimensional vector formed by weighted masking and fusion of the basic time-frequency feature map output from the main branch and the perturbation robustness score, and then filtering out the feature components that have significant responses to the semantic labels of specific working conditions through a multi-head attention mechanism. The value of each dimension in this vector represents the sensitivity of the corresponding feature to the current fault judgment. The larger the value, the stronger the causal relationship between the feature and the fault.

[0082] S4.2: Based on the joint feature mapping matrix, execute the adaptive dual-threshold segmentation algorithm to generate a robustness judgment threshold that distinguishes feature stability and a causal activation threshold that distinguishes fault specificity, and establish the quantitative boundary conditions for feature space partitioning.

[0083] Receive the joint feature mapping matrix output by S4.1 as composite input benchmark data for robustness and causal sensitivity measures.

[0084] Perform column-oriented statistical analysis on the joint feature mapping matrix to collect the statistical central tendency of the stability score distribution and sensitivity score distribution for each feature dimension, so as to form a feature statistical vector for threshold calculation.

[0085] Based on the aforementioned feature statistical vectors, robustness scoring and sensitivity scoring sequences are constructed. Quantile analysis is used to determine the target segmentation ratio, which is then converted into a threshold estimation variable.

[0086] An adaptive dual-threshold segmentation algorithm is used to dynamically correct the variables initially estimated for the thresholds. The robustness threshold is constructed based on the mean and standard deviation of the stability score sequence, and the causal activation threshold is constructed based on the skewness coefficient of the sensitivity score sequence.

[0087] The robustness threshold is calculated using the following formula: in The average stability score. For the standard deviation of stability scoring, These are coefficients that are adaptively adjusted according to the proportion of the target's stability characteristics.

[0088] Execute the following formula to calculate the causal activation threshold: in The causal activation threshold, The mean of the sensitivity scores. The standard deviation of the sensitivity score. This is the amplification factor adjusted according to the target proportion of the high-sensitivity dimension.

[0089] The calculated robustness threshold and causal activation threshold are written into the threshold register matrix to establish the quantization boundary conditions for subsequent feature space partitioning.

[0090] By using an adaptive dual-threshold segmentation method, the joint feature mapping matrix from the previous step is transformed into a quantized boundary condition that can be used to filter robust and causal subspaces, thereby achieving accuracy and interpretability in the high-dimensional feature space partitioning.

[0091] For example, in a high-speed start-stop fault mode of a sewing machine on a garment production line, the joint feature mapping matrix has a dimension of 256, a mean stability score of 0.82 and a standard deviation of 0.05, and a mean sensitivity score of 0.61 and a standard deviation of 0.07. Setting the target stability feature ratio to 0.3 and calculating the coefficient k=1.2, the robustness threshold is obtained as 0.82 + 1.2 × 0.05 = 0.88. Setting the target high sensitivity dimension ratio to 0.25 and calculating the amplification factor γ=1.5, the causal activation threshold is obtained as 0.61 + 1.5 × 0.07 = 0.715. Under these threshold conditions, feature space partitioning is performed, ultimately selecting a robust subspace with a dimension of 78 and a causal subspace with a dimension of 64. Verification shows that the partitioning results significantly improve the positioning accuracy of faulty components across multiple batches of data, and significantly reduce feature redundancy.

[0092] S4.3: Use the robustness determination threshold to perform masking filtering on the high-scoring dimensions in the joint feature mapping matrix to extract the set of feature components that maintain consistent response under semantic perturbation and construct a robust subspace to characterize the basic operating state of the device.

[0093] A masking algorithm based on robustness threshold is applied to the score values ​​of each dimension in the joint feature mapping matrix to identify the feature dimensions that are selected as having high robustness scores.

[0094] Using the robustness threshold as a benchmark, an element-wise threshold judgment operation is performed on the feature score of each column of the matrix to generate a binary mask matrix. The dimension with a mask value of 1 represents a stable feature whose response difference is lower than the tolerance threshold under semantic perturbation conditions.

[0095] Perform Hadamard element-wise product operation on the binary mask matrix and the joint feature map matrix, retaining the high-scoring feature components that pass the mask screening and discarding low-robust dimensions with a mask value of 0.

[0096] The selected feature component set is normalized by column vector to ensure that different dimensions are comparable and have a unified dimension in the subsequent subspace construction, thereby reducing the spatial bias caused by the difference in the range of different sensors.

[0097] Spatial index mapping is performed on the normalized feature set, and physical sensor location labels and working condition semantic labels are attached to each feature dimension to form a robust feature index table with physical semantic labels, which is used to support the physical interpretation capability of the robust subspace.

[0098] Through the above screening and normalization processes, the joint feature mapping matrix of the previous step is transformed into a set of feature components that maintain a consistent response under semantic perturbation, thereby constructing a robust subspace that characterizes the basic operating state of the device and achieving a causal feature separation effect that prioritizes stability.

[0099] For example, in the high-speed start-stop condition of a sewing machine on a garment production line, the robustness scores of dimensions 5, 12, and 19 in the joint feature mapping matrix are 0.92, 0.88, and 0.95, respectively, with a preset robustness threshold of 0.85. Threshold comparisons are performed on these dimensions, generating a mask matrix where the corresponding position has a value of 1, and the remaining dimensions below the threshold have a value of 0. After element-wise multiplication of the mask, the filtered matrix contains only the three highly robust dimensions mentioned above. Column normalization is performed on this set, adjusting the feature value range to [0,1], and sensor location labels such as "sewing machine spindle vibration sensor" and "sewing machine current monitoring module" are added, along with the working condition semantic label "high-speed start-stop". In this scenario, the feature vector output based on the robust subspace is completely consistent with the equipment state before the fault occurred, ensuring the independence and accuracy of subsequent causal subspace extraction, and significantly improving the identification quality of stable features during fault tracing.

[0100] S4.4: Perform significant clustering on the high-sensitivity dimensions in the joint feature mapping matrix according to the causal activation threshold to identify the set of feature components that are activated only under a specific fault label and construct a causal subspace for characterizing the deep causal mechanism of the fault.

[0101] When performing significant clustering on the high-sensitivity dimensions of the joint feature mapping matrix based on the causal activation threshold generated by S4.2, the input matrix is ​​limited to a multidimensional tensor containing the fusion of perturbation robustness score and semantic sensitivity vector. This multidimensional tensor is initially screened according to the causal activation threshold, filtering out feature dimensions with sensitivity below the threshold to construct a candidate sensitive feature set. A multi-center clustering operation based on similarity metrics is performed on the candidate sensitive feature set. The similarity metric is set as a dual-index function of weighted summation of Euclidean distance and cosine similarity, and feature vector normalization ensures a unified metric space. The center vectors of each cluster are dynamically updated during the clustering process. An iterative k-means algorithm or hierarchical clustering algorithm is used to minimize intra-cluster variance, and clusters with insufficient correlation to fault condition labels are removed after each iteration using specific fault label matching rules. Intra-cluster significance verification is performed on the retained highly correlated clusters. A significance index is calculated based on the average sensitivity of each feature within the cluster and the cross-cluster difference. Cross-cluster significance is calculated using the following formula: in, Denotes the set of feature sensitivity samples within the i-th cluster. For mean value operator, For standard deviation operator, This represents the feature set excluding cluster i. Intra-cluster feature dimensions with significance indices exceeding a set fault significance threshold are integrated into a causal subspace feature component set. Through the aforementioned significant clustering and validation processes, the high-sensitivity dimensions in the joint feature mapping matrix from the previous step are transformed into a causal feature set that is activated only under a specific fault label, thus achieving a structured representation of the deep causal mechanism of the fault.

[0102] For example, in a high-speed start-stop fault scenario of a sewing machine on a garment production line, the joint feature mapping matrix contains 512-dimensional feature vectors, each corresponding to multi-source heterogeneous signal features from different sensors. The causal activation threshold is set to 0.75, and after initial screening, the number of remaining high-sensitivity feature dimensions is 96. The clustering process uses the k-means algorithm, with a cluster size of 4, a similarity metric weight ratio of 0.6 (Euclidean distance):0.4 (cosine similarity), and an upper limit of 50 iterations. Two clusters with low correlation are removed through fault label matching, and the significance index of each feature dimension in the remaining two clusters is... The calculated values ​​were 1.92 and 1.87, respectively, both higher than the set significance threshold of 1.5. The final selected causal subspace feature component set contains 48 dimensions, covering the high-frequency components of vibration acceleration features, current waveform peak values, and temperature change rate features. The output causal subspace can accurately characterize the deep causal mechanism of the equipment under the high-speed start-stop fault. During the verification process, the coherence of the fault judgment interpretation chain was significantly improved, supporting subsequent counterfactual reasoning accuracy optimization.

[0103] S4.5: Perform orthogonality constraint optimization operation based on the robust subspace and the causal subspace to eliminate feature redundancy coupling between the two subspaces and output decoupled feature representation vectors with clear physical semantic boundaries, thereby completing the causal structure reconstruction of the high-dimensional feature space.

[0104] Based on the previously constructed feature vector matrices of the robust and causal subspaces, both are used as inputs for orthogonality constraint optimization to perform cross-space redundancy coupling detection, identifying feature pairs with high correlation coefficients. Covariance matrix decomposition is applied to the detected feature pair sets to extract correlation weights between dimensions, and a feature redundancy mask matrix is ​​generated based on these weights for subsequent reduction processing. Feature weight normalization is performed on the redundancy mask matrix to ensure a unified metric for features in different subspaces during optimization and to avoid weight drift. Orthogonal projection transformation is used to project the causal subspace feature vectors onto the basis vectors of the robust subspace, and the projection overlap is determined by calculating the residual vector, using the following formula: in, For causal subspace eigenvectors, These are the basis vectors of the robust subspace. The residual vectors are orthogonal. Modulus normalization is performed on the residual vectors, and an orthogonality constraint threshold based on the residual modulus is set. When the residual modulus is below this threshold, feature reconstruction deletion or rotation operations are performed to eliminate coupling. Physical semantic label binding is performed on the feature set optimized by orthogonality constraints, mapping each feature dimension to the corresponding equipment component or operating condition semantics to form a decoupled feature representation vector with clear physical semantic boundaries. Through orthogonality constraint optimization, the results of the robust subspace and causal subspace from the previous step are transformed into causal structured feature data with redundancy elimination, clear semantics, and improved interpretability, achieving causal structure reconstruction of the high-dimensional feature space.

[0105] For example, in a garment production line fault tracing scenario, the robust subspace feature matrix output by the dual-branch feature coding network is 100×50 in size, and the causal subspace feature matrix is ​​100×20 in size. When detecting redundant feature pairs, the Pearson correlation coefficient is calculated, and a redundancy threshold of 0.85 is set, resulting in a high-value element ratio of 15% in the redundancy mask matrix. The mask matrix is ​​then normalized to adjust the weight range to 0–1. Let the robust subspace basis vectors be... Take a unit vector with a modulus of length 1, which is the eigenvector of the causal subspace. The length is 1.2, and the residual vector is calculated using the formula. Dimensions with a projection overlap below a set threshold of 0.1 were all rotated and adjusted to increase the residual modulus to above 0.3, thus satisfying the orthogonality constraint. After optimization, the adjusted robust subspace and causal subspace features were respectively bound to physical components and working condition semantics such as "sewing machine spindle high-speed start and stop" and "cutting bed lateral positioning deviation" to form the final decoupled feature representation vector. It was verified that under different equipment models in the same batch of production, the consistency of the causal feature interpretation chain was significantly improved, and the stability of the diagnostic report was significantly enhanced.

[0106] Step S5: Freeze the network parameters corresponding to the robust subspace, fine-tune the causal subspace according to its response state under a specific fault label, and generate a counterfactual feature vector by removing or zeroing the activation response of the causal subspace. Specifically, this includes: S5.1: Obtain the robust subspace parameter matrix and causal subspace activation vector output by the causal feature decoupling layer, lock the corresponding causal subspace index based on the currently identified specific fault label, and generate the target causal feature set and static robust parameter snapshot to be processed.

[0107] It should be noted that the causal subspace refers to a high-dimensional subspace composed of feature dimensions whose activation intensity in the semantic sensitivity vector is higher than a preset threshold (e.g., 0.70). Features in this subspace are significantly activated only under specific fault modes, reflecting the deep causal mechanism of the fault. The robust subspace refers to a high-dimensional subspace composed of feature dimensions whose perturbation robustness score is higher than a preset threshold (e.g., 0.75). Features in this subspace are insensitive to semantic perturbations and maintain consistent response under different operating conditions, reflecting the basic operating state of the equipment.

[0108] Based on the decoupled feature representation vector output by the causal feature decoupling layer, this step receives dual-path output data containing a robust subspace parameter matrix and causal subspace activation vectors as input. An index mapping operation is performed on the robust subspace parameter matrix, mapping feature dimensions one-to-one with physical component locations to establish a location information lookup table for the parameter matrix. Fault label matching is performed on the causal subspace activation vectors, matching the maximum likelihood category in the current fault category probability distribution with a pre-stored fault mode semantic index library to locate the corresponding fault label number. Based on the fault label number, the causal subspace index extraction function is called to filter out the feature index set significantly activated under the fault label from the high-sensitivity dimension set of the causal subspace, constructing a data container for the target causal feature set. A static snapshot generation operation is performed on the robust subspace parameter matrix, completely saving the current network weights to a structured snapshot file in a gradient-free update state, ensuring that subsequent freeze operations can accurately restore to the current baseline state. Through the above processing, the causal feature decoupling result of the previous step is transformed into a target causal feature set with a clear fault label mapping and a static robust parameter snapshot, realizing the data structure construction and parameter baseline locking in the causal blocking preparation stage.

[0109] For example, in the high-speed start-stop fault mode of a sewing machine on a garment production line, the robust subspace parameter matrix output by the causal feature decoupling layer is a 128×64 weight matrix, and the causal subspace activation vector is 64-dimensional. A lookup table of the 64-dimensional parameters and the location information of each component of the sewing machine is established through index mapping. The current fault label number is 3, which is located to the high-speed start-stop mode by the matching module, and the corresponding causal sensitivity threshold is set to 0.85. The causal index extraction function is called to filter out feature indices with a sensitivity ≥0.85 under this label, totaling 12 dimensions, forming the target causal feature set. A snapshot is generated on the 128×64 robust parameter matrix, forming a static robust parameter snapshot file of approximately 512KB, which can be used for subsequent freeze and restore operations. In this embodiment, the target causal feature set and the robust parameter snapshot together constitute the input data source for subsequent causal blocking topology construction. Verification shows that after freezing the robust parameters and blocking the gradient update of the target causal features, the inference model can significantly reconstruct the counterfactual feature vector, improving the stability of fault attribution strength calculation.

[0110] S5.2: A parameter masking mechanism is constructed using the target causal feature set and static robust parameter snapshots. The robust subspace connection weights in the dual-branch feature encoding network are frozen, and the gradient update path of the target causal feature set is set to zero, so as to generate a semi-fixed neural network topology with causal blocking characteristics.

[0111] Based on the target causal feature set to be processed and a snapshot of static robust parameters, a parameter mask matrix for feature isolation is constructed. Hard freezing is applied to the connection weights of the robust subspace within the dual-branch feature encoding network to block their gradient propagation paths. The target causal feature set is mapped as a gradient suppression identifier vector in the network weight index space. Zero-value gradient nodes are injected into the backpropagation computation graph to zero out the update paths for specified causal response dimensions. The frozen robust subspace weight matrix undergoes sparsification preprocessing, removing weights with high correlation coefficients to the target causal feature set to further reduce the risk of causal coupling. A semi-fixed weight construction strategy is adopted to separate frozen weights from trainable weights at the topological level. The update range of trainable weights is controlled by the parameter mask matrix to ensure that the causal blocking mechanism only applies to the feature paths corresponding to the target causal index. Using the above mask control mechanism, a data flow topology with both causal response masking and robust subspace freezing characteristics is generated as the network structure input for the subsequent counterfactual feature vector inference stage. By constructing and freezing parameters, the feature indexing results from the previous step are transformed into a semi-fixed neural network topology with causal blocking properties and robust subspace parameter staticization, thereby achieving the expected technical effect of controlling causal variables to participate in the inference process.

[0112] S5.3: Based on a semi-fixed neural network topology, the original time-series signal perturbation sample set is input, and only a small number of iterations are performed on the remaining parameters of the non-target causal subspace for lightweight fine-tuning training to generate counterfactual intermediate state feature representations that adapt to the background noise distribution but lack specific causal responses.

[0113] The input conditions are a semi-fixed neural network topology with causal blocking characteristics generated by S5.2, and the original time-series signal perturbation sample set constructed by S2.5.

[0114] The perturbation sample set is loaded into the input layer of the semi-fixed neural network, the gradient update path corresponding to the target causal subspace is kept in a zero state, and forward propagation is performed under the condition that the connection weights of the robust subspace are completely frozen to initialize the basic weight distribution of the non-target causal subspace.

[0115] Based on the initial weight distribution, a lightweight fine-tuning training routine is called, setting the number of iterations to be less than a predetermined upper limit and the learning rate to be lower than the learning rate of the original training stage of the robust subspace, so as to ensure that only the remaining parameters of the non-target causal subspace are updated by a limited amount.

[0116] During the lightweight fine-tuning process, the mean squared error loss function is used to evaluate the difference between the model output and the preset background noise distribution label. The gradient backpropagation mechanism is used to update only the unfrozen parameter set to prevent the reactivation of the causal response path.

[0117] After each iteration, a stability test is performed to calculate the probability divergence between the non-target causal subspace feature map and the background noise distribution. If the divergence value exceeds a set threshold, the fine-tuning step size is adjusted to balance the dual constraints of feature adaptation and causal blocking.

[0118] By using lightweight fine-tuning training, the non-target causal subspace weights of the semi-fixed neural network are mapped to a state that better fits the background noise distribution, while maintaining the absence of specific causal responses. The output forms a counterfactual intermediate state feature representation that adapts to the background noise distribution but lacks specific causal responses, thus realizing the intermediate data base required for counterfactual reasoning.

[0119] S5.4: Based on the counterfactual intermediate state feature representation, forward inference calculation is performed through the classification decision head to simulate the model output probability distribution under the influence of a specific causal subspace, so as to generate a counterfactual feature vector representing the change in system behavior after the assumption of removing the causal response.

[0120] Based on the counterfactual intermediate state feature representation generated by the lightweight fine-tuning stage, the forward inference engine of the fault classification decision network is invoked, and the feature representation is directly input into the neural computing unit of the classification decision head to perform classification path activation computation that does not contain specific causal subspace responses.

[0121] Inside the decision head, a multi-layer fully connected weight matrix is ​​used to perform layer-by-layer linear mapping and non-linear activation operations on the counterfactual intermediate features, ensuring that the ability to adapt to the background noise distribution is maintained even when the target causal features are missing.

[0122] For the output layer, the softmax normalization function is applied to perform probability transformation on the original score vector of each fault category, so as to obtain the probability of each category occurring under counterfactual input. After the softmax probability is generated, the normalization filtering module is called to perform numerical stability test on the probability vector, filter out extreme probability values ​​caused by gradient vanishing, and ensure the physical rationality of the output distribution.

[0123] The filtered probability distribution vector is stored in the system's counterfactual feature vector buffer, establishing a timestamp mapping relationship with the original complete model output, providing synchronized data reference for subsequent differential comparison.

[0124] By using forward computation and normalization, the counterfactual intermediate features formed during the lightweight fine-tuning stage are transformed into counterfactual feature vectors that can characterize changes in system behavior after removing a specific causal response, thus achieving quantitative preparation for causal contribution.

[0125] For example, in a production line dataset containing high-speed start-stop faults of sewing machines, the counterfactual intermediate state feature representation has a dimension of 128, and is processed by the first layer of the fully connected weight matrix of the decision head (size 128×64, weight range [...]). After mapping to [0.5, 0.5], a 64-dimensional hidden vector is obtained, and ReLU function is used for nonlinear activation. The second layer fully connected weight matrix (size 64×5) generates the original scores for 5 fault categories, where the sewing machine high-speed start-stop category has a score of 2.35, the cutting bed positioning deviation has a score of 1.20, the ironing unit temperature control instability has a score of 0.85, and the other two categories have scores of 0.40 and 0.25, respectively. After applying softmax normalization, the counterfactual probability of the sewing machine high-speed start-stop category is 0.46, which is significantly lower than the original model output of 0.78. The threshold of the normalization filter module is set to 0.05 to remove the minimum fluctuations in the probability of the cutting bed positioning deviation category, retaining the four categories with high physical credibility. The finally generated counterfactual feature vector accurately reflects the impact of target causal subspace removal on the diagnostic results in this scenario, providing a stable data basis for subsequent attribution strength quantification.

[0126] S5.5: Integrate the counterfactual feature vectors with the original complete model output probability distribution for differential comparison analysis, extract the probability drift caused by the missing specific causal subspace, and generate a counterfactual feature vector dataset for quantifying the strength of fault attribution.

[0127] Based on the generated counterfactual feature vector and the original complete model output probability distribution vector, a unit-by-unit differencing operation is performed on the output differences of the same fault category under different causal subspace states, mapping the differencing results to a probability drift matrix. The probability drift matrix is ​​then grouped and summarized using feature dimensions, aggregating the drift quantities corresponding to the same causal subspace into corresponding drift quantum sequences to maintain spatial consistency in causal attribution analysis. Statistical amplitude calculations are performed on the drift quantum sequences, and quantitative indicators of fault discrimination confidence changes are extracted using absolute value summation or sum of squares methods. The calculated drift metrics are normalized and scaled to convert the drift distributions across different fault categories into attribution strength scores on a uniform scale, facilitating subsequent cross-category comparative analysis. The normalized drift scores are then concatenated with the original probability distribution vector to form a comprehensive data tensor containing diagnostic probabilities and drift characteristics. This tensor is then rearranged according to the causal subspace index order, creating a counterfactual feature vector dataset. Through the aforementioned differencing, statistical, normalization, and concatenation processes, the counterfactual feature vectors from the previous step are transformed into a counterfactual feature vector dataset suitable for quantitative analysis, enabling precise quantification of the impact of missing values ​​in specific causal subspaces.

[0128] Step S6: Calculate the change using the counterfactual feature vector and the output probability distribution of the fault classifier to generate an attribution strength index. Specifically, this includes: S6.1: Obtain the causal subspace response vector and counterfactual feature vector data after freezing the robust subspace parameters generated in the previous steps. Perform zero-value replacement processing on the causal subspace dimension in the original high-dimensional feature space based on the feature masking suppression algorithm to construct the counterfactual input feature tensor simulating the causal path blocking state.

[0129] It should be noted that the counterfactual feature vector refers to the feature vector obtained by fine-tuning the causal subspace based on its response state under a specific fault label after freezing the network parameters corresponding to the robust subspace, removing or zeroing the activation responses of the causal subspace, and then inputting the processed features into the fault classifier. The attribution strength index refers to the value obtained by inputting the counterfactual feature vector into the fault classifier to obtain the counterfactual probability distribution, calculating the change between this distribution and the original probability distribution (such as KL divergence or Euclidean distance), and then normalizing it. The value ranges from [0,1], and a larger value indicates a greater contribution of the causal subspace to the current fault determination result.

[0130] It should be noted that the fault classifier is a classification module connected to the output of the dual-branch feature coding network. It consists of two fully connected layers (with 128 neurons and the number of fault categories, respectively) and a Softmax activation function. Its input is the feature vector output by the dual-branch coding network, and its output is the probability distribution of each type of fault (denoted as the original probability distribution).

[0131] Based on the causal subspace response vector and counterfactual feature vector data generated in the previous steps after freezing robust subspace parameters, these are selected as the input objects for this sub-step. The causal subspace response vector is parsed into a set of feature dimension indices in a high-dimensional feature space coordinate system, which serves as the target of the feature masking suppression algorithm. Feature dimension matching processing is performed on the original high-dimensional feature space matrix to establish a one-to-one mapping relationship between the causal subspace dimensions and the column indices of the feature matrix, ensuring the accurate positioning of the mask application. A zero-value replacement rule is constructed in the feature masking suppression algorithm, setting all column elements containing the locked causal subspace dimensions to zero, forming an intermediate feature matrix without the corresponding causal feature response. Consistency checks are performed on the intermediate feature matrix to verify the dimensional integrity and numerical validity of the matrix after zero-value processing, avoiding calculation errors introduced by index offsets or numerical anomalies. The intermediate feature matrix after zero-value replacement processing is concatenated with the counterfactual feature vector data to generate a counterfactual input feature tensor simulating the causal path blocking state, which serves as the direct input for subsequent inference steps. By combining zero-value replacement with masking suppression, the causal subspace response vector from the previous step is transformed into a counterfactual input feature tensor that can be recognized by the inference network, thereby achieving an accurate simulation of the causal path blocking effect.

[0132] For example, in the process of tracing the source of equipment failure on a garment production line, the causal subspace response vector output by the causal feature decoupling layer is obtained. Let the original high-dimensional feature space matrix be F, with a dimension size of 100×256, where 256 is the total number of feature dimensions. Assuming that the currently locked set of causal subspace dimension indices is {12,58,203}, after executing the masking suppression algorithm, all elements in the corresponding three columns of the feature matrix F are replaced with zero values.

[0133] After replacement and verification, the data in the causal dimension of the matrix is ​​completely cleared to zero, thereby generating a counterfactual input tensor that blocks the causal path. Its dimension remains consistent with the original feature matrix. Inputting this tensor into the subsequent fault classification decision network will cause the model to be no longer affected by these causal features, thereby significantly improving the accuracy and interpretability of the attribution strength index calculation.

[0134] S6.2: Receive the counterfactual input feature tensor and input it into the fault classification decision network that has been lightly fine-tuned. Perform virtual inference operation without the participation of causal subspace based on the forward propagation inference mechanism to output the counterfactual fault category probability distribution vector after removing specific causal factors from the representation hypothesis.

[0135] After receiving the constructed counterfactual input feature tensor, it is loaded into the input layer of the fault classification decision network that has been trained with lightweight fine-tuning, ensuring that the tensor maintains the same dimensional arrangement and numerical encoding range as the original model when input.

[0136] The input tensor is processed by the feature extraction part of the network, and the non-causal feature dimensions are represented by a convolutional kernel with frozen robust subspace parameters and a fully connected unit, generating an intermediate feature matrix without the participation of a causal subspace.

[0137] The intermediate feature matrix is ​​passed to the classification decision head, and the output score of each fault category is calculated based on the forward propagation inference mechanism. During this process, the gradient is kept blocked in the causal subspace dimension so that the inference result only reflects the combined effect of background and non-causal features.

[0138] The original score vector generated by the classification decision head is normalized and then transformed into a fault category probability distribution using a Softmax transformation to form a counterfactual prediction result under the assumption that specific causal factors are removed.

[0139] The aforementioned counterfactual fault category probability distribution vectors are cached in the output data structure for subsequent probability divergence calculation and attribution strength assessment. By processing the counterfactual input feature tensor through a lightly tuned classification network forward inference, the input data, which originally contained causal factors, is transformed into a probability distribution vector that does not contain the influence of that causal path, thus achieving quantifiable separation of the contribution of a single causal path.

[0140] For example, the counterfactual input feature tensor is configured as a high-dimensional vector of length 512, where the causal subspace has 64 dimensions, all of which have been zeroed out, while the non-causal dimensions retain their perturbed weights. This vector is input into a lightweight, fine-tuned three-layer convolutional + two-layer fully connected fault classification network. The convolutional kernel sizes are 3×3, 5×5, and 3×3, with 32, 64, and 128 channels respectively. The fully connected layers output 256 nodes and 10 fault categories. During forward inference, the counterfactual probability distribution is calculated using Softmax. in For the first The output score for each fault category is calculated, with the denominator being the sum of the score indices for all fault categories. Taking a batch of "cutting bed positioning deviation" faults as an example, after removing the corresponding causal subspace, the category with the highest probability becomes "sewing machine high-speed start-stop," and the predicted probability of the original fault category decreases from 0.78 to 0.41, significantly improving the detection rate of changes in causal contribution and providing an accurate data foundation for subsequent quantitative evaluation.

[0141] S6.3: Retrieve the original fault category probability distribution vector and the counterfactual fault category probability distribution vector of the original model in the undisturbed state, and perform a difference measurement operation between the two based on the probability divergence calculation algorithm to generate a scalar sequence of probability offsets that characterize the change in diagnostic confidence caused by the missing causal subspace.

[0142] S6.4: Based on the mapping relationship between the probability offset scalar sequence and the semantic sensitivity vector of each causal subspace, perform multi-dimensional contribution aggregation processing based on the normalized weighted fusion strategy to generate an attribution strength index array that quantifies the specific contribution of each causal subspace to the current fault judgment result.

[0143] S6.5: Integrate the attribution strength index array with the corresponding device component mapping labels, and perform causal interpretation chain metadata assembly operation based on the structured data encapsulation protocol to output a fault report data stream containing fault classification results and attribution strength ranking of each causal subspace.

[0144] The process involves: acquiring the attribution strength index array generated in the previous steps and the corresponding equipment component mapping label data; establishing a unique equipment component label index relationship for each element in the attribution strength index array; embedding this index relationship into the corresponding node of the encapsulated metadata using a predefined field template from the structured data encapsulation protocol; sorting the attribution strength field in the encapsulated metadata, rearranging the elements in descending order of attribution strength value, and generating a causal subspace sorting list based on contribution; performing bidirectional association matching between the sorted list and the equipment component mapping information to ensure that each causal subspace entry in the sorted list carries the physical component name and operating condition semantic description; calculating the combined index structure of the fault classification result and the sorted list, and constructing the mapping data between fault categories and corresponding causal subspace chains through nested mapping tables; embedding the fault classification result, sorted list, physical component information, and operating condition semantic description into a unified causal explanation chain data structure, and serializing it into a fault report data stream conforming to the transmission specifications according to protocol rules; and confirming the integrity of the data stream and the correctness of the fields through a link verification algorithm to achieve structured output of attribution information and fault diagnosis results. By assembling and encapsulating structured data, the attribution strength index from the previous step is transformed into a fault report that includes fault classification results and causal subspace contribution ranking, thereby enhancing interpretability and achieving data closure for fault tracing in apparel equipment.

[0145] For example, in the fault tracing and diagnosis of a garment production line, the input attribution strength index array contains contribution values ​​of 12 causal subspaces, ranging from 0.12 to 0.87. The equipment component mapping labels cover three key components: the sewing machine needle feed mechanism, the cutting bed positioning system, and the ironing unit temperature control module. After sorting the attribution strength, the highest contribution value is found in the needle feed mechanism subspace, with a value of 0.87. The remaining values ​​are 0.65 for the cutting bed positioning subspace and 0.54 for the temperature control module subspace. After matching the sorted list with the component mapping table, three causal chains are formed. The fault classification result is a high-speed start-stop fault, and the combined index structure displays the joint causal chain of the needle feed mechanism and the cutting bed positioning system corresponding to this fault. The encapsulation protocol template definition fields include four categories: "fault_class", "causal_chain", "component_label", and "semantic_description", which store the fault category, the list of causal subspaces sorted from high to low, the physical component name, and the corresponding working condition semantic information, respectively. The final fault report data stream is output through the transmission protocol. The consistency verification between the attribution strength value of the causal chain of the needle-feeding mechanism and the fault category association field in the message is successful. The report can intuitively display the contribution ranking of each causal subspace, the corresponding physical components and operating condition descriptions on the operation and maintenance terminal, enabling operation and maintenance personnel to quickly locate the source of the fault and significantly improving the clarity and credibility of the fault attribution explanation.

[0146] Step S7: Combine the attribution strength index and the fault category probability to perform a fusion judgment and generate a fault report. Specifically, this includes: S7.1: Obtain the attribution strength index array and the original fault category probability distribution vector output from the previous steps, and perform tensor concatenation and normalization on the two based on the weighted confidence fusion algorithm to generate a comprehensive discrimination score matrix that characterizes the probability of occurrence of each fault mode and the strength of its causal support.

[0147] S7.2: Receive the comprehensive discrimination score matrix and combine it with the pre-stored perturbation semantic label matching degree data. Use the multi-objective decision ranking mechanism to perform threshold truncation and priority rearrangement operations to filter out the target fault category with the highest causal confidence and lock the corresponding key causal subspace index set.

[0148] Based on the comprehensive discrimination score matrix generated in the previous steps and the pre-stored perturbation semantic label matching degree data, the two are paired at the matrix level according to structured indexing rules to establish a bidirectional mapping table between each fault category score unit and its corresponding matching degree coefficient. Multi-objective scoring vector construction processing is performed on the bidirectional mapping table, multiplying the fault category probability component and the causal support strength component element-wise according to their matching degree coefficients to form a fused target scoring matrix. Threshold truncation is applied to the target scoring matrix using a multi-objective decision ranking mechanism. The truncation threshold is set based on the global mean plus a multiple of the standard deviation of the fused scoring matrix, calculated using the following formula: in, To integrate the mean of the elements of the rating matrix, To integrate the standard deviations of the scoring matrix elements, Set a multiplier for experience. Ratings below a threshold will be penalized. The fault category labels are removed, and only those with scores above the threshold are retained. The remaining candidate fault categories are then processed. A priority reordering operation is performed on the score vectors of these candidate fault categories. The reordering rule is based on a weighted sum of multidimensional attribution strength indices, with weights determined jointly by the causal subspace contribution data and perturbation matching data obtained in previous steps. The fault category with the highest priority is labeled as the target fault category, and the key causal subspace index set for this category in the causal explanation chain is simultaneously locked. Through the above multi-objective decision ranking, threshold truncation, and priority reordering processing, the comprehensive judgment result of the previous step is transformed into a target fault category with clear causal confidence and its corresponding causal subspace index, achieving an integrated output of fault category screening and key causal feature localization.

[0149] For example, in the scenario of high-speed start-stop fault detection of sewing machines on a garment production line, the comprehensive discrimination score matrix contains scores for 10 fault categories, with the perturbation semantic label matching degree data ranging from 0.65 to 0.92. The mean μ of the fusion score matrix is ​​calculated to be 0.78, the standard deviation σ to be 0.05, and the multiplier k is set to 1.2, resulting in a threshold T of 0.78 + 1.2 × 0.05 = 0.84. Fault categories with scores below 0.84 are removed, leaving 3 candidate categories. The candidate category score vectors are prioritized and rearranged, and a weighted sum is performed based on a causal subspace contribution weight of 0.4 and a perturbation matching degree weight of 0.6. The high-speed start-stop fault category has the highest score and is thus identified as the target fault category. The corresponding causal subspace index set is locked in the spindle control signal feature dimension and the speed adjustment feedback signal feature dimension. The output results are verified in the same batch of production to stably match faulty parts and significantly improve positioning accuracy.

[0150] S7.3: Based on the key causal subspace index set, retrieve the equipment component mapping relationship library, perform semantic association backtracking processing to extract the physical component name and operating condition semantic description information corresponding to the activated causal features, and generate a preliminary explanation metadata stream containing specific fault location and cause description.

[0151] S7.4: Perform logical chain assembly processing on the preliminary explanation metadata stream and the target fault category, and use the structured report generation engine to integrate discrete probability values, attribution strength ranking and physical component mapping information into a structured causal explanation chain document object with causal deduction logic.

[0152] S7.5: Perform the final encapsulation operation based on the structured causal explanation chain document object, merge the fault classification results, the contribution ranking list of each causal subspace, and the complete causal derivation path into a fault report data stream for operation and maintenance personnel, and complete the closed-loop transformation from data reasoning to decision support.

[0153] Metadata field mapping verification is performed on the structured causal explanation chain document object. The field name consistency between the fault classification result entries and the attribution strength index array is verified, and a mapping index table is established to ensure that data references are unambiguous in the subsequent encapsulation process.

[0154] The attribution strength index array is formatted according to the causal subspace index order. The original floating-point numbers are uniformly converted into a standard numerical format that meets the accuracy of the report display using fixed-point decimal encoding, and the corresponding encapsulated records are updated in the index table.

[0155] The entries of the causal deduction path are logically ordered and encoded. A directed sequence label generation mechanism is used to attach a unique temporal identifier to each deduction step, so as to realize the sequential visualization and fast retrieval function of the deduction chain in the report document.

[0156] Multi-protocol data fusion processing is performed on the fault classification results, attribution strength index list and causal derivation path after precision formatting and sequential encoding. Based on the structured data encapsulation protocol, each data field is arranged into a JSON hierarchical structure, table blocks and text description blocks to ensure that the output data stream has consistent decoding capability on different display terminals and reporting systems.

[0157] The encapsulated data object is compressed and verified. The integrity of the encapsulation is detected by using CRC redundancy check code. Version identifier and timestamp information are added to the header of the data stream so that the diagnostic report can be retained for a long time, version traced and time series analyzed on the operation and maintenance terminal.

[0158] By encapsulating verification and multi-domain data fusion processing, the structured causal explanation chain document object generated in the previous step is transformed into a fault report data stream with version management, cross-platform display and logical consistency assurance, realizing a closed-loop transformation from causal reasoning to decision support for operation and maintenance personnel.

[0159] For example, in the fault tracing analysis of a garment production line, the input structured causal explanation chain document object includes the fault classification result "ironing unit temperature control instability", an attribution strength index array of length 8, with each index corresponding to a value range of 0.142~0.876, and a causal derivation path containing 5 derivation steps. For the attribution strength index array, the display precision is set to three decimal places. The original value 0.876 is formatted to 0.876, and the original value 0.142 is formatted to 0.142, and updated in the index table. The derivation path steps are sequentially encoded using directed sequence labels "T1" to "T5" corresponding to five logical nodes, ensuring the chain in the report is displayed sequentially. The encapsulation protocol uses a layered JSON mode, with the classification result field placed under the "fault_category" key, the attribution strength index list under the "causal_strength_list" key, and the derivation path chain under the "causal_chain" key, ensuring that all three types of data can be correctly decoded on different clients. A redundancy check code CRC=305419896 is generated using CRC32, and a version identifier "v1.2" and a timestamp TS=20240615 are appended to the data stream header. After being loaded on the operations and maintenance terminal, this fault report can display the fault category, contribution ranking, and causal reasoning chain across platforms. Furthermore, the version identifier and timestamp support comparison with historical versions of the report and time series trend analysis, significantly improving the traceability of causal explanation results and their decision-making reference value.

[0160] Step S8: Dynamically update the cross-sample consistency constraint threshold of the causal subspace based on the structured causal explanation chain in the fault report to achieve adaptive model optimization for newly emerging fault modes. Specifically, this includes: S8.1: Obtain the structured causal explanation chain in the fault report, extract the attribution strength index sequence and perturbation semantic label matching degree data corresponding to each causal subspace, and use it as the original input basis for threshold update.

[0161] S8.2: Calculate the cross-sample response dispersion based on the attribution strength index sequence, and use the sliding window statistical algorithm to analyze the fluctuation range of the causal subspace activation state between different production batches under the same fault mode, and generate confidence interval boundary values ​​that characterize the stability of the current model.

[0162] S8.3: Construct a dynamic penalty function based on the confidence interval boundary value and the perturbation semantic label matching degree data, apply nonlinear suppression weights to the abnormal causal feature dimensions with matching degree lower than the preset safety threshold, and generate a temporary constraint benchmark vector after deviation correction.

[0163] S8.4: Utilize the temporary constraint reference vector to perform gradient backpropagation update operation, adjust the discriminant hyperplane parameters used to divide the robust subspace and causal subspace in the causal feature decoupling layer, and output the updated cross-sample consistency constraint threshold set.

[0164] S8.5: Based on the updated cross-sample consistency constraint threshold set, reconstruct the causal subspace screening logic, incorporate the newly generated high-sensitivity feature dimensions into the causal subspace management scope, and complete the model adaptive optimization closed loop for newly emerging fault modes.

[0165] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.

[0166] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," "third," and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, "an" or "a" and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms "comprising" or "including" and similar terms mean that the elements or objects preceding "comprising" or "including" encompass the elements or objects listed following "comprising" or "including" and their equivalents, and do not exclude other elements or objects. The "multiple" involved in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.

[0167] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for tracing and analyzing equipment failures in a garment production line, specifically including: S1: Obtain the original time-series signal and combine it with the semantic labels of typical operating conditions of the equipment to generate a time-semantic label sequence, and construct a synchronous normalized dataset; S2: Based on the synchronous normalized dataset and the time-semantic label sequence, a semantically aligned local perturbation is applied to the original time-series signal using a fault semantic perturbation device to generate a perturbation sample set; S3: Input the disturbance sample set into the dual-branch feature coding network, wherein the main branch learns the original signal representation, the disturbance sensing branch calculates the difference gradient before and after the disturbance, and generates a disturbance robustness score and semantic sensitivity vector based on the output of the main branch and the disturbance sensing branch. The output of the dual-branch feature coding network is connected to the fault classifier to output the fault category probability distribution, denoted as the original probability distribution. S4: Perform causal feature decoupling based on the perturbation robustness score and the semantic sensitivity vector, and divide the feature space into a robust subspace and a causal subspace; S5: Freeze the network parameters corresponding to the robust subspace, fine-tune the causal subspace according to the response state of the causal subspace under a specific fault label, and generate a counterfactual feature vector by removing or zeroing the activation response of the causal subspace. S6: Calculate the change using the counterfactual feature vector and the output probability distribution of the fault classifier, and generate an attribution strength index; S7: Combine the attribution strength index and the fault category probability to make a fusion judgment and generate a fault report.

2. The method for tracing and analyzing equipment failures in a garment production line according to claim 1, characterized in that, Step S7 is followed by step S8, which specifically includes: S8: Dynamically update the cross-sample consistency constraint threshold of the causal subspace based on the structured causal explanation chain in the fault report to achieve adaptive optimization of the model for newly emerging fault modes.

3. The method for tracing and analyzing equipment failures in a garment production line according to claim 1, characterized in that, Step S2 specifically includes: Based on the working condition semantic tags in the time-semantic tag sequence, semantic boundary localization processing is performed on the original time-series signal to extract key time window segments; A semantic perturbation parameter space is constructed using the key time window segment, and a nonlinear mapping transformation is performed on the signal amplitude and frequency components within the key time window segment to generate an initial perturbation vector set. Based on the initial perturbation vector set and the synchronous normalized dataset, an adaptive weight superposition algorithm is used to apply semantically aligned local perturbation processing to the original time series signal to construct an intermediate perturbation signal sequence that reflects the response characteristics of the device under micro-perturbation conditions. The intermediate disturbance signal sequence is subjected to causal consistency verification processing to remove abnormal samples that cause the physical meaning of the signal to fail due to excessive disturbance intensity, and to select a subset of valid disturbance signals that meet the physical constraints of equipment operation. The perturbation sample set is generated by performing a pairing and recombination operation based on the effective perturbation signal subset and the synchronization normalized dataset.

4. The method for tracing and analyzing equipment failures in a garment production line according to claim 1, characterized in that, Step S3 specifically includes: The original time-series signals in the disturbance sample set are processed by convolutional kernel mapping, and a basic time-frequency feature map containing the device operating status is extracted using a convolutional neural network with shared weights, which serves as the initial representation data for the main branch. Based on the aforementioned basic time-frequency feature map and the disturbance time-series signal processed by the fault semantic disturbance generator, differential operation is performed to calculate the difference gradient matrix of the feature response before and after the disturbance using the gradient backpropagation mechanism, which serves as the input data for the disturbance sensing branch. The difference gradient matrix is ​​normalized using norm, and statistical distribution analysis is used to quantify the fluctuation amplitude of each feature dimension under semantic perturbation, generating a perturbation robustness score vector. Based on the perturbation robustness score vector and the basic time-frequency feature map, a weighted mask fusion is performed, and an attention gating mechanism is used to filter out the feature components that respond significantly to the semantic labels of specific working conditions, thereby generating a semantic sensitivity vector. The perturbation robustness score vector and the semantic sensitivity vector are subjected to tensor concatenation and standardization, and a multi-task learning head is used to output a dual-channel encoding result containing robustness and causal sensitivity measures.

5. The method for tracing and analyzing equipment failures in a garment production line as described in claim 1, characterized in that: The original timing signal is acquired by a multi-source heterogeneous sensor, which includes a vibration acceleration sensor, a current sensor and a temperature sensor, which are respectively installed in the sewing machine, the cutting table and the ironing unit.

6. The method for tracing and analyzing equipment failures in a garment production line as described in claim 1, characterized in that, The adaptive dual-threshold segmentation algorithm calculates a robustness determination threshold based on the mean and standard deviation of the perturbation robustness score, and calculates a causal activation threshold based on the mean and standard deviation of the semantic sensitivity vector. It then uses the robustness determination threshold to select high-robustness feature dimensions to form a stable feature subspace, and uses the causal activation threshold to select high-sensitivity feature dimensions to form a causal subspace.

7. The method for tracing the source of equipment failure in a garment production line as described in claim 1 further includes orthogonal constraint operations, specifically including: The feature vectors of the causal subspace are projected onto the basis vectors of the stable feature subspace, the projection residuals are calculated, and redundant feature components that are highly correlated with the stable feature subspace are eliminated or weakened based on the magnitude of the projection residuals.

8. The method for tracing and analyzing equipment failures in a garment production line as described in claim 1, characterized in that, By freezing robust parameters through parameter masks and setting the gradient of a specific causal subspace to zero, and only fine-tuning the remaining parameters with small steps and short iterations, the counterfactual feature vector is output.

9. The method for tracing and analyzing equipment failures in a garment production line as described in claim 1, characterized in that, The attribution strength, classification probability, and semantic label matching degree are fused by weight, and the target fault and key causal explanation path are selected by threshold truncation and priority rearrangement to generate the fault report.

10. The method for tracing and analyzing equipment failures in a garment production line as described in claim 1, characterized in that, Based on the batch attribution intensity dispersion, the causal subspace consistency threshold is adjusted, and real-time backpropagation is used for optimization to enhance the diagnostic model's adaptability to new or variant faults.