A self-supervised multi-sensor fault diagnosis method and system based on semantic embedding

CN122286690BActive Publication Date: 2026-08-11SANYA SCI & EDUCATION INNOVATION PARK WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-29
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0003](1)故障标注成本高昂且数据稀缺:现有多数诊断模型依赖人工标注的故障片段完成有监督训练,而实际工业场景中,故障样本本身稀缺,人工标注不仅耗时耗力、成本极高,且标注信息易存在不完整、不准确问题,导致模型泛化能力受限;

Benefits of technology

[0030]1、本发明实施例闭集故障诊断精度高,多任务诊断性能优异。(1)仅利用正常工况数据训练,经轻量级规则优化后,五种工况下平均故障类型识别准确率从78.78%提升至91.60%,单工况最高达92.55%,大幅超越现有基线模型;(2)故障传感器通道定位性能突出,五种工况下故障窗口的平均传感器定位准确率达91.29%,单工况最高达93.69%,可实现跨传感器耦合情况下的精准定位;(3)易误判故障的区分精度显著提升,卡滞故障的平均F1分数达0.8015,缺失故障的平均F1分数达0.9176,彻底解决了物理形态相似故障的相互误判问题;(4)故障起始时刻估计精准,片段级检测的平均延迟仅为0.8~1.1秒,最大延迟不超过3.2秒,满足工业管道故障快速响应的运维需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122286690B_ABST
    Figure CN122286690B_ABST
Patent Text Reader

Abstract

This invention relates to the field of industrial equipment fault diagnosis, and provides a self-supervised multi-sensor fault diagnosis method and system based on semantic embedding. The method preprocesses raw normal operating condition monitoring data, generates a fault window through single-channel fault injection using temporal semantic embedding, and generates a supervision signal for the fault window. Features are extracted from the training sample window composed of the pure normal operating condition window and the fault window using long-term Transformer branches and short-term CNN branches. The extracted long-term and short-term features are concatenated and mapped to a shared fault feature representation. A fault attribute matrix is ​​constructed, a semantic prototype library is generated, and semantic similarity is calculated. Based on the shared fault feature representation and semantic similarity, a multi-task prediction head is constructed. Based on the multi-task prediction head and the supervision signal, a multi-task loss function is designed to train an end-to-end fault diagnosis model. Post-processing optimization is combined to correct easily misjudged fault results. Online fault diagnosis results are output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial equipment fault diagnosis technology, and in particular to a self-supervised multi-sensor fault diagnosis method and system based on semantic embedding. Background Technology

[0002] Industrial pipelines, as core infrastructure for energy transmission and resource allocation, are crucial for ensuring the safe and stable operation of industrial production. With the development of Industrial Internet of Things (IIoT) technology, multi-sensor monitoring networks have been widely deployed in industrial pipeline systems such as hydraulic pipelines. These networks simultaneously collect multi-dimensional time-series data on pressure, vibration, and flow rate to achieve real-time monitoring of equipment operating status. Multi-sensor fault diagnosis technology has become a key support for industrial pipeline condition assessment, fault early warning, and maintenance decision-making. However, existing technologies still face many bottlenecks that urgently need to be addressed in practical engineering deployments.

[0003] (1) Fault labeling is costly and data is scarce: Most existing diagnostic models rely on manually labeled fault segments to complete supervised training. However, in actual industrial scenarios, fault samples are scarce. Manual labeling is not only time-consuming and labor-intensive, but also extremely costly. Furthermore, the labeled information is prone to incompleteness and inaccuracy, which limits the generalization ability of the model.

[0004] (2) Diagnostic output cannot support actual operation and maintenance needs: Most methods only achieve window-level fault classification and only output "normal / fault" or simple fault type results. They cannot complete key tasks such as accurate fault sensor location and quantitative estimation of fault start time. The output results lack executability and are difficult to connect with fault isolation and rapid maintenance decision-making for industrial pipelines.

[0005] (3) The fault semantics are implicit, the interpretability and the ability to reject faults are poor: the fault feature representations of existing deep learning models are mostly implicit high-dimensional vectors, lacking physically interpretable fault attribute definitions, and cannot effectively distinguish the degradation modes of sensors with similar physical forms; at the same time, in open scenarios, they have no reliable ability to reject unknown fault modes that have not been seen during training, and are prone to misjudgment.

[0006] (4) Long sequence modeling is disconnected from multi-task diagnosis and lacks robustness: Fault evolution and the correlation between sensors have long time. Although long sequence modeling methods such as LSTM (Long Short-Term Memory) and Transformer model architecture have been applied, the existing technology has not achieved effective integration of long-term time-dependent modeling with sensor-level localization and fault time-series reasoning. The model has poor robustness to working condition deviation and data distribution drift and lacks cross-working condition generalization ability.

[0007] (5) The model has high computational complexity and is difficult to meet the requirements of online monitoring: Some high-precision diagnostic models adopt complex network architecture, which has high computational overhead and high inference latency, and cannot meet the real-time requirements of industrial pipeline flow monitoring, resulting in low feasibility of engineering deployment.

[0008] Existing technologies, such as deep learning-based multivariate time-series fusion diagnostic methods (e.g., cross-sensor attention mechanisms, mechanism-driven learning, and federated spatiotemporal fusion), have made some progress in feature extraction, but still fail to solve the aforementioned core problems. Unsupervised and semi-supervised detection methods, while reducing reliance on labels, suffer from significant deficiencies in the accuracy of fault type identification and sensor localization. Long sequence modeling methods have not achieved effective fusion of fault semantics and multi-task diagnosis. Therefore, there is an urgent need for a multi-sensor fault diagnosis technology suitable for industrial pipeline scenarios, which combines low label dependency, multi-task diagnosis, high interpretability, strong robustness, and low inference latency. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the prior art by proposing a self-supervised multi-sensor fault diagnosis method and system based on semantic embedding, which can realize fault type identification, fault sensor channel location, fault start time estimation, unknown fault rejection and cross-operating condition generalization diagnosis in multi-sensor scenarios of industrial pipelines.

[0010] To achieve the above objectives, the present invention adopts the following technical solution:

[0011] In a first aspect, the present invention provides a self-supervised multi-sensor fault diagnosis method based on semantic embedding, comprising the following steps:

[0012] S1. Preprocess the original normal operating condition monitoring data: time block segmentation, sliding window generation and normalization to obtain a pure normal operating condition window; based on the pure normal operating condition window, generate a fault window by single-channel fault injection with semantic embedding in the time domain, and automatically generate a supervision signal for the generated fault window. The supervision signal includes fault type label, fault sensor channel label, fault start time label and semantic attribute label corresponding to the fault type.

[0013] S2. Design a dual-branch multi-scale backbone network including a long-term Transformer branch and a short-term Convolutional Neural Network (CNN) branch. The dual-branch multi-scale backbone network extracts features from the training sample window consisting of a pure normal working condition window and a fault window. The extracted long-term temporal dependent features and short-term local transient features are concatenated to obtain fused features. The fused features are mapped to a shared fault feature representation through a shared embedded multilayer perceptron (MLP).

[0014] Based on semantic attribute learning, explicit representation and matching of fault semantics are achieved: fault attributes are defined based on the physical degradation mechanism of sensor faults, a fault attribute matrix is ​​constructed, and the attribute levels of each fault type are mapped to attribute values ​​within a preset numerical range to obtain a quantitative representation of fault semantics; the fault attribute matrix is ​​mapped to a latent semantic space to generate a semantic prototype library; based on shared fault feature representation, a predicted fault attribute vector is obtained through attribute regressor learning (the attribute regressor is a multilayer perceptron MLP), and the dimension of the predicted fault attribute vector is consistent with the dimension of the fault semantic prototype, realizing the mapping from shared fault feature representation to semantic attribute space; the semantic similarity between the predicted fault attribute vector and each fault semantic prototype in the semantic prototype library is calculated.

[0015] S3. Based on shared fault feature representation and semantic similarity, construct a multi-task prediction head, which includes a fault type prediction head, a fault sensor channel prediction head, and a fault start time prediction head, and outputs the fault type prediction result, the fault sensor channel prediction result, and the fault start time prediction result, respectively.

[0016] Based on the fault type prediction results and the fault type labels in the supervision signal, a fault type classification loss is constructed; based on the fault sensor channel prediction results and the fault sensor channel labels in the supervision signal, a fault sensor channel localization loss is constructed; based on the fault start time prediction results and the fault start time labels in the supervision signal, a start time regression loss is constructed; based on the predicted fault attribute vector and the semantic attribute labels in the supervision signal, a semantic attribute consistency loss is constructed. Based on the above losses, a multi-task loss function is designed to train the end-to-end fault diagnosis model.

[0017] S4. Construct a lightweight rule-based post-processing optimization module, deploy the trained end-to-end fault diagnosis model and the post-processing optimization module to the online monitoring system, perform windowing and normalization processing on the real-time multi-sensor streaming data, input the data into the end-to-end fault diagnosis model, and obtain preliminary prediction results for fault type identification, fault sensor channel location, and fault start time estimation. Correct easily confused preliminary fault diagnosis results through the post-processing optimization module to obtain the final online fault diagnosis result.

[0018] Secondly, the present invention provides a self-supervised multi-sensor fault diagnosis system based on semantic embedding, comprising:

[0019] The data acquisition module is used to collect multi-channel physical quantity monitoring data of industrial hydraulic pipelines, including multiple sensors;

[0020] The data preprocessing module communicates bidirectionally with the data acquisition module and is used for: time block segmentation, sliding window generation, data normalization, dataset partitioning, and outputting a standardized multivariate window dataset.

[0021] The semantic-guided fault injection module is connected to the data preprocessing module. It receives pure normal operating condition window data and is used to: automatically generate fault windows and corresponding supervision signals based on pure normal operating condition windows through single-channel fault injection with semantic embedding in the time domain. The supervision signals include fault type labels, fault sensor channel labels, fault start time labels, and semantic attribute labels corresponding to the fault type. It outputs a training dataset with complete labels.

[0022] The multi-scale feature extraction module, connected to the data preprocessing module and the semantically guided fault injection module, is used to: receive pure normal operating condition window and fault window data, design a dual-branch multi-scale backbone network including a long-term Transformer branch and a short-term convolutional neural network (CNN) branch, extract features from the training sample window composed of the pure normal operating condition window and the fault window through the dual-branch multi-scale backbone network, concatenate the extracted long-term temporal dependency features and short-term local transient features to obtain fused features, and map the fused features to a shared fault feature representation through a shared embedded multilayer perceptron (MLP).

[0023] The semantic attribute learning module, connected to the multi-scale feature extraction module, receives shared fault feature representations and is used for: defining fault attributes based on the physical degradation mechanism of sensor faults, constructing a fault attribute matrix, mapping the attribute levels of each fault type to attribute values ​​within a preset numerical range, and obtaining a quantitative representation of fault semantics; mapping the fault attribute matrix to a latent semantic space to generate a semantic prototype library; based on the shared fault feature representations, learning through an attribute regressor (a multilayer perceptron, MLP) to obtain predicted fault attribute vectors, the dimension of which is consistent with the dimension of the fault semantic prototypes, thus realizing the mapping from the shared fault feature representations to the semantic attribute space; calculating the semantic similarity between the predicted fault attribute vectors and each fault semantic prototype in the semantic prototype library, realizing explicit representation and matching of fault semantics, and supporting closed-set fault identification and unknown fault rejection.

[0024] A multi-task prediction module, connected to a multi-scale feature extraction module and a semantic attribute learning module, receives shared fault feature representations and semantic similarity. It is used to: construct a multi-task prediction head based on the shared fault feature representations and semantic similarity. This multi-task prediction head includes a fault type prediction head, a fault sensor channel prediction head, and a fault start time prediction head, outputting fault type prediction results, fault sensor channel prediction results, and fault start time prediction results, respectively; construct a fault type classification loss based on the fault type prediction results and the fault type label in the supervision signal; construct a fault sensor channel localization loss based on the fault sensor channel prediction results and the fault sensor channel label in the supervision signal; construct a start time regression loss based on the fault start time prediction results and the fault start time label in the supervision signal; and construct a semantic attribute consistency loss based on the predicted fault attribute vector and the semantic attribute label in the supervision signal. Based on these losses, a multi-task loss function is designed to train an end-to-end fault diagnosis model.

[0025] The post-processing optimization module, connected to the multi-task prediction module, is used to: correct the preliminary prediction results of easily confused fault types; deploy the trained end-to-end fault diagnosis model and the post-processing optimization module to the online monitoring system, perform windowing and normalization processing on the real-time multi-sensor streaming data, input it into the end-to-end fault diagnosis model, obtain the preliminary prediction results of fault type identification, fault sensor channel location and fault start time estimation, and correct the easily confused fault diagnosis results through the post-processing optimization module to obtain the final online fault diagnosis result;

[0026] The online diagnostic module, in collaboration with all the above modules, serves as the core scheduling and output unit of the system. It enables real-time processing of streaming data, multi-task diagnostics, unknown fault identification, fragment-level fault detection, and online alarms, and outputs visualized diagnostic reports and fault alarm information.

[0027] Thirdly, the present invention provides an electronic device comprising: at least one processor, at least one memory, and a communication interface, wherein the processor, memory, and communication interface communicate with each other; the memory stores program instructions executable by the processor, and the processor invokes the program instructions to execute the self-supervised multi-sensor fault diagnosis method based on semantic embedding described in the first aspect.

[0028] Fourthly, the present invention provides a non-transitory computer-readable storage medium storing computer instructions that cause a computer to execute the self-supervised multi-sensor fault diagnosis method based on semantic embedding described in the first aspect.

[0029] Compared with existing technical solutions, the beneficial effects of the embodiments of the present invention are reflected in the following aspects:

[0030] 1. The present invention has high accuracy in closed-set fault diagnosis and excellent multi-task diagnostic performance. (1) Using only normal working condition data for training, after lightweight rule optimization, the average fault type identification accuracy under five working conditions is increased from 78.78% to 91.60%, and the highest single working condition is 92.55%, which greatly surpasses the existing baseline model; (2) The fault sensor channel positioning performance is outstanding. The average sensor positioning accuracy of the fault window under five working conditions is 91.29%, and the highest single working condition is 93.69%, which can achieve accurate positioning under cross-sensor coupling conditions; (3) The differentiation accuracy of easily misjudged faults is significantly improved. The average F1 score of stuck faults is 0.8015, and the average F1 score of missing faults is 0.9176, which completely solves the problem of mutual misjudgment of faults with similar physical forms; (4) The fault start time is accurately estimated. The average delay of segment-level detection is only 0.8~1.1 seconds, and the maximum delay is no more than 3.2 seconds, which meets the operation and maintenance needs of rapid response to industrial pipeline faults.

[0031] 2. The embodiments of this invention demonstrate strong unknown fault rejection capability, overcoming the technical limitations of closed-set classification. When peak faults are set as unknown faults not seen during training, compared to ordinary baseline models, the embodiments of this invention improve the AUROC (Area Under the Receiver Operating Characteristic Curve) for unknown fault rejection by 35.30 percentage points, reaching 0.8127, and the AUPR (Area Under the Precision-Recall Curve) by 33.84 percentage points, reaching 0.7790. The ROC (Receiver Operating Characteristic curve) curve remains close to the upper left corner, achieving high recall for unknown faults with a low false positive rate, while maintaining a precision of approximately 0.8 over a wide recall range. This addresses the industry pain point of existing models lacking reliable rejection capability for unknown faults.

[0032] 3. The segment-level fault detection effect of the present invention is good and it is suitable for industrial online streaming monitoring. (1) High fault detection coverage: Under operating conditions 1 to 4, the fault segment detection rate FSDR=1.0, which can completely recover all injected drift fault segments; even in operating condition 5 with strong background fluctuations, the fault segment detection rate (Fault Segment Detection Rate) still reaches 0.75, which still has effective detection capability for weak drift faults; (2) Controllable false alarm rate: The segment-level false alarm rate of operating conditions 1 and 2 is 0, and the false alarm rate of other operating conditions is within a controllable range; by merging adjacent alarm windows, the fragmentation phenomenon is effectively reduced and the reliability of alarms is improved; (3) Strong real-time online alarm: The maximum detection delay of all operating conditions is controlled within 3.2 seconds, which can realize real-time online alarm of faults, directly connect the fault isolation and rapid repair of industrial pipelines, and greatly improve the operation and maintenance efficiency. (4) Excellent generalization ability across working conditions and strong robustness to working condition shifts: With working conditions 1-4 as the source domain and working condition 5 as the target domain, no target domain fault data is used during the training phase. The accuracy of closed set fault type identification in the target domain reaches 81.54%, the macro F1 score reaches 0.7683, and the fault sensor localization accuracy reaches 89.71%. Faults such as drift, spike, and offset maintain stable identification accuracy under domain shift. Only normal and stuck have a small number of misjudgments. Moreover, the threshold can be quickly corrected by adjusting a small amount of normal data in the target domain, which solves the problem of significant performance degradation of existing models across working conditions.

[0033] 4. The model in this embodiment has low computational complexity, low inference latency, and high feasibility for engineering deployment. (1) Low computational overhead: The computational complexity of the complete model is 1.28 × 10 8 The number of FLOPs per sample is only 36% of that of a pure Transformer model, which is slightly higher than that of a single 1D CNN model, and the lightweight advantage is significant; (2) Low inference latency: Under the hardware platform of 13th generation Intel Core i7-13620H CPU and NVIDIA GeForce RTX 3060 GPU, the average inference latency in the GPU environment is 1.87ms / sample and in the CPU environment is 12.35ms / sample, which are far lower than the latency requirement of 50ms / sample for industrial online monitoring; (3) Negligible post-processing overhead: The rule-based post-processing optimization only increases the inference latency by 0.03ms / sample, which hardly affects the real-time performance and fully meets the engineering deployment requirements of industrial pipeline flow monitoring.

[0034] 5. The model in this embodiment of the invention has strong interpretability and is suitable for actual industrial application scenarios. (1) The fault semantics are explicitly interpretable: the constructed 5-dimensional fault attribute space has clear physical meaning, and the fault features are directly related to the semantic attributes, which solves the black box problem of traditional deep learning models and makes it easy for industrial operation and maintenance personnel to understand, use and debug. (2) The labeling cost is greatly reduced: training is completed using only long-term normal working condition data, and no manual labeling of any fault segments is required, which completely solves the problem of high fault labeling cost and scarce data in industrial scenarios. (3) The diagnostic results are highly executable: the quantitative results of fault type, fault sensor and fault start time are output at the same time, which directly connects to the fault isolation, location and maintenance decision of industrial pipelines, without the need for additional secondary processing, and has high engineering practicality.

[0035] 6. The core modules of the present invention work together to enhance the overall robustness of the model. (1) Ablation experiments verify that the multi-scale branch, semantic module, and supervised contrastive regularization of the present invention have significant synergistic effects and are indispensable. (2) After removing the short-term CNN branch, the fault type identification accuracy drops to 70.07%, and the sensor localization performance drops significantly. (3) After removing the semantic module, the fault type identification accuracy drops to 78.32%, and the ability to distinguish similar faults such as jamming and missing faults deteriorates significantly. (4) After removing supervised contrastive regularization, the fault type identification accuracy drops to 79.15%, and the inter-class separability of the feature space is significantly reduced. (5) After removing both the semantic module and supervised contrastive regularization, the fault type identification accuracy is only 72.13%, and the overall performance of the model deteriorates significantly. (6) The experimental results of the present invention fully demonstrate that the design of each core module of the present invention makes a key contribution to the diagnostic performance, and the overall robustness and stability of the model are high. Attached Figure Description

[0036] Figure 1 This is a flowchart of a self-supervised multi-sensor fault diagnosis method based on semantic embedding in an embodiment of the present invention.

[0037] Figure 2a This is a schematic diagram of the signal pattern of a drift fault in a physically driven pipeline sensor in an embodiment of the present invention.

[0038] Figure 2b This is a schematic diagram of the signal pattern of a spike fault in a physically driven pipeline sensor in an embodiment of the present invention.

[0039] Figure 2c This is a schematic diagram of the signal pattern of the bias fault of the physically driven pipe sensor in an embodiment of the present invention.

[0040] Figure 2d This is a schematic diagram of the signal pattern of a stuck pipe sensor in a physically driven embodiment of the present invention.

[0041] Figure 2e This is a schematic diagram of the signal pattern of a missing fault in a physically driven pipeline sensor in an embodiment of the present invention.

[0042] Figure 3 This is an overall architecture diagram of the SEMA-FDNet model in this embodiment of the invention.

[0043] Figure 4a This is a schematic diagram illustrating the windowing and normalization of historical data during the offline training phase of the SEMA-FDNet model in this embodiment of the invention.

[0044] Figure 4b This is a schematic diagram illustrating the offline training phase of the SEMA-FDNet model in this embodiment of the invention, where the model is trained using an encoder and a multi-task head.

[0045] Figure 4c This is a schematic diagram of semantic attribute learning during the offline training phase of the SEMA-FDNet model in an embodiment of the present invention.

[0046] Figure 4d This is a schematic diagram illustrating the offline training phase of the SEMA-FDNet model in this embodiment of the invention, which trains a prototype library using category prototypes and distance statistics.

[0047] Figure 4e This is a schematic diagram illustrating the window partitioning and normalization process performed during the online testing phase of the SEMA-FDNet model in this embodiment of the invention.

[0048] Figure 4f This is a schematic diagram illustrating how the trained SEMA-FDNet model is obtained by freezing the encoder and task head during the online testing phase of the SEMA-FDNet model in this embodiment of the invention.

[0049] Figure 4g This is a schematic diagram illustrating the distance from semantic inference to the semantic prototype during the online testing phase of the SEMA-FDNet model in this embodiment of the invention.

[0050] Figure 4h This is a schematic diagram illustrating the fault type, fault sensor start time, and unknown category of the online testing phase diagnostic output of the SEMA-FDNet model in this embodiment of the invention.

[0051] Figure 5a This is a schematic diagram of the original confusion matrix of Case 1 in an embodiment of the present invention.

[0052] Figure 5b This is a schematic diagram of the optimized confusion matrix in Case 1 of this embodiment of the invention.

[0053] Figure 5cThis is a schematic diagram of the SupCon feature space t-SNE of Case 1 in an embodiment of the present invention.

[0054] Figure 5d This is a schematic diagram of the original confusion matrix of Case 5, another example in this invention.

[0055] Figure 5e This is a schematic diagram of the optimized confusion matrix in Case 5, another embodiment of the present invention.

[0056] Figure 5f This is a schematic diagram of the SupCon feature space t-SNE of Case 5, another example in this invention.

[0057] Figure 6a This is a schematic diagram illustrating the closed set classification performance in an embodiment of the present invention.

[0058] Figure 6b This is a schematic diagram of the feature distribution in an embodiment of the present invention.

[0059] Figure 7a This is a schematic diagram illustrating the detection of the original signal, anomaly score, and binary detection results for a working condition according to an embodiment of the present invention.

[0060] Figure 7b This is a schematic diagram of the original signal, anomaly score, and binary detection results for another working condition detected according to an embodiment of the present invention.

[0061] Figure 8a This is a schematic diagram of the ROC curve of open set recognition performance in an embodiment of the present invention.

[0062] Figure 8b This is a schematic diagram of the PR curve in an embodiment of the present invention.

[0063] Figure 9 This is a schematic diagram illustrating the correlation between semantic attribute space and physical features in an embodiment of the present invention.

[0064] Figure 10a This is a schematic diagram illustrating the segmented inspection accuracy analysis for five working conditions in an embodiment of the present invention.

[0065] Figure 10b This is a schematic diagram illustrating the analysis of false alarm counts for five operating conditions in an embodiment of the present invention.

[0066] Figure 10c This is a schematic diagram illustrating the detection delay analysis for five working conditions in an embodiment of the present invention.

[0067] Figure 11a This is a radar diagram of the original operating conditions in an embodiment of the present invention.

[0068] Figure 11bThis is a radar chart of the optimized operating conditions in an embodiment of the present invention.

[0069] Figure 11c This is a radar diagram showing the sensor operating conditions in an embodiment of the present invention.

[0070] Figure 12 This is a structural block diagram of a self-supervised multi-sensor fault diagnosis system based on semantic embedding in an embodiment of the present invention. Detailed Implementation

[0071] See Figure 1 As shown, this embodiment of the invention provides a self-supervised multi-sensor fault diagnosis method based on semantic embedding, including the following steps:

[0072] Step S1: Preprocess the original normal operating condition monitoring data: time block segmentation, sliding window generation and normalization to obtain a pure normal operating condition window; based on the pure normal operating condition window, generate a fault window through single-channel fault injection with semantic embedding in the time domain, and automatically generate a supervision signal for the generated fault window. The supervision signal includes fault type label, fault sensor channel label, fault start time label and semantic attribute label corresponding to the fault type.

[0073] Step S2: Design a dual-branch multi-scale backbone network including a long-term Transformer branch and a short-term Convolutional Neural Network (CNN) branch. Use the dual-branch multi-scale backbone network to extract features from the training sample window consisting of a pure normal working condition window and a fault window. Perform feature concatenation on the extracted long-term temporal dependent features and short-term local transient features to obtain fused features. Map the fused features to a shared fault feature representation through a shared embedded multilayer perceptron (MLP).

[0074] Based on semantic attribute learning, explicit representation and matching of fault semantics are achieved: fault attributes are defined based on the physical degradation mechanism of sensor faults, a fault attribute matrix is ​​constructed, and the attribute levels of each fault type are mapped to attribute values ​​within a preset numerical range to obtain a quantitative representation of fault semantics; the fault attribute matrix is ​​mapped to a latent semantic space to generate a semantic prototype library; based on shared fault feature representation, a predicted fault attribute vector is obtained through attribute regressor learning (the attribute regressor is a multilayer perceptron MLP), and the dimension of the predicted fault attribute vector is consistent with the dimension of the fault semantic prototype, realizing the mapping from shared fault feature representation to semantic attribute space; the semantic similarity between the predicted fault attribute vector and each fault semantic prototype in the semantic prototype library is calculated.

[0075] Specifically, the attribute regressor is a multilayer perceptron (MLP), comprising a first fully connected layer, a nonlinear activation layer, and a second fully connected layer; the attribute regressor takes a shared fault feature representation as input and outputs a latent attribute vector of dimension K, where K is consistent with the dimension of the semantic prototypes in the semantic prototype library.

[0076] Step S3: Based on the shared fault feature representation and semantic similarity, construct a multi-task prediction head, which includes a fault type prediction head, a fault sensor channel prediction head, and a fault start time prediction head, and outputs the fault type prediction result, the fault sensor channel prediction result, and the fault start time prediction result, respectively.

[0077] The fault type label in the supervision signal is used to calculate the fault type classification loss, the fault sensor label is used to calculate the sensor localization loss, the fault start time label is used to calculate the start time regression loss, and the semantic attribute label is used to constrain the predicted fault attribute vector output by the multilayer perceptron to make it consistent with the semantic prototype of the corresponding fault type in the semantic prototype library. The above losses together constitute the end-to-end training objective.

[0078] Based on the fault type prediction results and the fault type labels in the supervision signal, a fault type classification loss is constructed; based on the fault sensor channel prediction results and the fault sensor channel labels in the supervision signal, a fault sensor channel localization loss is constructed; based on the fault start time prediction results and the fault start time labels in the supervision signal, a start time regression loss is constructed; based on the predicted fault attribute vector and the semantic attribute labels in the supervision signal, a semantic attribute consistency loss is constructed. Based on the above losses, a multi-task loss function is designed to train the end-to-end fault diagnosis model.

[0079] Step S4: Construct a lightweight rule-based post-processing optimization module. Deploy the trained end-to-end fault diagnosis model and the post-processing optimization module to the online monitoring system. Perform windowing and normalization processing on the real-time multi-sensor streaming data, input it into the end-to-end fault diagnosis model, and obtain preliminary prediction results for fault type identification, fault sensor channel location, and fault start time estimation. Correct easily confused preliminary fault diagnosis results through the post-processing optimization module, and output the final online fault diagnosis result.

[0080] In step S1, the step of generating a fault window based on a pure normal operating condition window through single-channel fault injection with semantic embedding in the time domain, and automatically generating a monitoring signal for the generated fault window, includes the following steps:

[0081] Based on the preprocessed normal operating condition window, a fault window is generated through single-channel fault injection with semantic embedding in the time domain. For drift faults, spike faults, offset faults, jamming faults, and missing faults, a synthesis logic that fits the physical degradation mechanism is designed. For the generated fault window, a supervision signal is automatically generated: the corresponding fault type label, fault sensor channel label, and fault start time label are assigned to achieve self-supervised learning. The sensor channel positioning loss and start time regression loss are calculated only on the fault window.

[0082] A fault injection function is used to randomly select the time series of the target sensor channel within a normal operating window, perturb it, and generate a fault window. Fault types include drift fault, spike fault, offset fault, jamming fault, and missing fault. Fault type labels are generated based on the selected fault type; fault sensor channel labels are generated based on the selected target sensor channel; fault start time labels are generated based on the selected fault start time; and semantic attribute labels are generated based on the corresponding fault semantic prototype in the semantic prototype library. Sensor localization loss and start time regression loss are calculated only based on the fault window.

[0083] In step S2, the extracted long-term temporal dependency features and short-term local transient features are concatenated to obtain fused features, which includes the following steps:

[0084] The long-term Transformer branch extracts features from the training sample window data to capture long-term temporal dependencies and slowly evolving fault features: The Transformer encoder captures the correlation between sensors and long-term temporal dependencies through a self-attention mechanism, generates temporal features, and performs temporal average pooling on the temporal features to obtain a fixed-dimensional global long-term feature descriptor.

[0085] The short-term CNN branch performs feature extraction on the training sample window data, extracting local transient features and sudden fault features: it captures signal changes at local time steps through convolutional kernels, generates temporal feature maps, and performs temporal attention pooling on the temporal feature maps to obtain local short-term feature descriptors of fixed dimensions.

[0086] Long-term Transformer branches and short-term CNN branches perform feature extraction in parallel;

[0087] The global long-term feature descriptor is concatenated with the local short-term feature descriptor to obtain the fused feature;

[0088] By using a shared embedding MLP (Multilayer Perceptron), the fused features are mapped to a low-dimensional shared fault feature representation.

[0089] The Transformer is a deep learning architecture based on self-attention mechanisms. It relies entirely on self-attention to process sequential data, overcoming the efficiency and capability bottlenecks of traditional sequence models through parallel computation and capturing long-range dependencies. The Transformer employs a classic encoder-decoder architecture. The encoder, composed of stacked multi-head self-attention layers and feedforward neural network layers, is responsible for converting the input sequence into a representation containing contextual information. The decoder, building upon the encoder, adds: a masking self-attention layer for autoregressive generation to prevent the perception of future information; and an encoder-decoder attention layer, also known as a cross-attention layer, to integrate relevant information from the encoder output and progressively generate the output sequence.

[0090] In step S2, the explicit representation and matching of fault semantics based on semantic attribute learning further includes the following steps:

[0091] A semantically guided multi-objective, multi-sensor fault diagnosis model, SEMA-FDNet, was constructed. The work of the SEMA-FDNet fault diagnosis model includes an offline training phase and an online testing phase.

[0092] The offline training phase includes: (a) windowing and normalizing historical normal data; (b) training the SEMA-FDNet fault diagnosis model through the encoder and multi-task head; (c) fault attributes include: amplitude variation, duration, impulsivity, impact range, and recoverability, realizing the mapping from fault attributes to semantic attributes and learning semantic attributes; (d) constructing a semantic prototype library and performing end-to-end training on the SEMA-FDNet fault diagnosis model: training the semantic prototype library through category prototypes and distance statistics.

[0093] The online testing phase includes: (e) real-time processing of multi-sensor streaming signals: window partitioning and normalization; (f) model inference: obtaining the trained SEMA-FDNet fault diagnosis model by freezing the encoder and task head; (g) inferring the distance to the semantic prototype based on semantic reasoning; (h) outputting multi-task diagnosis results: fault type, fault sensor channel, fault start time, unknown category and segment-level fault alarm.

[0094] Construct a low-dimensional fault attribute embedding space matrix with physical interpretability to generate a semantic prototype library;

[0095] Based on the shared fault feature representation, the latent attribute vector is predicted through attribute regressor learning, realizing the mapping from fault features to semantic attributes;

[0096] Calculate semantic similarity to achieve explicit semantic representation and matching of faults, supporting closed-set fault identification and unknown fault rejection.

[0097] In step S3, a multi-task prediction head is constructed based on shared fault feature representation and semantic similarity. This multi-task prediction head includes a fault type prediction head, a fault sensor channel prediction head, and a fault start time prediction head, which respectively output the fault type prediction result, fault sensor channel prediction result, and fault start time prediction result. The preliminary fault diagnosis result is jointly output based on multi-task prediction, including the following steps:

[0098] The shared fault feature representation is input into the fault type prediction head of the multilayer perceptron (MLP) to obtain the basic log odds of the fault type. The basic log odds of the fault type are then fused with semantic similarity to obtain the final log odds of the fault type. The final log odds of the fault type are converted into the fault type prediction probability through a normalized exponential function, and the fault type prediction result is output.

[0099] The shared fault feature representation is input into the fault sensor channel prediction head of the multilayer perceptron (MLP) to obtain the log probability of the fault sensor channel. The log probability of the fault sensor channel is converted into the fault sensor channel localization prediction probability through a normalized exponential function, and the fault sensor channel prediction result is output.

[0100] The shared fault feature representation is input into the fault start time prediction head of the multilayer perceptron (MLP). The output is normalized to a preset interval using the Sigmoid function to obtain the fault start time prediction value. This value is then mapped to the time step index within the window, which is the predicted fault occurrence time step. This is obtained by multiplying the window length by the predicted normalized start time to get the fault start time prediction result.

[0101] Based on shared fault feature representation and semantic similarity, three lightweight, task-specific prediction heads are constructed to achieve joint prediction of fault type identification, fault sensor channel localization, and fault initiation time estimation, and output preliminary diagnostic results.

[0102] In step S3, designing the multi-task loss function and training the end-to-end fault diagnosis model includes the following steps:

[0103] We employ a weighted multi-task objective function to train the SEMA-FDNet fault diagnosis model end-to-end, integrating multiple loss types: fault type loss, fault sensor channel loss, fault initiation time loss, attribute regression loss, supervised comparison loss, and total loss. We also introduce supervised comparison regularization to improve the model's feature representation capability and multi-task diagnostic accuracy.

[0104] In step S4, the post-processing optimization module corrects the easily confused preliminary fault diagnosis results, including the following steps:

[0105] Fuzzy region trigger: Set a fuzzy region for fault prediction. When the model’s initial prediction result is a stuck or missing fault, the rule optimization process will be automatically triggered.

[0106] Key Statistical Extraction: For the predicted faulty sensor channel, two core window-level statistics are extracted after the fault initiation time: zero-value ratio and variance collapse, which quantify the numerical distribution and fluctuation characteristics of the signal.

[0107] Threshold judgment and result correction: Based on the empirical distribution of the normal window in the training set, the above statistics are calibrated with thresholds, and the thresholds are fixed during the testing and online phases; based on the comparison results between the statistics and the thresholds, the mutual misjudgment problem of stuck / missing faults is corrected.

[0108] To address the shortcomings of existing multi-sensor fault diagnosis technologies for industrial pipelines in the background art, the embodiments of this invention precisely solve the following technical problems: (1) Solving the problem of fault diagnosis being highly dependent on manual annotation of fault segments and having high annotation costs, realizing the completion of the entire model training process using only long-term normal operating data of industrial pipelines, without the need for manual annotation of any fault information; (2) Solving the problem that existing methods only output window-level classification results and lack executability, realizing multi-task joint diagnosis of fault type identification, fault sensor channel location, and fault start time estimation, and outputting quantitative results that can directly support industrial pipeline operation and maintenance decisions; (3) Solving the problems of implicit fault semantics, poor interpretability, and weak ability to reject unknown faults, constructing a low-dimensional fault attribute embedding with clear physical meaning. (3) To achieve accurate identification of closed-set faults and robust rejection of unknown faults; (4) To solve the problems of poor robustness of existing models to working condition deviations and insufficient generalization ability across working conditions, improve the diagnostic performance of the model under different steady-state working conditions, and reduce the impact of working condition heterogeneity and data distribution drift on the diagnostic results; (5) To solve the problems of high computational complexity and large inference delay of some models, design a lightweight multi-scale network architecture, and significantly reduce computational overhead while ensuring diagnostic accuracy, so as to meet the real-time requirements of online flow monitoring of industrial pipelines; (6) To solve the problem of similar physical forms and difficulty in distinguishing fault modes, improve the intra-class compactness and inter-class separability of fault features through explicit fault semantic attribute representation and supervised comparative learning, and achieve accurate differentiation of similar faults.

[0109] The following six aspects will be explained in detail: overall technical solution, core definition and data preparation, specific steps of the method, key innovations, technical effects, and experimental verification.

[0110] I. Overview of the overall technical solution of the embodiments of the present invention.

[0111] This invention provides a self-supervised multi-sensor fault diagnosis method based on semantic embedding, comprising the following steps:

[0112] Based on a semantically driven self-supervised multi-task learning framework, the model is trained using only long-term normal operating data of industrial pipelines. Through semantically guided single-channel fault injection in the time domain, the supervision signals of fault type, sensor, and start time are automatically generated, completely eliminating the dependence on manual annotation.

[0113] Construct a low-dimensional fault attribute embedding space with physical interpretability, define semantic prototypes, realize explicit semantic representation and matching of faults, and support closed-set fault identification and unknown fault rejection.

[0114] The design incorporates a multi-scale backbone network consisting of a long-term Transformer branch and a short-term CNN (Convolutional Neural Network) branch, balancing long-term temporal dependency modeling with short-term local transient feature extraction, thereby achieving effective fusion of multi-dimensional fault features.

[0115] Supervised contrastive regularization is introduced to improve the separability of fault features. Combined with lightweight rule-based post-processing optimization, the prediction results of faults that are prone to misjudgment are corrected.

[0116] Ultimately, it achieves fault type identification, fault sensor channel location, fault initiation time estimation, unknown fault rejection, and cross-condition generalization diagnosis in multi-sensor scenarios of industrial pipelines. Moreover, the model is lightweight and has low inference latency, fully meeting the engineering deployment requirements of industrial online monitoring.

[0117] II. Core Definitions and Data Preparation of Embodiments of the Invention

[0118] 1. Sensor monitoring data definition: For an industrial hydraulic pipeline test bench equipped with D sensors, multi-channel physical quantity monitoring data are collected simultaneously, where D is a positive integer. The D sensors in this embodiment of the invention include:

[0119] Two pressure sensors: pressure sensor pre1 and pressure sensor pre2;

[0120] Four pipe wall vibration sensors: the first pipe wall vibration sensor vib1 to the fourth pipe wall vibration sensor vib4;

[0121] Two electromagnetic flow meters: flow1 (first flow sensor) and flow2 (second flow sensor);

[0122] Therefore, the total number of sensors in this embodiment of the invention is D=8.

[0123] After removing redundant timestamp information, the total length of the original multivariate time series, Nraw, is obtained, which is the total number of time steps. All sensor channels are synchronously sampled by the industrial data acquisition system at a frequency of 10Hz.

[0124] 2. Sliding window construction rules: Using a sliding window of length T and step size 1, the original multivariate time series is windowed to obtain N = Nraw - T + 1 multivariate windows, where Xi ∈ R. T×D (i=1,2,...,N), where N is the total number of windows, Nraw is the total length of the original multivariate time series (i.e., the total number of time steps), T is the length of the time steps contained in a single window, D is the total number of sensor channels, and Xi∈R T×D This represents the i-th multivariable window data, with dimensions of T time steps × D sensor channels. N, T, D, and i are all positive integers. In this embodiment of the invention, T=200 is set, corresponding to a monitoring duration of 20 seconds, which is adapted to the evolution characteristics of industrial pipeline faults.

[0125] 3. Fault type definition. Based on the typical degradation mechanism of industrial pipeline sensors, one normal operating state and five sensor fault types with clear physical interpretability are defined, specifically: (1) Drift: slow trend change of signal caused by sensor aging / scaling; (2) Spike: high amplitude pulse noise caused by electromagnetic interference / transient disturbance; (3) Bias: step-like static offset of signal caused by overload / calibration deviation; (4) Stasis: sensor output freeze caused by converter / controller failure; (5) Loss: monitoring data loss caused by communication failure / hardware failure.

[0126] 4. Diagnostic Label Definition. Three core diagnostic labels are associated with each multivariate window to form a complete supervised representation.

[0127] ① Fault type label y i type ∈{0,1,...,5}, where y i type The label represents the fault type of the i-th window, where 0 indicates normal status and 1 to 5 correspond to the following faults: drift, spike, offset, jam, and missing.

[0128] ② Fault sensor channel index y i sensor ∈{0,1,...,7}, where y i sensor This represents the fault sensor channel index of the i-th window, used to indicate the specific sensor channel where the fault occurred.

[0129] ③ Fault start location y i onset ∈[0,T), where y i onset This indicates the starting position of the fault within the i-th window, specifying the starting time of the fault within the window in units of time steps.

[0130] Figures 2a-2e This is a schematic diagram of signal patterns representing five possible fault mechanisms of a physically driven pipe sensor in this embodiment of the invention. Figure 2a This is a schematic diagram of the signal pattern of a drift fault in a physically driven pipeline sensor according to an embodiment of the present invention. Figure 2b This is a schematic diagram of the signal pattern of a spike fault in a physically driven pipeline sensor according to an embodiment of the present invention. Figure 2c This is a schematic diagram of the signal pattern of the bias fault of the physically driven pipe sensor in an embodiment of the present invention. Figure 2d This is a schematic diagram of the signal pattern of a stuck pipe sensor in an embodiment of the present invention. Figure 2e This is a schematic diagram of the signal pattern of a missing fault in a physically driven pipeline sensor according to an embodiment of the present invention. Sensor types include: electromagnetic flowmeter, pressure transmitter, and vibration accelerometer. Figures 2a-2e In the signal pattern diagram, the horizontal axis represents time, and the vertical axis represents five fault mechanisms: drift, spike, offset, jamming, and missing. This clearly characterizes the correspondence between the sensor and the fault mechanism, the fault attribute characteristics, and typical signal patterns. The specific mechanisms of the five faults are: drift: slow drift; spike: electromagnetic interference / pulse noise; offset: static offset; jamming: output freeze; missing: data loss.

[0131] III. In this embodiment of the invention, the self-supervised multi-sensor fault diagnosis method based on semantic embedding includes the following steps:

[0132] Step 1: Data Preprocessing. To avoid time leaks and ensure data consistency, the original normal operating condition monitoring data undergoes standardized preprocessing, including the following steps:

[0133] Step 101, Time Block Segmentation: Divide the original normal operating condition multivariate time series into several non-overlapping time blocks to ensure that the windows for subsequent training, validation, and test sets do not overlap in time.

[0134] Step 102, Sliding Window Generation: Apply the above sliding window construction rules to each time block to generate a multivariate window dataset Xi∈R. T×D .

[0135] Step 103, Data Normalization: Based on the statistical characteristics of the normal windows in the training set: mean and variance, perform zero-mean standardization (Z-score standardization) on all windows. Based on the mean and variance of the normal windows in the training set, normalize the data. During the testing and online diagnostic phases, use the statistics of the training set to avoid data distribution shift.

[0136] Step 104: Dataset partitioning: Divide the processed window dataset into training set, validation set, and test set according to the proportions, and ensure that the windows of each set are completely independent in time and do not overlap.

[0137] Step 2: Semantic-guided single-channel fault injection, automatically generating monitoring signals.

[0138] Based on the normal operating condition window obtained in step 1, a fault window is generated through semantically guided single-channel fault injection in the time domain. Without manual intervention, the fault type, fault sensor channel, and supervision signal at the fault initiation time are automatically constructed to achieve self-supervised learning. The specific steps include:

[0139] Step 201, Fault Triple Sampling: For each normal window X i ∈R T×D The data for the i-th multivariate window has a dimension of T time steps × D sensor channels. A fault triplet (c, d, τ) is randomly sampled, where c ∈ {1, 2, 3, 4, 5} is the fault type, d ∈ {1, ..., 8} is the fault sensor channel index, τ ∈ {0, ..., T-1} is the fault start position within the window, and τ represents the starting time step of the fault within the window, with a value range from 0 to T-1, i.e., all legal time steps within a single window.

[0140] Step 202, Fault Injection Operator Design: Design a fault-specific injection operator Jc(·) that modifies only the signal of the target sensor channel d starting from the initial time τ, generating a fault window. X i The mathematical expression is:

[0141]

[0142] Where t=0,...,T-1 are the time step numbers within the window, j=1,...,8 are the sensor channel numbers, and j is a positive integer. i(t,j) is the value of the j-th sensor channel at the t-th time step in the original window, d is the index of the target sensor channel to be injected with the fault, τ is the starting time step of the fault in the window, Fc is the fault synthesis function corresponding to the c-th type of fault, and θc is the synthesis parameter of the c-th type of fault.

[0143] Step 203: Design synthesis logic that fits the physical degradation mechanism for the five fault types. (1) Drift fault: Generate a trend signal that changes smoothly over time after the start time to simulate the physical effects of sensor scaling and creep; (2) Spike fault: Generate sparse high-amplitude, short-duration pulse signals to simulate transient disturbances caused by electromagnetic interference and pipe bubbles; (3) Offset fault: Generate a constant signal with a step offset after the start time to simulate static offset caused by sensor overload and calibration deviation; (4) Stuck fault: Generate a constant platform signal that remains at a fixed value after the start time to simulate output freezing caused by sensor converter and PLC (Programmable Logic Controller) failure; (5) Missing fault: Generate a flat placeholder signal with a fixed value after the start time to simulate data loss caused by communication interruption and hardware failure.

[0144] The supervision label assignment includes the following steps: assigning the corresponding fault type, fault sensor channel, and fault start time label to the generated fault window; for normal windows, no fault sensor channel label is assigned, and sensor localization loss is calculated only on the fault window to avoid meaningless gradient updates.

[0145] Step 3: Multi-scale feature extraction to generate shared fault feature representation.

[0146] Figure 3 This is the overall architecture diagram of the SEMA-FDNet model in this embodiment of the invention. SEMA-FDNet refers to Semantic-guided multi-task Fault Diagnosis Network, a semantically guided multi-objective multi-sensor fault diagnosis model. Figure 3 It clearly demonstrates the hierarchical structure, data flow, input and output dimensions of each module, and core computational operations of the multi-scale feature extraction module (long-term Transformer branch, short-term CNN branch), semantic attribute learning module, and multi-task prediction module, thus fully representing the overall framework of the model.

[0147] See Figure 3 As shown, a dual-branch, multi-scale backbone network is designed, integrating the advantages of long-term Transformer temporal modeling and short-term Convolutional Neural Network (CNN) local feature extraction. Feature extraction is performed on the training sample window data, which consists of normalized normal operating condition windows and fault windows, to generate a shared fault feature representation that considers both long-term dependencies and local transients. Specifically, the following steps are included:

[0148] Step 301, Long-Term Transformer Branch: Capture long-term temporal dependencies and slow-evolutionary fault characteristics, specifically including:

[0149] Step 3011, Adding Position Encoding: Add learnable position encoding P∈R to the input window X. T×D With dimensions of T time steps × D sensor channels, we obtain X′=X+P, where X′ is the input sequence after adding position coding. This means that the original input window X is added element by element to the position coding matrix P, preserving the temporal sequence information of the time series.

[0150] Step 3012, Long-term Feature Extraction: Input the position-encoded sequence X′ into the L-layer Transformer encoder. Through the self-attention mechanism, capture the correlation between sensors and long-term temporal dependencies to generate temporal features H. (L) ∈R T×F .

[0151] Step 3013, Feature Pooling: Pooling the temporal features H (L) Perform temporal average pooling to obtain a fixed-dimensional global long-term feature descriptor h. long ∈R F The mathematical expression is: Where T is the time step length within the window, Ht(L) is the temporal feature of the Lth layer output at the tth time step, F is the feature dimension, and h long This is the long-term feature vector after global average pooling. This branch is mainly suitable for feature extraction of slowly evolving faults such as drift and bias.

[0152] Step 302, Short-Term CNN Branch: Extracting local transient features and sudden failure features, specifically including:

[0153] Step 3021, Local Feature Extraction: The original input window X is directly input into a one-dimensional convolutional neural network: 1DCNN, a stacked network, without adding positional encoding. The convolutional kernel captures the signal changes at local time steps, generating a temporal feature map U∈R. T×64 Where T is the window time step length and 64 is the number of convolution output feature channels.

[0154] Step 3022, Attention Pooling: Perform temporal attention pooling on the temporal feature map U, assigning high weights to key fault feature regions to obtain fixed-dimensional local short-term feature descriptors h. short ∈R 64 Short-range local feature vectors with a feature dimension of 64; this branch is mainly adapted for feature extraction of transient / sudden faults such as spikes, missing features, and lag.

[0155] Note: Steps 301 and 302 above occur in parallel and have no specific order.

[0156] Step 303, Feature Fusion and Shared Embedding: The global long-term feature descriptor h... long With local short-term feature descriptor hshort By splicing, the fused feature h=[h long ;h short ]∈R Ffuse By using a shared embedding MLP (Multilayer Perceptron), the fused features are mapped to a low-dimensional shared fault feature representation z∈R. P , of which F fuse denoted by , where is the dimension of the fused features after concatenation, and P is the embedding dimension of the shared fault features. This feature serves as the unified foundation for subsequent semantic attribute learning and multi-task prediction.

[0157] Step 4: Semantic attribute learning to achieve explicit representation and matching of fault semantics.

[0158] See Figures 4a-4h As shown, the workflow of the SEMA-FDNet model in this embodiment of the invention is divided into an offline training phase and an online testing phase. Figure 4a This is a schematic diagram illustrating the windowing and normalization processing of historical data during the offline training phase of the SEMA-FDNet model in this embodiment of the invention. Figure 4b This is a schematic diagram illustrating the offline training phase of the SEMA-FDNet model in this embodiment of the invention, where the model is trained using an encoder and a multi-task head. Figure 4c This is a schematic diagram illustrating the semantic attribute learning during the offline training phase of the SEMA-FDNet model in this embodiment of the invention. Figure 4d This is a schematic diagram illustrating the offline training phase of the SEMA-FDNet model in this embodiment of the invention, where a prototype library is trained using category prototypes and distance statistics. Figure 4e This is a schematic diagram illustrating the window partitioning and normalization processing performed during the online testing phase of the SEMA-FDNet model in this embodiment of the invention. Figure 4f This is a schematic diagram illustrating how the trained SEMA-FDNet model is obtained by freezing the encoder and task head during the online testing phase of the SEMA-FDNet model in this embodiment of the invention. Figure 4g This is a schematic diagram illustrating the distance from semantic reasoning to the semantic prototype during the online testing phase of the SEMA-FDNet model in this embodiment of the invention. Figure 4h This is a schematic diagram illustrating the fault type, fault sensor channel, fault start time, and unknown category of the online testing phase diagnostic output of the SEMA-FDNet model in this embodiment of the invention.

[0159] The offline training phase includes: (a) windowing and normalizing historical normal data; (b) training the SEMA-FDNet model through the encoder and multi-task head; (c) semantic attribute learning; (d) semantic prototype library construction and end-to-end fault diagnosis model training: training the prototype library through category prototypes and distance statistics.

[0160] The online testing phase includes: (e) real-time processing of multi-sensor streaming signals: window partitioning and normalization; (f) model inference: obtaining the trained SEMA-FDNet model by freezing the encoder and task head; (g) semantic inference: distance to the semantic prototype; (h) multi-task diagnostic result output: fault type, fault sensor channel, fault start time, unknown category and segment-level fault alarm.

[0161] Step 4 involves constructing a low-dimensional fault attribute embedding space with explicit physical interpretability, defining semantic prototypes, and implementing fault semantic matching. This provides a core basis for closed-set fault identification and unknown fault rejection, and specifically includes the following steps:

[0162] Step 401: Fault Attribute Matrix Construction. Based on the physical degradation mechanism of sensor faults, five core fault attributes are defined: amplitude variation, temporal persistence, impulsivity, influence range, and recoverability; an attribute matrix A∈[0,1] is constructed. 6×5 The 6 rows correspond to: normal + 5 types of faults, and the 5 columns correspond to: 5 fault attributes. The qualitative level of each fault type attribute is mapped to a numerical score in the range of [0,1] to achieve a quantitative representation of fault semantics.

[0163] Step 402: Semantic Prototype Library Generation. Using the attribute projection module, the fault attribute matrix A is mapped to the latent semantic space to generate the semantic prototype library {p}. c} , where p c ∈R K Let pc be the semantic prototype of the c-th state / fault, and K be the dimension of the semantic prototype. K=5 is consistent with the dimension of the fault attribute space. In this embodiment of the invention, the fault attributes include five physically interpretable attributes: amplitude variation, time duration, impulsivity, range of influence, and recoverability. Therefore, K=5, that is, each semantic prototype pc is a 5-dimensional vector used to characterize the semantic features of the corresponding fault type.

[0164] Step 403: Latent Attribute Vector Regression. Based on the shared fault feature representation z, the latent attribute vector z^∈R is learned and predicted through an attribute regressor. K , where z^ is the predicted fault feature vector with dimension K, which is consistent with the dimension of the fault semantic prototype, realizing the mapping from fault features to semantic attributes.

[0165] Step 404: Semantic Similarity Calculation. Calculate the latent attribute vector z^ and each semantic prototype p in the semantic prototype library using cosine similarity with a temperature coefficient τ. c The semantic similarity is used as an auxiliary log-odds for fault type prediction to strengthen the alignment between fault semantics and feature representation. The mathematical expression is: , where s c The similarity score for the c-th type of fault. The inner product of the predicted features and the semantic prototype of the fault is τ, where τ is the temperature coefficient and c=1,…,6 represents the traversal of all 6 states and fault categories.

[0166] Step 5: Multi-task prediction, combined output of preliminary fault diagnosis results.

[0167] Step 5 is based on the shared fault feature representation z and semantic similarity s. c Three lightweight, task-specific prediction heads are constructed: a fault type prediction head, a fault sensor channel prediction head, and a fault start time prediction head. These heads enable joint prediction of fault type identification, fault sensor channel location, and fault start time estimation, outputting preliminary diagnostic results. The specific steps include:

[0168] Step 501, Fault Type Prediction Head: Input the shared fault feature representation z into the fault type prediction head of the multilayer perceptron (MLP) to obtain the basic log odds of the fault type, and then add the semantic similarity s. c To obtain the final logarithmic probability of the fault type With a dimension of 6, the probability of failure type is converted into a normalized exponential function (softmax) and the most likely failure type is output.

[0169] Step 502, Fault Sensor Channel Prediction Head: Input the shared fault feature representation z into the fault sensor channel prediction head of the multilayer perceptron (MLP) to obtain the log probability of the fault sensor channel. With a dimension of 8, the probability of sensor location prediction is converted through the normalized exponential function softmax, and the sensor channel where the fault is most likely to occur is output.

[0170] Step 503, Fault Initiation Time Prediction Head: Input the shared fault feature representation z into the fault initiation time prediction head of the multilayer perceptron (MLP). Normalize the output to the [0,1] interval using the Sigmoid function to obtain the predicted fault initiation time value. Map it to a time step index within the window. The predicted fault occurrence time step is obtained by multiplying the window length T by the predicted normalized start time, thus yielding a quantitative estimate of the fault start time.

[0171] Step 6: Design a multi-task loss function and train the fault diagnosis model end-to-end.

[0172] Step 6 employs a weighted multi-task objective function to perform end-to-end training on the SEMA-FDNet fault diagnosis model, fusing multiple loss types and introducing supervised contrastive regularization to improve the model's feature representation capability and multi-task diagnostic accuracy. Specific loss design includes:

[0173] (1) Fault type loss L type Log-probability based on fault type The cross-entropy loss is used to measure the error between the predicted fault type and the true label, thereby achieving accurate classification of fault types.

[0174] (2) Loss L of faulty sensor sensor Log-probability of fault sensor channels The cross-entropy loss is calculated only on the fault window to measure the error in locating the faulty sensor channel, thus achieving precise sensor-level positioning.

[0175] (3) Loss L at the time of fault onset onset L1 loss: Mean absolute error, which calculates the absolute error between the predicted value o^ at the fault initiation time and the normalized true value, and realizes a quantitative estimate of the fault initiation time.

[0176] (4) Attribute regression loss L attr L2 loss: Mean squared error, which forces the latent attribute vector z^ to be aligned with the corresponding semantic prototype p. c Alignment measures the matching error between fault features and semantic attributes, and strengthens the explicit representation of fault semantics.

[0177] (5) Supervision and comparison loss L sup : Calculated on the shared fault feature representation z, by bringing similar fault features closer together and widening the distance between dissimilar fault features, the intra-class compactness and inter-class separability of features are improved.

[0178] (6) Total loss function L: The weighted summation of all loss terms is expressed mathematically as follows:

[0179] L=L type +λ sensor L sensor +λ onset L onset +λ attr L attr +λ sup L sup Where L is the total model loss, L type Losses are categorized by fault type, L sensor For the location loss of the faulty sensor channel, L onset To predict losses at the moment of failure, L attr For fault attribute learning loss, L sup To supervise and constrain loss, λsensor , λ onset , λ attr , λ sup The loss weights are set as follows: λ, which represents the balancing weights for each component loss. sensor =λ onset =λ attr =λ sup =0.5, taking into account the training priority of each task.

[0180] Model optimization uses the Adam optimizer, with a batch size of 64 and an initial learning rate of 10. -3 A cosine learning rate decay strategy is adopted to select the optimal model parameters based on the diagnostic performance of the validation set, thereby avoiding overfitting.

[0181] Step 7: Lightweight rule-based post-processing optimization to correct easily misjudged fault results.

[0182] Step 7 addresses fault types such as jamming and missing components that have similar physical forms and are easily misjudged. It introduces lightweight post-processing optimization based on window statistics to accurately correct prediction results without increasing model complexity. This includes the following steps:

[0183] Step 701, Fuzzy Region Trigger: Set a fuzzy region for fault prediction. When the model's initial prediction result is a stuck or missing fault, the rule optimization process will be automatically triggered.

[0184] Step 702, Key Statistical Extraction: For the predicted faulty sensor channel, extract two core window-level statistics after the fault initiation time: zero-value ratio and variance collapse, to quantify the numerical distribution and fluctuation characteristics of the signal.

[0185] Step 703, Threshold Judgment and Result Correction: Based on the empirical distribution of the normal window in the training set, the above statistics are calibrated with a threshold. The threshold is fixed during the testing and online phases and is not adjusted according to the operating conditions. Based on the comparison results of the statistics and the threshold, the mutual misjudgment problem of stuck / missing faults is corrected, and the differentiation accuracy of similar faults is improved.

[0186] Step 8: Online fault diagnosis and unknown fault rejection to achieve streaming monitoring.

[0187] Step 8 involves deploying the trained and post-processed optimized model to the industrial pipeline online monitoring system to achieve real-time fault diagnosis and robust rejection of unknown faults based on multi-sensor streaming data. This includes the following steps:

[0188] Step 801: Real-time online data processing: For the multi-sensor streaming data collected in real time from the industrial pipeline, according to the preprocessing rules in Step 1, windowing and normalization are performed in real time to generate a multivariable window that meets the model input requirements.

[0189] Step 802, Multi-task Real-time Diagnosis: Input the processed online window into the trained model, and output the preliminary prediction results of fault type, fault sensor channel, and fault start time. After post-processing optimization in Step 7, the final quantitative diagnosis result is obtained.

[0190] Step 803, Robust Rejection of Unknown Faults: Calculate the unknown fault score for the window: s unk (X)=1-max c∈ C known p(c|X), where s unk (X) represents the known category uncertainty score, X is the input sample, and C known Let C be a set of known fault categories, c be a known fault category, and p(c|X) be the predicted probability that input X belongs to category c, where c∈C. knownmax To obtain the maximum probability value among all known categories, a threshold for the unknown score is set when s... unk When (X) exceeds the threshold, it is determined to be an unknown fault, thus achieving reliable rejection of unseen fault modes.

[0191] Step 804, Fragment-level Fault Detection and Alarm: Post-process the window-level diagnostic results, merge adjacent fault alarm windows, remove isolated burst alarm signals between short periods, obtain complete fault event fragments, calculate the fault segment detection rate, false alarm rate at segment level, and detection latency, realize event-level fault monitoring and online alarm, and support rapid operation and maintenance.

[0192] IV. Key innovations of the embodiments of the present invention include:

[0193] 1. Self-supervised learning mechanism for pure normal working condition data: Through semantically guided single-channel fault injection, fault supervision signals are automatically generated, completely eliminating the dependence on manually labeled fault segments, greatly reducing the labeling cost of model training, and adapting to the current situation of scarce fault samples in industrial scenarios.

[0194] 2. Integrated architecture for multi-task joint diagnosis: It integrates fault type identification, fault sensor channel localization, and fault initiation time estimation into a unified multi-task learning problem, and outputs quantitative results that can directly support operation and maintenance decisions, realizing a fundamental leap from fault classification to fault diagnosis.

[0195] 3. Physically interpretable fault semantic attribute space: Construct a low-dimensional embedding space containing five core attributes such as amplitude change and time persistence, which explicitly quantifies and represents fault semantics, solves the black box problem of deep learning models, and provides a core basis for the rejection of unknown faults.

[0196] 4. Dual-branch multi-scale feature fusion network: Combining the long-term Transformer branch and the short-term Convolutional Neural Network (CNN) branch, it takes into account the feature extraction of slow-evolving faults and transient / burst faults, and achieves effective fusion of long-term temporal dependencies and local transient features, thereby improving the completeness of fault feature representation.

[0197] 5. Synergistic optimization of semantic guidance and supervised comparison: By strengthening the alignment between fault features and physical attributes through semantic similarity, and combining supervised comparison regularization, the intra-class compactness and inter-class separability of features are improved, significantly enhancing the model's robustness to operating condition deviations and its ability to distinguish similar faults.

[0198] 6. Lightweight design and engineering adaptation: It adopts a lightweight multilayer perceptron (MLP) as the prediction head and optimizes the model computationally by post-processing based on fixed threshold rules. The low inference latency fully meets the real-time requirements of online flow monitoring of industrial pipelines and has high engineering deployment feasibility.

[0199] 7. Integrated implementation of closed-set diagnosis and open-set rejection: Based on semantic prototype matching and unknown fault score calculation, under the same architecture, accurate diagnosis of known closed-set faults and robust rejection of unknown open-set faults are achieved, improving the applicability of the model in open industrial scenarios.

[0200] V. The technical effects of the embodiments of the present invention include:

[0201] The self-supervised multi-sensor fault diagnosis method based on semantic embedding provided in this invention has been verified by extensive experiments under five steady-state conditions in industrial hydraulic pipelines. Compared with existing technologies, this invention has significant technical advantages and practical engineering value. All experimental results were repeated 10 times and averaged, ensuring the data is authentic and reproducible. The specific technical effects are as follows:

[0202] 1. It has high accuracy in closed-collection fault diagnosis and excellent multi-task diagnostic performance.

[0203] (1) Using only normal working condition data for training, after lightweight rule optimization, the average fault type identification accuracy under five working conditions increased from 78.78% to 91.60%, and the highest single working condition reached 92.55%, which significantly exceeded the existing baseline model.

[0204] (2) The fault sensor channel positioning performance is outstanding. The average sensor positioning accuracy of the fault window under five working conditions is 91.29%, and the highest single working condition is 93.69%, which can realize accurate positioning under cross-sensor coupling conditions.

[0205] (3) The discrimination accuracy of easily misjudged faults has been significantly improved. The average F1 score for stuck faults reached 0.8015, and the average F1 score for missing faults reached 0.9176, completely solving the problem of mutual misjudgment of faults with similar physical forms. The F1 score is an indicator used in statistics and machine learning to evaluate the performance of classification models. It is the harmonic mean of precision and recall. The F1 score ranges from 0 to 1 (or 0% to 100%). The higher the value, the better the overall performance of the model, that is, it can achieve high recall while maintaining high precision. This indicator balances the weight of precision and recall.

[0206] (4) The fault start time is accurately estimated, and the average delay of segment-level detection is only 0.8~1.1 seconds, with a maximum delay of no more than 3.2 seconds, which meets the operation and maintenance requirements for rapid response to industrial pipeline faults.

[0207] 2. It has a strong ability to reject unknown faults, breaking through the technical limitations of closed set classification.

[0208] When the spike fault is set as an unknown fault not seen in training, compared with the ordinary baseline model, this invention improves the AUROC (Area Under the Receiver Operating Characteristic Curve) of unknown fault rejection by 35.30 percentage points, reaching 0.8127; and the AUPR (Area Under the Precision-Recall Curve) by 33.84 percentage points, reaching 0.7790. The ROC (Receiver Operating Characteristic curve) curve is always close to the upper left corner, achieving high recall for unknown faults with a low false positive rate, and the precision remains at about 0.8 over a wide recall range, solving the industry pain point that existing models have no reliable rejection capability for unknown faults.

[0209] 3. It has good segment-level fault detection performance and is suitable for industrial online streaming monitoring.

[0210] (1) High fault detection coverage: Under operating conditions 1 to 4, the fault segment detection rate FSDR=1.0, which can completely recover all injected drift fault segments; even in operating condition 5 with strong background fluctuations, the fault segment detection rate (FaultSegment Detection Rate) still reaches 0.75, which still has the ability to effectively detect weak drift faults.

[0211] (2) The false alarm rate is controllable: the false alarm rate of segment level in working conditions 1 and 2 is 0, and the false alarm rate of other working conditions is within a controllable range; by merging adjacent alarm windows, the fragmentation phenomenon is effectively reduced and the reliability of alarms is improved.

[0212] (3) Strong real-time online alarm: The maximum detection delay for all operating conditions is controlled within 3.2 seconds, which can realize real-time online alarm of faults, directly connect the fault isolation and rapid repair of industrial pipelines, and greatly improve the operation and maintenance efficiency.

[0213] (4) Excellent generalization ability across working conditions and strong robustness to working condition shifts. Using working conditions 1-4 as the source domain and working condition 5 as the target domain, without using any target domain fault data during the training phase, the accuracy of closed-set fault type identification in the target domain reached 81.54%, the macro F1 score reached 0.7683, and the fault sensor channel localization accuracy reached 89.71%. Faults such as drift, spike, and offset maintained stable identification accuracy under domain shifts, with only a small number of misjudgments of normal and stuck. Moreover, the threshold can be quickly corrected by adjusting a small amount of normal data in the target domain, which solves the problem of significant performance degradation of existing models across working conditions.

[0214] 4. The model has low computational complexity, low inference latency, and high feasibility for engineering deployment.

[0215] (1) Low computational overhead: The computational complexity of the complete model is 1.28 × 10 8 The FLOPs per sample are only 36% of those of a pure Transformer model, slightly higher than a single 1D CNN model, demonstrating a significant advantage in lightweight design.

[0216] (2) Low inference latency: On the hardware platform of 13th generation Intel Core i7-13620H CPU and NVIDIA GeForce RTX 3060 GPU, the average inference latency in the GPU environment is 1.87ms / sample and in the CPU environment is 12.35ms / sample, both of which are far lower than the latency requirement of 50ms / sample for industrial online monitoring.

[0217] (3) Post-processing overhead is negligible: rule-based post-processing optimization only increases the inference latency by 0.03ms / sample, which hardly affects the real-time performance and fully meets the engineering deployment requirements of industrial pipeline flow monitoring.

[0218] 5. The model is highly interpretable and adaptable to real-world industrial applications.

[0219] (1) The fault semantics are explicitly interpretable: The constructed 5-dimensional fault attribute space has a clear physical meaning. Fault features are directly related to semantic attributes, which solves the black box problem of traditional deep learning models and makes it easier for industrial operation and maintenance personnel to understand, use and debug.

[0220] (2) The labeling cost is greatly reduced: training is completed using only long-term normal working condition data, without the need for manual labeling of any fault segments, which completely solves the problems of high fault labeling cost and data scarcity in industrial scenarios.

[0221] (3) The diagnostic results are highly executable: the quantitative results of fault type, fault sensor channel and fault start time are output simultaneously, which directly connects to the fault isolation, location and maintenance decision of industrial pipelines. No additional secondary processing is required, and the engineering practicality is high.

[0222] 6. Core modules work together to enhance efficiency, resulting in high overall robustness of the model.

[0223] (1) Ablation experiments have verified that the multi-scale branching, semantic module and supervised contrast regularization of the present invention have significant synergistic effects and are indispensable.

[0224] (2) After removing the short-term CNN branch, the accuracy of fault type identification dropped to 70.07%, and the sensor positioning performance decreased significantly.

[0225] (3) After removing the semantic module, the accuracy of fault type identification dropped to 78.32%, and the ability to distinguish similar faults such as jamming and missing was significantly degraded.

[0226] (4) After removing supervised contrast regularization, the accuracy of fault type identification drops to 79.15%, and the inter-class separability of the feature space is significantly reduced.

[0227] (5) After removing the semantic module and the supervision comparison regularization, the fault type identification accuracy was only 72.13%, and the overall performance of the model deteriorated significantly.

[0228] (6) Experimental results fully demonstrate that the design of each core module in the embodiments of the present invention makes a key contribution to the diagnostic performance, and the model has high overall robustness and stability.

[0229] VI. Experimental verification of the embodiments of the present invention.

[0230] To verify the technical effectiveness of the self-supervised multi-sensor fault diagnosis method based on semantic embedding, this invention conducted multiple sets of experiments under five steady-state operating conditions of hydraulic pipelines. All experiments were repeated 10 times, and the average value was taken. The experimental results are as follows.

[0231] 1. Closed-collection fault diagnosis performance.

[0232] As shown in Table 1, after training with only normal operating condition data and optimization using lightweight rules, the average fault type identification accuracy under the five operating conditions increased from 78.78% to 91.60%, with a maximum of 92.55% under a single operating condition; the average accuracy of fault sensor channel positioning reached 91.29%, with a maximum of 93.69% under a single operating condition; the average F1 score for stuck faults was 0.8015, and the average F1 score for missing faults was 0.9176, which can effectively distinguish fault modes with similar physical forms.

[0233] Table 1. Average Fault Type Identification Accuracy under Five Operating Conditions

[0234]

[0235] 2. Fragment-level detection performance. As shown in Table 2, the fault fragment detection rate (FSDR) for conditions 1 to 4 is 1.0, which can completely capture all fault events; the FSDR still reaches 0.75 under condition 5; the average detection delay is 0.8~1.1 seconds, and the maximum delay does not exceed 3.2 seconds, which meets the requirements for online alarm.

[0236] Table 2. Fault segment detection rate for operating conditions 1 to 5

[0237]

[0238] 3. Unknown Fault Rejection Performance. As shown in Table 3, peak faults were tested as unknown fault types. Compared with the ordinary baseline model, the unknown fault rejection index AUROC of this embodiment was improved by 35.30 percentage points to 0.8127; AUPR was improved by 33.84 percentage points to 0.7790, achieving effective rejection of unknown faults under the condition of low false positive rate.

[0239] Table 3. Test results when spike faults are treated as unknown fault types.

[0240]

[0241] 4. Generalization performance across operating conditions. As shown in Table 4, with operating conditions 1–4 as the source domain and operating condition 5 as the target domain, without using fault data from the target domain, the accuracy rate of identifying closed-set fault types in the target domain is 81.54%, the macro F1 score is 0.7683, and the fault sensor channel localization accuracy rate is 89.71%. The model maintains stable diagnostic capabilities even under operating condition deviations.

[0242] Table 4 shows the generalization performance test results across operating conditions, with conditions 1–4 as the source domain and condition 5 as the target domain.

[0243]

[0244] 5. Ablation Validation of Core Modules. As shown in Table 5, removing the short-term CNN branch reduced the fault type identification accuracy to 70.07%; removing the semantic attribute module reduced it to 78.32%; removing supervised contrastive regularization reduced it to 79.15%; and removing both the semantic module and supervised contrastive regularization resulted in an accuracy of only 72.13%. Experimental results indicate that core modules such as multi-scale branching, semantic attribute learning, and supervised contrastive regularization play a crucial role in improving diagnostic performance.

[0245] Table 5. Ablation Verification Results of Core Modules

[0246]

[0247] 6. Compare the confusion matrices of different operating conditions with the t-SNE of the SupCon feature space. Referring to Figure 5, Figure 5 shows the confusion matrices of two different operating conditions and the t-SNE of the SupCon feature space in this embodiment of the invention. SupCon (Supervised Contrastive Learning) constructs a highly discriminative representation in the feature space through a supervised contrastive learning mechanism. Its core objective is to cluster similar samples and separate dissimilar samples, thereby forming a feature space with a clear structure and high robustness. t-SNE (t-Distributed Stochastic Neighbor Embedding) is a nonlinear dimensionality reduction and data visualization technique, particularly suitable for mapping high-dimensional data, such as images, text, and gene expression data, to two-dimensional or three-dimensional space to intuitively observe the local structure and clustering patterns of the data.

[0248] Figures 5a-5f The confusion matrices and feature spaces of two different scenarios, Case 1 and Case 5, in embodiments of the present invention are shown. The classification performance and feature distribution structure of the original model and the optimized model under different scenarios are compared. Figure 5a This is a schematic diagram of the original confusion matrix of Case 1 in one embodiment of the present invention. Figure 5b This is a schematic diagram of the optimized confusion matrix in Case 1 of this embodiment of the invention. Figure 5c This is a schematic diagram of the SupCon feature space t-SNE of Case 1 in an embodiment of the present invention. Figure 5d This is a schematic diagram of the original confusion matrix of Case 5, another example in this invention. Figure 5e This is a schematic diagram of the optimized confusion matrix from Case 5, another example in this invention. Figure 5fThis is a schematic diagram of the SupCon feature space t-SNE of Case 5, another example in this invention.

[0249] From the confusion matrix results Figure 5a , Figure 5b , Figure 5d , Figure 5e As can be observed, after semantic constraints and rule optimization, the model's recognition accuracy across all categories is significantly improved, especially in easily confused categories such as drift and missing, where misclassification is significantly reduced. Compared to the original results, the optimized model has clearer classification boundaries and reduced inter-category interference. Figure 5c , Figure 5f The corresponding t-SNE feature space further demonstrates that, after introducing semantic prototypes and contrast constraints, various samples form a more compact and well-separated cluster structure in the embedding space. The overlapping areas between different fault types are significantly reduced, indicating that the model in this embodiment can learn discriminative low-dimensional semantic representations, thus providing a stable foundation for subsequent classification and open-set recognition. Figures 5a-5f This demonstrates the advantages of the embodiments of the present invention: enhanced inter-class separability, improved ability to identify easily confused categories, and a more structured representation space.

[0250] 7. Classification performance and feature distribution of closed sets.

[0251] Figure 6a This is a schematic diagram illustrating the closed-set classification performance in an embodiment of the present invention. Figure 6b This is a schematic diagram of the feature distribution in an embodiment of the present invention. Figure 6a , Figure 6b The closed-set classification results and feature space distribution on the target dataset are shown. Figure 6a The confusion matrix shows that most samples are concentrated in the diagonal region, indicating that the model has high recognition stability across categories. Meanwhile, only slight confusion exists between a few categories, demonstrating that the model in this embodiment maintains good discriminative ability when transferring between different operating conditions. Figure 6b The t-SNE visualization results show that each category exhibits a clear clustered structure in the feature space, with significant intervals between different categories. This indicates that the semantic embeddings learned by the model not only have good discriminative power but also possess a certain degree of robustness under varying data distributions. Figure 6a , Figure 6b This demonstrates the advantages of the embodiments of the present invention: cross-condition generalization capability, stable discrimination structure, and separability of low-dimensional representation.

[0252] 8. Time series detection results under different operating conditions. Figure 7a This is a schematic diagram illustrating the detection of the original signal, anomaly score, and binary detection results for a working condition (Case 3) according to an embodiment of the present invention. Figure 7b This diagram illustrates the original signal, anomaly score, and binary detection results for Case 5, another operating condition, according to an embodiment of the present invention. It showcases the model's online detection performance on flow signals, including the original signal, anomaly score, and binary detection results. In Case 3, the model accurately captures all fault intervals, and the anomaly score significantly increases and stably exceeds the threshold when a fault occurs, indicating that the model has good response capabilities to persistent faults. In Case 5, due to the weaker fault signal, the model of this embodiment can still detect the main anomaly intervals, but there are a few missed detections and short-term false alarms. This shows that under low signal-to-noise ratio conditions, the model of this embodiment still possesses a certain detection capability, but it still faces challenges with extremely weak anomalies. This highlights the advantages of this embodiment: it supports online detection, can capture complete fault segments, and still has a certain sensitivity to weak faults.

[0253] 9. Open set recognition performance ROC curve and PR curve. Figure 8a This is a schematic diagram of the ROC curve of open set recognition performance in an embodiment of the present invention. Figure 8b This is a schematic diagram of the PR (Precision-Recall Curve) curve in an embodiment of the present invention. Figure 8a , Figure 8b The performance of the method of this invention embodiment was compared with that of existing baseline methods in the task of identifying unknown faults. Figure 8a The ROC curves show that the method of this invention outperforms existing baseline methods in most threshold ranges, indicating that it has a higher discriminative ability in distinguishing between known and unknown patterns. Figure 8b The PR curve further illustrates that the model can still maintain high accuracy and recall levels even in imbalanced scenarios. Figure 8a , Figure 8b This demonstrates the advantages of the embodiments of the present invention: significantly improved ability to identify unknown faults, robustness to class imbalance, and support for deployment in open set scenarios.

[0254] 10. The correlation between semantic attribute space and physical features. Figure 9 This is a schematic diagram illustrating the correlation between semantic attribute space and physical features in an embodiment of the present invention. From Figure 9 In this study, it can be observed that different semantic attributes, such as amplitude variation, duration, suddenness, range of action, and recoverability, exhibit a clear correlation structure with physical statistical characteristics. For example, referencing... Figure 9The Pearson correlation coefficient on the right shows that amplitude correlation is positively correlated with features such as slope, duration ratio, high-frequency energy, range ratio, and recovery score, while recovery attribute is negatively correlated with some features. This indicates that the semantic space constructed in this embodiment of the invention can reflect the actual physical change patterns, rather than a purely data-driven abstract representation. Figure 9 This demonstrates the advantages of the embodiments of the present invention: the semantic space has physical interpretability, the attribute design is consistent with the actual mechanism, and the credibility of the model is improved.

[0255] 11. Segmentation performance, false alarms and delay analysis. Figure 10a This is a schematic diagram illustrating the segmented inspection accuracy analysis for five working conditions in an embodiment of the present invention. Figure 10b This is a schematic diagram illustrating the analysis of false alarm counts for five operating conditions in an embodiment of the present invention. Figure 10c This is a schematic diagram illustrating the detection delay analysis for five working conditions in an embodiment of the present invention. Figure 10a , Figure 10b , Figure 10c The model performance was evaluated from three aspects: segmented detection capability, false alarm rate, and detection latency. Figure 10a , Figure 10b , Figure 10c The evaluation results show that, under most operating conditions, the model of this embodiment can achieve a high segmented detection accuracy while keeping the number of false alarms at a low level. The overall detection latency is relatively stable, indicating that the model has good response performance in real-time monitoring scenarios. Figure 10a , Figure 10b , Figure 10c This demonstrates the advantages of the embodiments of the present invention: segmented diagnostic capability, controllable false alarms, and stable detection delay.

[0256] 12. Comparison of different indicators under different working conditions. Figure 11a This is a radar chart of the original operating conditions in an embodiment of the present invention. Figure 11b This is a radar chart of the optimized operating conditions in an embodiment of the present invention. Figure 11c This is a radar diagram showing the sensor operating conditions in an embodiment of the present invention. Figure 11a , Figure 11b , Figure 11c The performance of the original model, the optimized model, and the sensor recognition were compared. From... Figure 11a , Figure 11b , Figure 11c It can be observed that the optimized model improves the accuracy of fault type identification under various operating conditions, while maintaining a high level of sensor positioning accuracy. Compared with the original results, the optimized method performs more evenly across different operating conditions. Figure 11a , Figure 11b , Figure 11c This demonstrates the advantages of the embodiments of the present invention: multi-indicator synergistic improvement, better consistency of performance under various working conditions, and enhanced model stability.

[0257] Based on the actual monitoring needs and hardware conditions of industrial pipelines, flexible adjustments can be made. The core innovations and core processes of this invention remain unchanged. Specific feasible alternatives to this invention include:

[0258] 1. Sensor configuration replacement: In this embodiment of the invention, the number of sensors D=8: 2 pressure + 4 vibration + 2 flow. The type, number and arrangement of the sensors can be adjusted according to the actual pipeline monitoring requirements. Only the dimension of the fault sensor channel index, the channel range of fault injection and the output dimension of the prediction head need to be modified accordingly.

[0259] 2. Window parameter substitution: The window length T=200, which can be flexibly adjusted according to the sensor sampling frequency and fault evolution speed. For example, T=100 / 300, only the range of values ​​for the fault start position, the dimension of the pooling operation and the size of the model input layer need to be adjusted synchronously.

[0260] 3. Network Structure Replacement: Neural networks that capture long-term features, including: Long-Term Transformer branches, Long Short-Term Memory networks, and Gated Recurrent Units; and lightweight convolutional neural networks that capture short-term features, including: Short-Term Convolutional Neural Networks (CNN branches), Lightweight Convolutional Neural Networks (MobileNet), and Channel Shuffle Networks (ShuffleNet). These do not change the core logic of feature fusion, semantic attribute learning, and multi-task prediction.

[0261] 4. Fault Type Expansion and Replacement: Based on the five core fault types, typical fault types of industrial pipeline sensors such as gain drift and noise enhancement are added. It only requires expanding the dimension of the fault attribute matrix and designing the corresponding fault synthesis function Fc and semantic prototype.

[0262] 5. Threshold Adaptive Replacement: The fixed threshold in the unknown fault rejection and post-processing optimization is replaced with an adaptive threshold based on the working conditions. The threshold is dynamically updated by real-time collected normal working condition data to improve the diagnostic performance of the model under complex working conditions.

[0263] 6. Optimizer and Hyperparameter Replacement: The Adam optimizer can be replaced by: Stochastic Gradient Descent, AdamW optimizer with weight decay, etc. Hyperparameters such as loss weights, batch size, and initial learning rate can be flexibly adjusted according to the size and characteristics of the actual dataset to achieve better training results.

[0264] In the above alternatives, semantically guided fault injection, multi-scale feature fusion, physically interpretable fault semantic attribute space, and multi-task joint prediction are essential core structures / steps for achieving the innovative objectives of the embodiments of this invention. The remaining modules, parameters, and network structures can be flexibly adjusted according to actual engineering scenarios.

[0265] Based on the same inventive concept, see [link to inventive concept] Figure 12 As shown, this embodiment of the invention also provides a self-supervised multi-sensor fault diagnosis system based on semantic embedding. The system has a modular architecture, and each module works collaboratively through data interaction, fully covering the entire process from data acquisition to online diagnosis and alarm. Specifically, it includes: a data acquisition module, a data preprocessing module, a semantically guided fault injection module, a multi-scale feature extraction module, a semantic attribute learning module, a multi-task prediction module, a post-processing optimization module, and an online diagnosis module.

[0266] The data acquisition module is used to: acquire multi-channel physical quantity monitoring data of industrial hydraulic pipelines, including multiple sensors, such as: 2 pressure sensors, 4 pipe wall vibration sensors, 2 electromagnetic flow meters and industrial data acquisition instruments; synchronously acquire multi-channel physical quantity monitoring data of industrial hydraulic pipelines at a frequency of 10Hz and transmit it to the data preprocessing module in real time.

[0267] The data preprocessing module communicates bidirectionally with the data acquisition module and is used for: time block segmentation, sliding window generation, data normalization, dataset partitioning, and outputting a standardized multivariate window dataset to provide a data foundation for subsequent modules.

[0268] The semantic-guided fault injection module, connected to the data preprocessing module, receives pure normal operating condition window data and is used to: automatically generate fault windows and corresponding supervision signals based on the pure normal operating condition window through single-channel fault injection with semantic embedding in the time domain. The supervision signals include fault type labels, fault sensor channel labels, fault start time labels, and semantic attribute labels corresponding to the fault type, and output a training dataset with complete labels.

[0269] The multi-scale feature extraction module, connected to the data preprocessing module and the semantically guided fault injection module, is used to: receive pure normal operating condition window and fault window data; design a dual-branch multi-scale backbone network including a long-term Transformer branch and a short-term Convolutional Neural Network (CNN) branch; extract features from the training sample window composed of the pure normal operating condition window and the fault window through the dual-branch multi-scale backbone network; concatenate the extracted long-term temporal dependency features and short-term local transient features to obtain fused features; and map the fused features to a shared fault feature representation through a shared embedded multilayer perceptron (MLP).

[0270] The semantic attribute learning module, connected to the multi-scale feature extraction module, receives shared fault feature representations and is used for: defining fault attributes based on the physical degradation mechanism of sensor faults, constructing a fault attribute matrix, mapping the attribute levels of each fault type to attribute values ​​within a preset numerical range, and obtaining a quantitative representation of fault semantics; mapping the fault attribute matrix to a latent semantic space to generate a semantic prototype library; based on the shared fault feature representations, learning through an attribute regressor (a multilayer perceptron, MLP) to obtain predicted fault attribute vectors, the dimension of which is consistent with the dimension of the fault semantic prototypes, thus realizing the mapping from the shared fault feature representations to the semantic attribute space; calculating the semantic similarity between the predicted fault attribute vectors and each fault semantic prototype in the semantic prototype library, realizing explicit representation and matching of fault semantics, and supporting closed-set fault identification and unknown fault rejection.

[0271] The multi-task prediction module, connected to the multi-scale feature extraction module and the semantic attribute learning module, receives shared fault feature representations and semantic similarity. It is used to: construct a multi-task prediction head based on the shared fault feature representations and semantic similarity. This multi-task prediction head includes a fault type prediction head, a fault sensor channel prediction head, and a fault start time prediction head, outputting fault type prediction results, fault sensor channel prediction results, and fault start time prediction results, respectively; construct a fault type classification loss based on the fault type prediction results and the fault type labels in the supervision signal; construct a fault sensor channel localization loss based on the fault sensor channel prediction results and the fault sensor channel labels in the supervision signal; construct a start time regression loss based on the fault start time prediction results and the fault start time labels in the supervision signal; and construct a semantic attribute consistency loss based on the predicted fault attribute vector and the semantic attribute labels in the supervision signal. Based on these losses, a multi-task loss function is designed to train the end-to-end fault diagnosis model.

[0272] The post-processing optimization module, connected to the multi-task prediction module, is used to: correct the preliminary prediction results of easily confused fault types; deploy the trained end-to-end fault diagnosis model and the post-processing optimization module to the online monitoring system; perform windowing and normalization processing on the real-time multi-sensor streaming data; input the data into the end-to-end fault diagnosis model to obtain preliminary prediction results of fault type identification, fault sensor channel location, and fault start time estimation; and correct the easily confused fault diagnosis results through the post-processing optimization module to obtain the online fault diagnosis results.

[0273] The online diagnostic module, in collaboration with all the above modules, serves as the core scheduling and output unit of the system. It enables real-time processing of streaming data, multi-task diagnostics, unknown fault identification, fragment-level fault detection, and online alarms, and outputs visualized diagnostic reports and fault alarm information.

[0274] Based on the same inventive concept, embodiments of the present invention also provide an electronic device, including: at least one processor, at least one memory, and a communication interface, wherein the processor, memory, and communication interface communicate with each other; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the self-supervised multi-sensor fault diagnosis method based on semantic embedding in the embodiments of the present invention.

[0275] Based on the same inventive concept, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing computer instructions that cause a computer to execute the self-supervised multi-sensor fault diagnosis method based on semantic embedding in embodiments of the present invention.

Claims

1. A self-supervised multi-sensor fault diagnosis method based on semantic embedding, characterized in that, Includes the following steps: S1. Preprocess the original normal operating condition monitoring data: time block segmentation, sliding window generation and normalization to obtain a pure normal operating condition window; Based on the normal operating condition window, a fault window is generated by single-channel fault injection with semantic embedding in the time domain. A supervision signal is automatically generated for the generated fault window. The supervision signal includes fault type label, fault sensor channel label, fault start time label and semantic attribute label corresponding to the fault type. S2. Design a dual-branch multi-scale backbone network including a long-term Transformer branch and a short-term Convolutional Neural Network (CNN) branch. The dual-branch multi-scale backbone network extracts features from the training sample window consisting of a pure normal working condition window and a fault window. The extracted long-term temporal dependent features and short-term local transient features are concatenated to obtain fused features. The fused features are mapped to a shared fault feature representation through a shared embedded multilayer perceptron (MLP). Based on semantic attribute learning, explicit representation and matching of fault semantics are achieved: fault attributes are defined based on the physical degradation mechanism of sensor faults, a fault attribute matrix is ​​constructed, and the attribute level of each fault type is mapped to the attribute value within a preset numerical range to obtain a quantitative representation of fault semantics. The fault attribute matrix is ​​mapped to the latent semantic space to generate a semantic prototype library. Based on the shared fault feature representation, the attribute regressor is learned through an attribute regressor, which is a multilayer perceptron (MLP), to obtain a predicted fault attribute vector. The dimension of the predicted fault attribute vector is consistent with the dimension of the fault semantic prototype, thus realizing the mapping from the shared fault feature representation to the semantic attribute space. The semantic similarity between the predicted fault attribute vector and each fault semantic prototype in the semantic prototype library is calculated. S3. Based on shared fault feature representation and semantic similarity, construct a multi-task prediction head, which includes a fault type prediction head, a fault sensor channel prediction head, and a fault start time prediction head, and outputs the fault type prediction result, the fault sensor channel prediction result, and the fault start time prediction result, respectively. Based on the fault type prediction results and the fault type labels in the supervision signal, a fault type classification loss is constructed. Based on the fault sensor channel prediction results and the fault sensor channel labels in the supervision signal, a fault sensor channel localization loss is constructed; based on the fault start time prediction results and the fault start time labels in the supervision signal, a start time regression loss is constructed; based on the predicted fault attribute vector and the semantic attribute labels in the supervision signal, a semantic attribute consistency loss is constructed. Based on the above losses, a multi-task loss function is designed to train the end-to-end fault diagnosis model. S4. Construct a lightweight rule-based post-processing optimization module, deploy the trained end-to-end fault diagnosis model and the post-processing optimization module to the online monitoring system, perform windowing and normalization processing on the real-time multi-sensor streaming data, input the data into the end-to-end fault diagnosis model, and obtain preliminary prediction results for fault type identification, fault sensor channel location, and fault start time estimation. Correct easily confused preliminary fault diagnosis results through the post-processing optimization module to obtain the final online fault diagnosis result.

2. The self-supervised multi-sensor fault diagnosis method based on semantic embedding as described in claim 1, characterized in that: In step S1, the process of generating a fault window based on a pure normal operating condition window through single-channel fault injection with semantic embedding in the time domain, and automatically generating a monitoring signal for the generated fault window, includes the following steps: A fault injection function is used to randomly select the time series of the target sensor channel within a normal operating window, perturb it, and generate a fault window. Fault types include drift fault, spike fault, offset fault, jamming fault, and missing fault. Fault type labels are generated based on the selected fault type; fault sensor channel labels are generated based on the selected target sensor channel; fault start time labels are generated based on the selected fault start time; and semantic attribute labels are generated based on the corresponding fault semantic prototype in the semantic prototype library. Sensor localization loss and start time regression loss are calculated only based on the fault window.

3. The self-supervised multi-sensor fault diagnosis method based on semantic embedding as described in claim 2, characterized in that: In step S2, the extracted long-term temporal dependency features and short-term local transient features are concatenated to obtain fused features, which includes the following steps: The long-term Transformer branch extracts features from the training sample window data, capturing long-term temporal dependencies and slowly evolving fault features: the Transformer encoder captures the correlation between sensors and long-term temporal dependencies through a self-attention mechanism, generates temporal features, and performs temporal average pooling on the temporal features to obtain a fixed-dimensional global long-term feature descriptor; the short-term CNN branch extracts features from the training sample window, extracting local transient features and sudden fault features: it captures signal changes at local time steps through convolutional kernels, generates a temporal feature map, and performs temporal attention pooling on the temporal feature map to obtain a fixed-dimensional local short-term feature descriptor; Long-term Transformer branches and short-term CNN branches perform feature extraction in parallel; The global long-term feature descriptor is concatenated with the local short-term feature descriptor to obtain the fused feature.

4. The self-supervised multi-sensor fault diagnosis method based on semantic embedding as described in claim 3, characterized in that: In step S2, the explicit representation and matching of fault semantics based on semantic attribute learning also includes the following steps: constructing a semantically guided multi-objective multi-sensor fault diagnosis model SEMA-FDNet. The work of the SEMA-FDNet fault diagnosis model includes an offline training phase and an online testing phase. The offline training phase includes: (a) windowing and normalizing historical normal data; (b) training the SEMA-FDNet fault diagnosis model through the encoder and multi-task head; (c) fault attributes include: amplitude variation, duration, impulsivity, impact range, and recoverability, realizing the mapping from fault attributes to semantic attributes and learning semantic attributes; (d) constructing a semantic prototype library and performing end-to-end training on the SEMA-FDNet fault diagnosis model: training the semantic prototype library through category prototypes and distance statistics. The online testing phase includes: (e) real-time processing of multi-sensor streaming signals: window partitioning and normalization; (f) model inference: obtaining the trained SEMA-FDNet fault diagnosis model by freezing the encoder and task head; (g) inferring the distance to the semantic prototype based on semantic reasoning; (h) outputting multi-task diagnosis results: fault type, fault sensor channel, fault start time, unknown category and segment-level fault alarm.

5. The self-supervised multi-sensor fault diagnosis method based on semantic embedding as described in claim 4, characterized in that: In step S3, a multi-task prediction head is constructed based on shared fault feature representation and semantic similarity. The multi-task prediction head includes a fault type prediction head, a fault sensor channel prediction head, and a fault start time prediction head, which respectively output the fault type prediction result, the fault sensor channel prediction result, and the fault start time prediction result, including the following steps: The shared fault feature representation is input into the fault type prediction head of the multilayer perceptron (MLP) to obtain the basic log odds of the fault type. The basic log odds of the fault type are then fused with semantic similarity to obtain the final log odds of the fault type. The final log odds of the fault type are converted into the fault type prediction probability through a normalized exponential function, and the fault type prediction result is output. The shared fault feature representation is input into the fault sensor channel prediction head of the multilayer perceptron (MLP) to obtain the log probability of the fault sensor channel. The log probability of the fault sensor channel is converted into the fault sensor channel localization prediction probability through a normalized exponential function, and the fault sensor channel prediction result is output. The shared fault feature representation is input into the fault start time prediction head of the multilayer perceptron (MLP). The output is normalized to a preset interval using the Sigmoid function to obtain the fault start time prediction value. This value is then mapped to the time step index within the window, which is the predicted fault occurrence time step. This is obtained by multiplying the window length by the predicted normalized start time to get the fault start time prediction result.

6. The self-supervised multi-sensor fault diagnosis method based on semantic embedding as described in claim 5, characterized in that: In step S3, designing the multi-task loss function and training the end-to-end fault diagnosis model includes the following steps: We employ a weighted multi-task objective function to train the SEMA-FDNet fault diagnosis model end-to-end, integrating multiple loss types: fault type loss, fault sensor channel loss, fault initiation time loss, attribute regression loss, supervised comparison loss, and total loss. We also introduce supervised comparison regularization to improve the model's feature representation capability and multi-task diagnostic accuracy.

7. The self-supervised multi-sensor fault diagnosis method based on semantic embedding as described in claim 6, characterized in that: In step S4, the step of correcting easily confused preliminary fault diagnosis results through the post-processing optimization module includes the following steps: Fuzzy region trigger: Set a fuzzy region for fault prediction. When the model’s initial prediction result is a stuck or missing fault, the rule optimization process will be automatically triggered. Key Statistical Extraction: For the predicted faulty sensor channel, two core window-level statistics are extracted after the fault initiation time: zero-value ratio and variance collapse, which quantify the numerical distribution and fluctuation characteristics of the signal. Threshold judgment and result correction: Based on the empirical distribution of the normal window in the training set, the above statistics are calibrated with thresholds, and the thresholds are fixed during the testing and online phases; based on the comparison results between the statistics and the thresholds, the mutual misjudgment problem of stuck / missing faults is corrected.

8. A self-supervised multi-sensor fault diagnosis system based on semantic embedding, characterized in that, include: The data acquisition module is used to collect multi-channel physical quantity monitoring data of industrial hydraulic pipelines, including multiple sensors; The data preprocessing module communicates bidirectionally with the data acquisition module and is used for: time block segmentation, sliding window generation, data normalization, dataset partitioning, and outputting a standardized multivariate window dataset. The semantic-guided fault injection module is connected to the data preprocessing module. It receives pure normal operating condition window data and is used to: automatically generate fault windows and corresponding supervision signals based on pure normal operating condition windows through single-channel fault injection with semantic embedding in the time domain. The supervision signals include fault type labels, fault sensor channel labels, fault start time labels, and semantic attribute labels corresponding to the fault type. It outputs a training dataset with complete labels. The multi-scale feature extraction module, connected to the data preprocessing module and the semantically guided fault injection module, is used to: receive pure normal operating condition window and fault window data, design a dual-branch multi-scale backbone network including a long-term Transformer branch and a short-term convolutional neural network (CNN) branch, extract features from the training sample window composed of the pure normal operating condition window and the fault window through the dual-branch multi-scale backbone network, concatenate the extracted long-term temporal dependency features and short-term local transient features to obtain fused features, and map the fused features to a shared fault feature representation through a shared embedded multilayer perceptron (MLP). The semantic attribute learning module, connected to the multi-scale feature extraction module, receives shared fault feature representations and is used to: define fault attributes based on the physical degradation mechanism of sensor faults, construct a fault attribute matrix, map the attribute levels of each fault type to attribute values ​​within a preset numerical range, and obtain a quantitative representation of fault semantics. The fault attribute matrix is ​​mapped to the latent semantic space to generate a semantic prototype library. Based on the shared fault feature representation, a multilayer perceptron (MLP) is used to learn the predicted fault attribute vector. The dimension of the predicted fault attribute vector is consistent with the dimension of the fault semantic prototype, thus realizing the mapping from the shared fault feature representation to the semantic attribute space. The semantic similarity between the predicted fault attribute vector and each fault semantic prototype in the semantic prototype library is calculated to realize the explicit representation and matching of fault semantics, supporting the identification of closed-set faults and the rejection of unknown faults. The multi-task prediction module, connected to the multi-scale feature extraction module and the semantic attribute learning module, receives shared fault feature representations and semantic similarity, and is used to: construct a multi-task prediction head based on the shared fault feature representations and semantic similarity, wherein the multi-task prediction head includes a fault type prediction head, a fault sensor channel prediction head, and a fault start time prediction head, and outputs fault type prediction results, fault sensor channel prediction results, and fault start time prediction results, respectively; and construct a fault type classification loss based on the fault type prediction results and the fault type labels in the supervision signal. Based on the fault sensor channel prediction results and the fault sensor channel labels in the supervision signal, a fault sensor channel localization loss is constructed; based on the fault start time prediction results and the fault start time labels in the supervision signal, a start time regression loss is constructed; based on the predicted fault attribute vector and the semantic attribute labels in the supervision signal, a semantic attribute consistency loss is constructed. Based on the above losses, a multi-task loss function is designed to train the end-to-end fault diagnosis model. The post-processing optimization module, connected to the multi-task prediction module, is used to: correct the preliminary prediction results of easily confused fault types; deploy the trained end-to-end fault diagnosis model and the post-processing optimization module to the online monitoring system, perform windowing and normalization processing on the real-time multi-sensor streaming data, input it into the end-to-end fault diagnosis model, obtain the preliminary prediction results of fault type identification, fault sensor channel location and fault start time estimation, and correct the easily confused fault diagnosis results through the post-processing optimization module to obtain the final online fault diagnosis result; The online diagnostic module, in collaboration with all the above modules, serves as the core scheduling and output unit of the system. It enables real-time processing of streaming data, multi-task diagnostics, unknown fault identification, fragment-level fault detection, and online alarms, and outputs visualized diagnostic reports and fault alarm information.

9. An electronic device, characterized in that, include: The system includes at least one processor, at least one memory, and a communication interface, wherein the processor, memory, and communication interface communicate with each other. The memory stores program instructions that can be executed by a processor; the processor invokes the program instructions to execute the self-supervised multi-sensor fault diagnosis method based on semantic embedding as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions; the computer instructions cause the computer to execute the self-supervised multi-sensor fault diagnosis method based on semantic embedding as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • End-to-end fault diagnosis and identification method based on multi-modal fusion

    CN120892864A

  • Zero-sample composite fault diagnosis method based on semantic graph embedding and multi-stage fusion

    CN121188457A