Predictive maintenance-oriented mechanical seal leakage rate online monitoring method and system

By collecting and preprocessing multidimensional sensor data to perform causal inference, constructing a causal feature set, and using a causal attention neural network model, the problem of predicting and diagnosing the leakage rate of mechanical seals under dynamic operating conditions was solved, achieving accurate and robust leakage rate prediction and interpretable prediction results.

CN121612502APending Publication Date: 2026-03-06韩国勇
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511859336.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately predict mechanical seal leakage rates and diagnose the root causes of leakage under dynamic and nonlinear operating conditions, resulting in uninterpretable predictions and poor robustness.

Method used

By collecting multi-dimensional sensor data, performing preprocessing, and then conducting time-series causal inference, the system identifies direct causal variables and confounding variables, constructs a causal feature set, uses a causal attention neural network model for prediction, monitors in real time, and triggers dynamic model updates based on performance evaluation results.

Benefits of technology

It achieves accurate and robust prediction of mechanical seal leakage rate under complex dynamic operating conditions, has causal interpretability, and improves the decision accuracy of predictive maintenance and the system's adaptive capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121612502A_ABST
    Figure CN121612502A_ABST
Patent Text Reader

Abstract

The invention relates to a predictive maintenance-oriented mechanical seal leakage rate on-line monitoring method and a predictive maintenance-oriented mechanical seal leakage rate on-line monitoring system. According to the method, historical data of a multi-dimensional sensor is collected and preprocessed, and causal inference is carried out based on a time sequence relation so as to accurately identify a direct reason variable and a hybrid variable which influence the leakage rate and quantify a causal effect of the direct reason variable and the hybrid variable; then, a special causal feature set is constructed by utilizing the causal knowledge to train an attention neural network model deeply fused with causal effect intensity, finally, the model is utilized to perform online monitoring and prediction on real-time data, and dynamic updating of the model is triggered according to a performance evaluation result of a prediction sequence. Therefore, more accurate, more robust and causal interpretable prediction of the mechanical seal leakage rate under the complex dynamic working condition is realized, and the decision accuracy of predictive maintenance and the system adaptive capacity are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of mechanical engineering and artificial intelligence, and in particular relates to an online monitoring method and system for mechanical seal leakage rate for predictive maintenance. Background Technology

[0002] In predictive maintenance in the industrial sector, the leakage rate of mechanical seals is a key indicator for assessing their health status and preventing unplanned downtime. Traditional online monitoring methods mainly rely on time series models or machine learning models based on statistical correlation, such as autoregressive integral moving average models or long short-term memory networks. These methods can achieve a certain level of accuracy in steady-state or gently changing operating conditions, but their essence is to mine statistical correlation patterns in historical data rather than revealing the inherent causal mechanisms between variables. When equipment is under highly dynamic operating conditions such as variable speed and load, complex nonlinear interactions occur between operating parameters such as the rate of change of speed and load impact and multi-dimensional monitoring signals such as vibration and temperature, causing the leakage rate to exhibit strong time-varying characteristics. At this time, due to the "black box" nature of traditional models, it is difficult to distinguish which are the root causes of the leakage rate changes and which are accompanying related phenomena or confounding factors. This leads to the learned patterns of the model being heavily dependent on the specific operating condition combinations covered by the training data. The prediction results may be "accurate" but "uninterpretable." Once faced with dynamic operating condition combinations that have not been trained on, the model's predictive performance drops sharply, resulting in poor robustness. More importantly, maintenance personnel cannot determine from the model's predictions which abnormal change in operating parameters "caused" the increased risk of leakage, making it difficult to formulate precise intervention measures.

[0003] Therefore, the core bottleneck of existing technologies lies in how to not only predict "how the leakage rate will change" under dynamic and nonlinear conditions, but also diagnose "what caused this change", so as to build a model that has both strong extrapolation prediction capabilities and causal interpretability. Summary of the Invention

[0004] Therefore, it is necessary to provide an online monitoring method and system for mechanical seal leakage rate for predictive maintenance, addressing the aforementioned technical problems.

[0005] In a first aspect, this application provides an online monitoring method for mechanical seal leakage rate for predictive maintenance, including:

[0006] S1. Collect time series historical data of the mechanical seal system under dynamic working conditions from multi-dimensional sensors, preprocess the time series historical data, and obtain the preprocessed time series historical dataset.

[0007] S2. Based on the processed time series historical dataset, perform time series causal inference processing to obtain the set of direct cause variables that have a direct causal effect on the leakage rate, the set of confounding variables that have a confounding effect on the leakage rate, and the causal effect strength of each variable in the set of direct cause variables on the leakage rate.

[0008] S3. Based on the set of direct cause variables, the set of confounding variables, and the intensity of causal effects, causal feature construction is performed on the preprocessed multidimensional time series dataset to generate a causal feature set.

[0009] S4. Train the prediction model using the causal feature set as input to obtain the trained leakage rate prediction model; wherein, the prediction model is a causal attention neural network model that integrates the strength of causal effects.

[0010] S5. Based on the collected real-time sensor data, the leakage rate prediction model is used for monitoring, and the real-time leakage rate prediction value is output.

[0011] S6. Based on the sequence of real-time leakage rate prediction values, the mechanical seal performance is evaluated to obtain the evaluation results; when the evaluation results meet the preset update trigger conditions, the dynamic update of the leakage rate prediction model is triggered.

[0012] Secondly, this application also provides an online monitoring system for mechanical seal leakage rate for predictive maintenance, used to implement the method described in the first aspect, the system comprising:

[0013] The time series data preprocessing module is used to collect the time series historical data of the mechanical seal system under dynamic working conditions from multi-dimensional sensors, preprocess the time series historical data, and obtain the preprocessed time series historical dataset.

[0014] The causal effect analysis module is used to perform time-series causal inference processing based on the processed time-series historical dataset to obtain the set of direct cause variables that have a direct causal effect on the leakage rate, the set of confounding variables that have a confounding effect on the leakage rate, and the strength of the causal effect of each variable in the set of direct cause variables on the leakage rate.

[0015] The feature fusion construction module is used to construct causal features from the preprocessed multidimensional time series dataset based on the set of direct cause variables, the set of confounding variables, and the intensity of causal effects, thereby generating a causal feature set.

[0016] The prediction model training module is used to train the prediction model with the causal feature set as input to obtain the trained leakage rate prediction model; the prediction model is a causal attention neural network model that integrates the strength of causal effects.

[0017] The real-time leakage monitoring module is used to monitor leakage based on the collected real-time sensor data and a leakage rate prediction model, and outputs a real-time leakage rate prediction value.

[0018] The dynamic optimization decision module is used to evaluate the mechanical seal performance based on a sequence of real-time leakage rate prediction values ​​and obtain evaluation results. When the evaluation results meet the preset update trigger conditions, the dynamic update of the leakage rate prediction model is triggered.

[0019] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement an online monitoring method for predictive maintenance of mechanical seal leakage rate as described in the first aspect.

[0020] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an online monitoring method for predictive maintenance of mechanical seal leakage rate as described in the first aspect.

[0021] The aforementioned method and system for online monitoring of mechanical seal leakage rate for predictive maintenance collects and preprocesses historical data from multi-dimensional sensors. Based on the temporal relationships, it performs causal inference to accurately identify the direct causal variables and confounding variables affecting the leakage rate and quantifies their causal effects. Then, it uses this causal knowledge to construct a dedicated causal feature set to train an attention neural network model that deeply integrates the strength of causal effects. Finally, it uses this model to monitor and predict real-time data online and triggers dynamic updates of the model based on the performance evaluation results of the predicted sequence. This achieves more accurate, robust, and causally interpretable prediction of mechanical seal leakage rate under complex dynamic operating conditions, effectively improving the decision-making accuracy and system adaptability of predictive maintenance. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart illustrating an online monitoring method for mechanical seal leakage rate for predictive maintenance provided by this invention;

[0024] Figure 2 This is a schematic diagram of the process of performing time-series causal inference based on a processed time-series historical dataset in one optional embodiment of the present invention;

[0025] Figure 3 This invention provides a schematic diagram of an online monitoring system for the leakage rate of mechanical seals for predictive maintenance. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0027] refer to Figure 1 The document presents a flowchart illustrating an online monitoring method for predictive maintenance of mechanical seal leakage rates, as provided in this application. The method includes the following steps:

[0028] S1. Collect time series historical data of the mechanical seal system under dynamic working conditions from multi-dimensional sensors, preprocess the time series historical data, and obtain the preprocessed time series historical dataset.

[0029] Specifically, when collecting time-series historical data from multi-dimensional sensors for mechanical seal systems under dynamic operating conditions, priority should be given to covering common dynamic operating conditions of mechanical seals in industrial scenarios, including typical conditions such as variable speed operation, load fluctuations, and changes in media parameters, to ensure that the collected data can reflect the operating status of the system under different dynamic conditions. The selection and arrangement of multi-dimensional sensors revolve around the key factors affecting the leakage rate of mechanical seals. Specifically, this should include speed sensors for monitoring the operating status of rotating parts of the mechanical seal, load sensors for reflecting load changes, vibration sensors for capturing the vibration characteristics of sealing components, temperature sensors for monitoring the temperature of the sealing contact surface and the medium, pressure sensors for measuring the pressure inside the sealing cavity, stress sensors for monitoring the stress distribution of key sealing components, level sensors for monitoring the liquid level in the sealing cavity or medium storage area, and leakage detection sensors directly related to the leakage status. All sensors need to collect data synchronously to ensure consistency in the time dimension.

[0030] Data preprocessing is used to eliminate interference factors in the raw data and standardize the data format. First, data alignment is performed. Due to differences in response speed among different types of sensors, the timestamp of the fastest-responding sensor (usually a vibration sensor) is used as a benchmark to time-calibrate the data from other sensors, ensuring that all sensor data correspond one-to-one at the same time point. Next, missing value handling is performed. For missing data, an appropriate imputation method is selected based on the duration of the missing data: when the number of missing consecutive sampling points is small, linear interpolation is used for imputation, with the following formula:

[0031]

[0032] In the formula, Let be the missing values ​​at time t. The valid value of the sampling point before time t. The formula calculates the reasonable value of the missing position by using the linear relationship between adjacent valid data points. When there are many missing consecutive sampling points, an interpolation method based on the similarity of working conditions is adopted. By searching for segments in historical data that have the same working condition characteristics as the missing segment, the missing value is filled by using the data analysis rules of similar segments.

[0033] After handling missing values, outlier handling is performed using an outlier identification method based on data distribution characteristics. First, the statistical characteristics of each sensor's data are calculated. Then, outlier data is filtered out by setting a reasonable threshold range. For identified outliers, a locally weighted regression method is used for correction to avoid information loss caused by directly removing data. Finally, data normalization is performed using the Z-score standardization method, the formula of which is... In the formula The normalized variable values, These are the original variable values ​​before normalization. This represents the mean of the variable across the entire historical dataset. The standard deviation of this variable in the full historical data is used to convert sensor data with different dimensions and numerical ranges into standardized data with a unified distribution. This provides a suitable data foundation for subsequent causal inference and model training, and finally forms a preprocessed time series historical dataset.

[0034] S2. Based on the processed time series historical dataset, perform time-series causal inference processing to obtain the set of direct cause variables that have a direct causal effect on the leakage rate, the set of confounding variables that have a confounding effect on the leakage rate, and the causal effect strength of each variable in the set of direct cause variables on the leakage rate.

[0035] Specifically, the scope of the inferred variables is first clarified, the preprocessed multidimensional sensor variables are used as the candidate causal variable set, the leakage rate is used as the target variable, and a time-series correlation analysis framework between the variables is constructed.

[0036] The first step is to determine the optimal lag order. Since the influence of various variables on the leakage rate in the mechanical seal system has a time delay, the effective lag range of each candidate variable on the target variable needs to be determined using the Akaike Information Criterion (AIC). The AIC calculation formula is as follows: In the formula The number of parameters in the model. The likelihood function value of the model is obtained by constructing regression models of candidate variables and target variables under different lag orders, calculating the AIC value of each model, selecting the lag order corresponding to the model with the smallest AIC value as the optimal lag order of that variable, and finally taking the maximum value of the optimal lag orders of all variables as the global lag order to ensure coverage of all potential time-series effects between variables.

[0037] The second step involves conducting a conditional independence test. Based on the determined global lag order, partial conditional mutual information (PCMI) is used to measure the strength of the association between the candidate variable and the target variable, controlling for the influence of other variables. The PCMI calculation formula is as follows:

[0038]

[0039] In the formula, As candidate causal variables, The target variable is the leakage rate. To control the set of variables, This indicates the control set of control variables. Under the influence of the candidate variable, measure the candidate variable With target variable The strength of the correlation between them For variables , , The joint probability density function, For in variable under conditions and The conditional joint probability density function, For in variable under conditions The conditional probability density function, For in variable under conditions The conditional probability density function is used. By calculating the PCMI value under different sets of control variables, if the PCMI value is greater than the set significance threshold, it is determined that the candidate variable and the target variable are still significantly associated after controlling for other variables; otherwise, they are determined to be conditionally independent.

[0040] The third step involves causal structure learning. Based on the results of the conditional independence test, a causal graph between variables is constructed. By eliminating conditionally independent variable pairs, variable pairs with significant correlations are retained. The causal direction is determined by combining the temporal sequence relationship (the causal variable occurs earlier than the target variable). This distinguishes the set of direct causal variables that have a direct causal effect on the leakage rate, as well as the set of confounding variables that interfere with the relationship between the leakage rate and the direct causal variables.

[0041] The fourth step is to calculate the strength of the causal effect. A causal effect assessment model is used, based on the time-series data of the direct cause variables and the leakage rate, to construct a causal regression model. The influence of each direct cause variable on the leakage rate is quantified through model coefficients or marginal effect values. The calculation formula is as follows:

[0042]

[0043] In the formula, For the strength of causal effect, To include direct cause variables Set as value target variable The expected value of (leakage rate) To include direct cause variables Set as value target variable The expected value is obtained by calculating the causal effect strength of each direct cause variable on the leakage rate through this formula, which provides a causal basis for subsequent feature construction and model training.

[0044] S3. Based on the set of direct cause variables, the set of confounding variables, and the intensity of causal effects, causal feature construction is performed on the preprocessed multidimensional time series dataset to generate a causal feature set.

[0045] Specifically, causal features are constructed based on the set of direct cause variables, the set of confounding variables, and the strength of causal effects. A multi-level feature extraction and integration scheme is designed around the core objectives of preserving causal information and eliminating confounding interference. First, for the set of direct cause variables, direct causal features are constructed. Considering the time-cumulative effect of the direct cause variables on the leakage rate, a sliding window analysis is performed on the time-series data of each direct cause variable. Statistical characteristics within each sliding window are calculated, including mean, variance, peak value, trough value, and trend slope, to capture the changing patterns of variables in different time segments. The length of the sliding window is set based on the global lag order determined in step S2 to ensure coverage of the complete time range over which the variables affect the leakage rate.

[0046] Secondly, for the confounding variable set, confounding correction features are constructed. Since confounding variables can interfere with the association between the direct causal variable and the leakage rate, their influence needs to be eliminated through statistical correction methods. The regression residual method is used, with the leakage rate as the dependent variable and the confounding variable set as the independent variables, to construct a regression model. The residuals of the model are calculated, and these residuals represent the corrected leakage rate after eliminating the influence of confounding variables. Then, this corrected value is correlated with the time-series data of the direct causal variable to construct features containing confounding correction information. The calculation formula is as follows: In the formula The residual value of leakage rate after eliminating confounding effects, This is the original leakage rate value. For a mixed set of variables The regression model constructed for the independent variables The predicted value is obtained through this formula, which eliminates the interference of confounding variables and retains the true correlation information between the direct cause variable and the leakage rate.

[0047] Finally, based on the strength of the causal effect, a weighted feature of the causal effect is constructed. To highlight the impact of direct cause variables with high causal effect strength on the leakage rate, the statistical features constructed for each direct cause variable are assigned weights based on the strength of the causal effect. The weight calculation formula is as follows:

[0048]

[0049] In the formula, For the first The feature weights of the direct cause variables For the first The strength of the causal effect of each direct cause variable on the leakage rate. The total number of variables in the direct cause variable set. This is the sum of the absolute values ​​of the causal effect strengths of all direct cause variables. The statistical characteristics of each direct cause variable are multiplied by its corresponding weight to obtain the causal effect weighted features. These direct causal features, confounding correction features, and causal effect weighted features are then integrated to form the final causal feature set. This feature set contains both information on the temporal changes of variables and information on causal relationships and effect strengths, providing high-quality input features for subsequent predictive models.

[0050] S4. Train the prediction model using the causal feature set as input to obtain the trained leakage rate prediction model; wherein, the prediction model is a causal attention neural network model that integrates the strength of causal effects.

[0051] Specifically, when training a prediction model using a causal feature set as input, the causal attention neural network model incorporates causal effect strength information into the traditional neural network structure. It highlights the influence of key causal features through an attention mechanism, improving the model's prediction accuracy and interpretability. The model structure mainly consists of four parts: an input layer, a causal attention layer, a hidden layer, and an output layer. The design and function of each layer must revolve around the utilization of causal features.

[0052] The role of the input layer is to receive the causal feature set and perform dimensional adaptation. Each feature in the causal feature set is used as an input node. The number of nodes in the input layer is determined according to the number of features. At the same time, the input features are standardized to ensure that each feature participates in model training within the same numerical range, thus avoiding model training bias caused by differences in feature dimensions.

[0053] The causal attention layer is the core of the model. Its function is to calculate the attention weights of each input feature based on the strength of the causal effect, thereby focusing on key causal features. The calculation of attention weights involves two steps: First, initial weights are determined based on the strength of the causal effect, using the causal effect strength corresponding to each direct cause variable obtained in step S2 as the initial weights for the relevant features of that variable. Second, the weights are dynamically adjusted through the attention mechanism. Considering the mutual influence between features, the initial weights are normalized using the Softmax function to obtain the final attention weights, calculated using the following formula:

[0054]

[0055] In the formula, For the first Attention weights for each causal feature, For the first Each causal feature corresponds to an initial weight based on the strength of the causal effect. For the first The feature values ​​of each causal feature in the current training sample. The total number of features in the causal feature set. It is an exponential function. For all causal characteristics The sum of values. The attention weights calculated using this formula can simultaneously combine the strength of causal effects and the magnitude of feature values, dynamically adjusting the contribution of each feature to the model output, making the model pay more attention to causal features that have a significant impact on the leakage rate.

[0056] The hidden layers employ a multi-layer fully connected structure. The number of neurons in each layer is determined based on the model's complexity requirements. The ReLU activation function is typically used to introduce non-linear transformation capabilities, as shown in the formula:

[0057]

[0058] In the formula, For the first The output of the hidden layer, For the first The weight matrix of the hidden layer, For the first The output of the layer (which can be a causal attention layer or the previous hidden layer), For the first The bias term of the hidden layer, The ReLU activation function is expressed as follows: By employing nonlinear transformations across multiple hidden layers, the model can capture the complex relationships between causal features, thereby improving its ability to fit the changing patterns of leakage rates.

[0059] The output layer uses a linear activation function, and the predicted output leakage rate is calculated using the following formula: In the formula This is the predicted value of the leakage rate. This is the weight matrix of the output layer. This is the output of the last hidden layer. This represents the bias term for the output layer. During model training, the mean squared error (MSE) is used as the loss function, as shown in the formula: In the formula, The number of training samples, For the first The true value of the leakage rate for each sample. For the first The leakage rate prediction value for each sample is obtained. The loss function is minimized by the gradient descent optimization algorithm, and the weights and biases of each layer of the model are continuously adjusted until the prediction error of the model on the validation set converges to a stable range, thus obtaining the trained leakage rate prediction model.

[0060] S5. Based on the collected real-time sensor data, the system monitors the leakage rate using a leakage rate prediction model and outputs a real-time leakage rate prediction value.

[0061] Specifically, the acquisition of real-time sensor data needs to establish variable dimensions consistent with the historical data acquisition system to ensure data homogeneity and comparability. The acquisition process adopts a combination of periodic triggering and event-driven methods. Periodic triggering acquires sensor data at fixed time intervals to ensure data continuity; event-driven methods automatically increase the acquisition frequency when sudden changes in operating conditions (such as a sudden increase in speed or load impact) are detected to avoid data loss in critical dynamic processes. The data transmission link must adopt an industrial-grade low-latency transmission protocol to ensure that the transmission delay of sensor data from the acquisition end to the computing end is controlled within a preset range. At the same time, data verification mechanisms (such as cyclic redundancy check) are used to eliminate distorted data that occurs during transmission, ensuring the integrity of the original data.

[0062] The real-time data preprocessing stage needs to continue the core logic of preprocessing in S1 and perform real-time adaptation while meeting low latency requirements. Data alignment is achieved through a timestamp synchronization mechanism. Using the system's unified clock as a reference, the timestamps of data from each sensor are calibrated. The calibration process follows a formula. ,in For the calibrated unified timestamp, The raw timestamps collected by the sensor. A fixed delay is set for the i-th sensor relative to the system's unified clock (this delay is predetermined through offline calibration experiments and stored in the parameter library) to ensure that data from different sensors are perfectly matched in the time dimension. Outlier handling employs the sliding window median absolute deviation (MAD) criterion. The sliding window length is set to a fixed number of sampling points, and the window dynamically slides with the input of new data. The median of the variable is calculated in real time within each window. with absolute deviation (in (The j-th data point within the window), if the newly collected data point exceeds... If the value falls outside the specified range, it is considered an outlier. In this case, the local linear fitting results of normal data points within the window are used to correct the outlier in real time, thus avoiding interference from outlier data with the prediction results.

[0063] The preprocessed real-time data is converted into an input format acceptable to the leakage rate prediction model. Specifically, a fixed-length time window sequence is constructed, with the window length consistent with that used during model training. The window sliding step size is set according to the real-time monitoring requirements. For the multidimensional data within each time window, real-time standardization processing is performed according to the feature standardization rules used during model training. The standardization formula is as follows: ,in For standardized data, For preprocessed real-time data, and These are the mean and standard deviation of the k-th variable, calculated during the preprocessing stage of the historical dataset, to ensure that the distribution of the real-time input data is consistent with the distribution of the model training data.

[0064] The model inference process primarily activates the causal attention layer in the causal attention neural network model. This layer assigns attention weights to each input variable based on the causal effect strength obtained in S2. Specifically, the allocation of causal attention weights follows the formula... ,in Let be the attention weight for the i-th direct cause variable. These are the variable importance parameters learned during model training. Let be the causal effect strength of the i-th direct cause variable determined in S2 on the leakage rate, and n be the total number of direct cause variables. This formula allows the model to prioritize variables with higher causal effect strength during real-time inference, improving the accuracy and interpretability of the prediction results. The real-time leakage rate prediction obtained after inference needs to undergo physical rationality verification. The verification is based on the actual physical range of the mechanical seal leakage rate (such as the minimum and maximum leakage rate thresholds preset based on the seal type and media characteristics). If the prediction value exceeds this range, it is considered an invalid prediction. In this case, the moving average of the previous three valid predictions is used as the leakage rate output for the current moment, and a system alarm is triggered, prompting a check of the sensor or model status. If the prediction value is within a reasonable range, the real-time leakage rate prediction is directly output for use in subsequent performance evaluation stages.

[0065] S6. Based on the sequence of real-time leakage rate prediction values, the mechanical seal performance is evaluated to obtain the evaluation results; when the evaluation results meet the preset update trigger conditions, the dynamic update of the leakage rate prediction model is triggered.

[0066] Specifically, the construction of the real-time leakage rate prediction value sequence is based on a fixed time span. The sequence length must meet the statistical requirements of performance evaluation, include continuous prediction values ​​within the most recent period, and the sequence is updated using a sliding update method. That is, for each new real-time leakage rate prediction value, the earliest prediction value in the sequence is removed to ensure that the sequence always reflects the latest leakage rate change trend.

[0067] The performance evaluation process is conducted from three dimensions: trend analysis, deviation statistics, and threshold determination. Trend analysis is achieved by calculating the slope of the linear fit of the real-time leakage rate prediction sequence. The fitting process uses the least squares method, and the fitting formula is as follows: ,in The fitted result for the predicted leakage rate at time t is given, where 'a' is the fitting slope, 'b' is the fitting intercept, and 't' is the time index in the sequence (in units of sampling interval). The trend of leakage rate change is judged by the sign and absolute value of the slope 'a': if... Furthermore, if the absolute value is greater than the preset trend threshold, it indicates that the leakage rate is increasing, and the mechanical seal performance may be deteriorating; if This indicates that the leakage rate is stable and the sealing performance is good; if If so, it is necessary to check for data anomalies by checking the sensor status. Deviation statistics are achieved by calculating the deviation rate between the real-time leakage rate prediction value and the reference value. The reference value is selected as the historical average leakage rate of the mechanical seal under stable operating conditions (data under abnormal conditions must be excluded). The deviation rate is calculated using the following formula: ,in Let be the leakage rate deviation rate at time t. Let be the predicted real-time leakage rate at time t. This serves as a reference value for the leakage rate. The accuracy of the model's predictions is assessed by counting the number of times the deviation rate exceeds a preset deviation threshold. If the percentage of such occurrences is too high, it indicates a significant deviation between the model's predictions and the actual sealing condition, requiring attention to the model's performance. Threshold judgment involves directly comparing the real-time leakage rate prediction with preset safety, warning, and danger thresholds. Each threshold is determined based on the mechanical seal's design parameters, the hazard of the medium, and industrial safety standards: when the predicted value is below the safety threshold, the sealing performance is normal; when it falls between the safety and warning thresholds, monitoring frequency needs to be increased; when it falls between the warning and danger thresholds, maintenance measures need to be prepared; and when it exceeds the danger threshold, immediate shutdown and maintenance are required to prevent leakage accidents.

[0068] When the performance evaluation results meet the preset update trigger conditions, a dynamic update of the leakage rate prediction model is triggered. The update trigger conditions are set in combination with the actual application scenario and mainly include three categories: The first category is the prediction deviation trigger condition, that is, in the real-time leakage rate prediction value sequence, the number of prediction values ​​that continuously exceed the deviation threshold reaches a preset number, or the average deviation rate exceeds the deviation threshold for multiple consecutive evaluation cycles, indicating that the model's prediction accuracy has decreased due to changes in operating conditions or parameter drift; The second category is the operating condition change trigger condition, that is, by analyzing the operating condition variables (such as speed, load, and medium temperature) in real-time sensor data, it is found that the proportion of newly added operating condition types in historical training data is lower than a preset proportion, or the distribution range of operating condition parameters exceeds the distribution range of historical data, indicating that the original training data of the model can no longer cover the current operating conditions and new operating condition data needs to be incorporated; The third category is the time period trigger condition, that is, the model's continuous running time reaches the preset update cycle, and even if the current prediction accuracy meets the requirements, it is necessary to update and incorporate recent data to ensure the model's adaptability to the trend of sealing performance degradation.

[0069] The model's dynamic update process employs an incremental learning strategy to avoid the resource consumption and time delays caused by retraining with full data. First, real-time sensor data and corresponding leakage rate predictions are collected for a period prior to the update (if actual leakage detection data is available, it is used first). This data undergoes the same preprocessing as S1 to obtain the incremental dataset. Next, the incremental dataset is merged with a portion of historical data from the original training set (selecting recent data with similar operating conditions to ensure data distribution continuity) to form the updated training dataset. During the fusion process, the contribution of the old and new data is adjusted by setting data weight coefficients. The formula for calculating the weight coefficients is... ,in For data weights, The interval between the data collection time and the current update time. A time decay coefficient is used to ensure that recent data has a higher weight and better reflects the characteristics of the current working conditions. Then, the original leakage rate prediction model is fine-tuned based on the updated training dataset. The fine-tuning process uses a mini-batch gradient descent algorithm, with the learning rate set to 1 / 10 to 1 / 5 of the original training learning rate to avoid drastic parameter fluctuations. Simultaneously, the model's network structure remains unchanged, with a focus on updating the weight parameters of the causal attention layer and the regression parameters of the output layer to ensure the model retains its original causal interpretability. After fine-tuning, the updated model is validated using an updated validation dataset (split from the incremental dataset, with no overlap with the updated training dataset). Validation metrics include prediction error and coefficient of determination. (The calculation formula is) Where m is the number of samples in the validation set. This represents the actual or reference value at time t. To verify the average value of the actual set and the reasonableness of the causal attention weights (ensuring that variables with strong causal effects still have high attention weights), if the verification results meet the preset update acceptance criteria (such as a reduction in prediction error, ...), If the updated model is improved (but not inferior to the original model), it will be deployed as the new online monitoring model. If the verification fails, the model will be rolled back to the original model, and the reasons for the failure will be analyzed (such as incremental data quality issues or parameter setting issues). After adjustments, the update process will be re-executed. Simultaneously, a model update log will be established to record the triggering conditions, data sources, parameter changes, and verification results for each update, providing a basis for subsequent model optimization and troubleshooting.

[0070] The aforementioned online monitoring method for mechanical seal leakage rate for predictive maintenance collects and preprocesses historical data from multi-dimensional sensors. Based on the temporal relationships, it performs causal inference to accurately identify the direct causal variables and confounding variables affecting the leakage rate and quantifies their causal effects. Then, it uses this causal knowledge to construct a dedicated causal feature set to train an attention neural network model that deeply integrates the strength of causal effects. Finally, it uses this model to monitor and predict real-time data online and triggers dynamic updates of the model based on the performance evaluation results of the predicted sequence. This achieves more accurate, robust, and causally interpretable predictions of mechanical seal leakage rate under complex dynamic operating conditions, effectively improving the decision-making accuracy and system adaptability of predictive maintenance.

[0071] refer to Figure 2 In one optional embodiment, time-series causal inference is performed based on the processed time-series historical dataset to obtain a set of direct cause variables that have a direct causal effect on the leakage rate, a set of confounding variables that have a confounding effect on the leakage rate, and the causal effect strength of each variable in the set of direct cause variables on the leakage rate, including the following steps:

[0072] S11. Based on the preprocessed time series historical dataset, the nonlinear Granger causality test is used to screen all candidate variables except for the leakage rate, and a preliminary set of causal variables that have a predictive causal relationship with the leakage rate is selected.

[0073] Specifically, the composition of the candidate variable set is first clarified. This set includes all multi-dimensional sensor variables after preprocessing, except for the leakage rate. It covers various key parameters reflecting the operating status of the mechanical seal, such as operating parameters characterizing changes in operating conditions and monitoring parameters reflecting the physical state of the sealing system. The core principle of the nonlinear Granger causality test is to determine whether the historical information of a candidate variable can provide incremental value for the future prediction of the leakage rate beyond the historical information of the leakage rate itself. Moreover, this test method needs to be adapted to the nonlinear characteristics of the mechanical seal under dynamic operating conditions to avoid misjudgment by traditional linear test methods in nonlinear scenarios.

[0074] The verification process involves two steps: constructing the prediction model and comparing its performance. The first step involves constructing a prediction model based solely on historical information about the leakage rate, denoted as model M1. The input to model M1 is the sequence of observed leakage rates at historical moments, i.e. (in Let p represent the leakage rate at time t, where p is the optimal lag order of the leakage rate (determined by autocorrelation analysis of the data), and the output is the predicted leakage rate at time t. Model M1 is trained using a nonlinear regression method. The model parameters are determined by minimizing the error function between the predicted and actual values. The error function is the mean squared error, and the formula is as follows: , where N is the total number of samples in the historical time series data, and this formula is used to quantify the prediction accuracy of model M1.

[0075] The second step is to address each candidate variable. (i is the index of the candidate variable), construct a predictive model that incorporates historical information of the candidate variable, denoted as model M2. The input to model M2 includes the historical leakage rate sequence used in model M1. In addition, candidate variables were also added. Historical observation sequence (q is a candidate variable) The optimal lag order (determined through cross-validation) is used to output the predicted leakage rate at time t. Model M2 was trained using the same nonlinear regression method as model M1, and its mean squared error was calculated. ,in Ensure that the length of the input sequence is consistent.

[0076] After training and error calculation of the two models, candidate variables are quantified using Conditional Mutual Information (CMI). The conditional mutual information formula is used to express the incremental contribution of leakage rate prediction:

[0077]

[0078] in, This represents the probability density function of the variable. Represents the historical sequence of controlled leakage rates (Right now Given a sequence of leakage rates prior to time t, measure the leakage rate at time t. With candidate variables Historical observation sequence (Right now Before the moment The degree of correlation between sequences; Given a historical sequence of leakage rates At time t, the leakage rate and the historical sequence of candidate variables The joint conditional probability density, and Let M1 and M2 be the marginal conditional probability densities of the leakage rate at time t and the historical sequence of the candidate variable, respectively, given the historical leakage rate sequence. If the calculated conditional mutual information value is greater than the preset significance threshold, and the mean squared error of model M2 is... The mean square error is significantly smaller than that of model M1. (By determining the statistical significance of the error difference through hypothesis testing), candidate variables are then identified. Variables with a predictive causal relationship to leakage rates are included in the initial set of causal variables. The above testing process is then performed on each candidate variable, ultimately forming a preliminary set of causal variables containing all variables with predictive causal relationships.

[0079] S12. Using the preprocessed time series historical dataset as input, the PCMCI+ algorithm for temporal causal discovery is used to perform causal learning and obtain a temporal causal graph representing the causal relationship between variables.

[0080] Specifically, the PCMCI+ algorithm integrates Partial Conditional Mutual Information (PCMI) testing with causal direction inference, which can effectively handle the nonlinear and non-stationary characteristics of data under dynamic working conditions of mechanical seals, as well as the lagged causal dependencies between variables, and avoid the false causal relationship misjudgment that is prone to occur in time series data by traditional causal discovery algorithms.

[0081] The algorithm implementation process consists of three core stages. The first stage is the conditional independence test between variables. The purpose of this stage is to identify the direct dependencies between variables and eliminate the interference caused by indirect dependencies. For any two variables X and Y (both belonging to the preprocessed variable set, including the leakage rate), and a given set of conditional variables Z (variables other than X and Y selected from the variable set), partial conditional mutual information is calculated. The formula is:

[0082]

[0083] in, For the conditional mutual information of variables X and Y under a given set of conditional variables Z, Let Z be a proper subset of the condition variable set. This formula eliminates indirect dependencies between variables arising from condition variable subsets by subtracting the conditional mutual information under the conditional maximum subset condition, retaining only direct dependencies. If the calculated... If the value exceeds the preset independence test threshold, it is determined that X and Y have a direct dependency relationship under the given Z condition, and this dependency relationship is recorded for subsequent causal direction inference.

[0084] The second stage is causal direction inference, which determines the causal direction of dependencies based on the lag characteristics of time series data. This stage is applied to variable pairs with direct dependencies identified in the first stage. This study analyzes the dependence strength under different lag orders. The lag order is defined. Given the time interval between historical and current observations of a variable, calculate the time difference between different observations. Value (X in) (Observation value at time) and Partial conditional mutual information of (the observed value of Y at time t) ,as well as and Partial conditional mutual information (in (The set of condition variables at time t). If there exists a certain lag order... , making Significantly greater than Then the direction of causality is determined as follows: That is, X in The state of Y at time t has a causal influence on the state of Y at time t; conversely, the causal direction is determined to be... This method allows us to determine the causal direction of all direct dependencies and identify the effective lag order for each causal relationship.

[0085] The third stage involves constructing a time-series causal graph, integrating the variables, causal relationships, and lag orders obtained from the first two stages into a visualized time-series causal graph. Each node in the graph represents a variable (such as leakage rate or variables monitored by various sensors), and the directed edges between nodes represent causal relationships between variables. The direction of the edges is consistent with the causal direction determined in the second stage, and the value marked next to the edge is the effective lag order corresponding to that causal relationship. For example, if analysis determines that the vibration variable has a causal influence on the leakage rate at time t-2, and the lag order is 2, then a directed edge from the vibration variable node to the leakage rate node is drawn in the time-series causal graph, and labeled "...". The completed time-series cause-effect diagram should fully reflect the direct causal relationships and time-series lag characteristics among all variables, providing a clear structural basis for the subsequent extraction of the direct cause variable set and the confounding variable set.

[0086] S13. From the time-series cause-effect graph, extract all variables that directly point to the leakage rate node to form a set of direct cause variables, and extract variables that simultaneously point to either the leakage rate node or any variable in the set of direct cause variables to form a set of mixed variables.

[0087] Specifically, when extracting the set of direct cause variables and the set of confounding variables from the time-series cause-effect graph, the leakage rate node is used as the core, and clear extraction rules are established based on the pointing relationship of the directed edges between nodes to ensure that the extraction results accurately reflect the different types of influence of variables on the leakage rate (direct causal influence and confounding influence).

[0088] The extraction process of the direct cause variable set uses "directly pointing to the leakage rate node" as the core criterion. First, the leakage rate node in the time-series cause-effect graph is located and designated as the target node for analysis. Then, all directed edges in the cause-effect graph pointing to this target node are traversed, and the starting node of each directed edge is traced. The variables corresponding to these starting nodes are the variables that have a direct causal effect on the leakage rate. For example, if there are directed edges in the time-series cause-effect graph pointing from the vibration variable node to the leakage rate node, and from the sealing cavity pressure variable node to the leakage rate node, and neither of these edges passes through any other variable node (i.e., there are no intermediate variable nodes connecting the starting and target nodes), then both the vibration variable and the sealing cavity pressure variable belong to the direct cause variable set. It is important to note that the direct cause variable set only includes variables connected to the leakage rate node through direct directed edges, excluding all variables that affect the leakage rate through indirect paths (i.e., passing through at least one intermediate variable node). This ensures that all variables in this set directly affect changes in the leakage rate, rather than being influenced by other variables.

[0089] The extraction of confounding variables is based on the dual-pointing rule of "simultaneously pointing to the leakage rate node and any variable in the direct cause variable set." First, the core characteristic of confounding variables is clarified: these variables not only have a direct or indirect impact on the leakage rate, but also affect at least one variable in the direct cause variable set, potentially obscuring the true causal relationship between the direct cause variable and the leakage rate. The extraction process consists of two steps: First, traverse each variable in the direct cause variable set, locate all directed edges pointing to that variable in the time-series causal graph, and record the starting nodes of these edges, forming a "candidate variable set affecting the direct cause variable"; second, filter from this candidate variable set those variables that simultaneously have directed edges pointing to the leakage rate node; these variables are the confounding variables. For example, if the temperature variable node has directed edges pointing to both the vibration variable node in the direct cause variable set and the leakage rate node, then the temperature variable meets the definition of a confounding variable and is included in the confounding variable set. If a variable points only to a variable in the direct cause variable set but not to the leakage rate, or only to the leakage rate but not to a variable in the direct cause variable set, it will not be included in the confounding variable set. This extraction rule can accurately identify confounding variables that may interfere with the determination of direct causal relationships, laying the foundation for accurate estimation of the strength of subsequent causal effects.

[0090] During the extraction process, each directed edge in the time-series cause-effect graph is checked one by one to ensure no omissions or misclassifications. For variables with multiple path pointing relationships (such as a variable that directly points to the leakage rate and indirectly points to the leakage rate through direct cause variables), their classification is determined based on the direct pointing nature of the edges. If a variable satisfies the condition of directly pointing to the leakage rate and pointing to direct cause variables, it is still classified as a confounding variable. Furthermore, its direct impact on the leakage rate and its indirect impact through direct cause variables need to be distinguished in subsequent analyses. However, in the set partitioning in this step, only classification based on direct pointing relationships is required. After extraction, the specific variable names of the direct cause variable set and the confounding variable set are listed separately, corresponding to the nodes and edges in the time-series cause-effect graph, forming a written set list for direct retrieval in subsequent steps.

[0091] S14. For each variable x in the set of direct cause variables, determine the set of condition variables corresponding to variable x based on the time-series causal graph, and apply dual machine learning to estimate the average causal effect of variable x on the leakage rate to obtain the quantified causal effect strength.

[0092] Specifically, the set of conditional variables is determined based on the causal relationship structure between variables in the time-series causal graph. Its core purpose is to control all variables that might obscure the causal relationship between variable x and the leakage rate. The specific rules for determining this set are as follows: The set of conditional variables includes all confounding variables in the time-series causal graph that simultaneously point to both variable x and the leakage rate (i.e., the set of confounding variables extracted in S13). These variables are the main source of spurious correlations and must be included in the conditional set to achieve confounding control. Simultaneously, it also includes all variables in the time-series causal graph that point to the leakage rate but not to variable x (if they exist). Although these variables do not directly affect variable x, they may affect the leakage rate through other paths. If not controlled, this could lead to biased estimation of causal effects. Furthermore, all variables pointed to by variable x in the time-series causal graph (i.e., causal descendants of variable x) must be excluded because these variables are intermediate paths through which variable x affects the leakage rate. Including them in the conditional set would lead to over-control and mask the true causal effect of variable x. The set of variables obtained through the above rules is the set of conditional variables corresponding to variable x, denoted as Z.

[0093] After determining the set of condition variables Z, dual machine learning is applied to estimate the average treatment effect (ATE). This method effectively separates causal effects from confounding effects by constructing a prediction model in two steps, making it suitable for nonlinear data scenarios. The first step involves constructing two auxiliary prediction models: the first model, denoted as model F, is the prediction model for variable x, taking the historical observations of the condition variable set Z as input and the historical observations of variable x as output. ,in Let Z be the predicted value of variable x, and F be a nonlinear prediction function (such as random forest, neural network, etc.). The training objective of model F is to predict variable x as accurately as possible using condition variable Z, and its residuals are... This represents the portion of variable x that cannot be explained by the condition variable Z; this portion can be considered as "exogenous variation" of variable x, unaffected by confounding variables. The second model is a prediction model for the leakage rate, denoted as model G. It takes historical observations of the condition variable set Z as input and historical observations of the leakage rate y as output, i.e. ,in Let Z be the predicted leakage rate, and G be a nonlinear prediction function of the same type as model F. The training objective of model G is to predict the leakage rate y as accurately as possible using the condition variable Z, and its residuals... This represents the portion of the leakage rate that cannot be explained by the condition variable Z, which is only related to variable x and other independent factors not covered by Z. By constructing these two auxiliary models, the influence of confounding variables is effectively removed, allowing subsequent analysis to focus on the causal relationship between the exogenous variation of variable x and the variation of the leakage rate.

[0094] The second step is to estimate the causal effect based on the residuals. This involves constructing a linear regression model between the residuals to quantify the average causal effect of variable x on the leakage rate. The residuals obtained in the first step are used as the basis for this estimation. The independent variable is the residual. Using [variable name] as the dependent variable, establish a linear regression model, with the following formula: .in, The regression coefficient is the average causal effect (ATE) of variable x on the leakage rate, and its magnitude directly corresponds to the strength of the causal effect. The random error term represents the term that cannot be... The explained residual variation in leakage rate satisfies the assumptions of a mean of 0 and constant variance. The regression coefficients are solved using the least squares method during model training. The objective is to minimize the sum of squared residuals, and the loss function is formulated as follows: Where T is the number of time steps in the historical data. Let be the residual leakage rate at time t. Let x be the residual of variable x at time t. By taking the derivative of the loss function and setting the derivative to zero, we can obtain... The estimated value This estimate is the quantification of the causal effect of variable x on the leakage rate.

[0095] To ensure the reliability of the causal effect strength estimation, model validation and significance testing were conducted. On one hand, K-fold cross-validation was used to assess the stability of the residual regression model: historical data were divided into K consecutive subsets in chronological order, with each subset serving as the validation set and the remaining K-1 subsets as the training set. This process was repeated: "training auxiliary models F and G → calculating residuals → fitting the residual regression model → calculating..." The process involves obtaining K estimates of the causal effect strength. If the coefficient of variation (the ratio of standard deviation to mean) of these estimates is less than a preset threshold, the estimation results are considered stable. Furthermore, a t-test is used to verify the results. The statistical significance of the null hypothesis is... (i.e., variable x has no causal effect on the leakage rate), the alternative hypothesis is The formula for calculating the t-statistic is: ,in for The standard error is calculated using the following formula: If the p-value corresponding to the t-statistic is less than the significance level, then the null hypothesis is rejected, confirming that the causal effect of variable x on the leakage rate is significant. It can be used as the final strength of the causal effect; if the p-value is greater than the significance level, the composition of the condition variable set Z needs to be re-examined (such as whether key confounding variables are missing), and the estimation process should be re-executed after adjustment.

[0096] For each variable x in the set of direct cause variables, the complete process of "determining the set of condition variables → constructing an auxiliary model → residual regression estimation → verifying significance" is repeated to finally obtain the quantitative causal effect strength corresponding to each direct cause variable. These strength values ​​not only reflect the magnitude of the variable's impact on the leakage rate, but also indicate the direction of the impact through positive and negative signs (e.g., This indicates that the leakage rate increases as the variable x increases. (This indicates that the leakage rate decreases as the variable x increases), providing core parameter support for the subsequent causal feature construction in step S3 and the causal attention neural network model training in step S4.

[0097] In one optional embodiment, based on the set of direct cause variables, the set of confounding variables, and the strength of causal effects, causal feature construction processing is performed on the preprocessed multidimensional time series dataset to generate a causal feature set, including the following steps:

[0098] S21. Extract the historical time series segments of each variable in the direct cause variable set from the preprocessed time series historical dataset to form the original cause feature subset.

[0099] Specifically, when extracting historical time series segments of each variable in the direct cause variable set from the preprocessed historical time series dataset to form the original causal feature subset, the criteria for segment selection are first determined. Based on the time window and sliding step size, it is ensured that the extracted segments retain the dynamic information related to the direct cause variable and leakage rate, and are compatible with the input format for subsequent processing. For each variable in the direct cause variable set, the full time series data column corresponding to that variable is selected from the preprocessed data, and continuous time series segments are sequentially extracted according to the set time window length and sliding step size. Each segment contains continuous observations corresponding to the window length. The time series segments of all direct cause variables are integrated according to the variable dimension and time segment index: for each time segment index, the corresponding segments of all direct cause variables are integrated to form a multi-dimensional time series vector. The multi-dimensional time series vectors of all time segments together constitute the original causal feature subset. The number of samples in this subset is calculated by the full time step count, window length, and sliding step size, and the dimension of each sample is the product of the number of direct cause variables and the window length.

[0100] S22. Use the strength of causal effect to weight the time series of each variable in the original cause feature subset to generate a causal weighted feature subset.

[0101] Specifically, when generating a causal-weighted feature subset by weighting the time series data of each variable in the original causal feature subset using the strength of causal effects, the core principle is to use the strength of causal effects as the weight of each variable, highlighting the influence of variables with strong causal associations. The strength of the causal effect corresponding to each direct cause variable is directly used as the weight of that variable, and the weighted calculation is performed on each time series observation of that variable in the original causal feature subset. The formula is as follows: ,in Let be the weighted eigenvalue of the i-th direct cause variable at the t-th time step in the k-th time segment. Let represent the causal effect strength (i.e., weight) of the i-th direct cause variable. These are the unweighted observations corresponding to the original causal feature subset. After weighting individual observations, the weighted time series segments are integrated according to the structure of the original causal feature subset: for each time segment index, the weighted segments of all direct causal variables are integrated to form a multidimensional time series vector. The weighted multidimensional time series vectors of all time segments constitute the causal weighted feature subset, and the number of samples, the number of variables, and the time step length of this subset are consistent with those of the original causal feature subset.

[0102] S23. Based on the set of confounding variables, fit a regression model of the confounding variables on the current leakage rate, use the regression model to calculate the confounding component of the leakage rate, and subtract the confounding component from the original leakage rate signal to obtain the confounding-adjusted leakage rate characteristics.

[0103] Specifically, when fitting a regression model based on the confounding variable set to calculate the confounding components of the leakage rate and obtain the confounding-adjusted leakage rate characteristics, the nonlinear regression model of the confounding variables on the leakage rate is first fitted. The model input is a time series segment of the confounding variable set, and the output is the original leakage rate observation value at the end of the corresponding time segment. The model parameters are optimized by minimizing the prediction error to obtain the confounding regression model. (in For the leakage rate mixed component, Let Z be the time-series vector of the confounding variables input after training (where Z is the regression function). The time-series vector of the confounding variables for each time segment in the full historical data is input into this model to obtain the confounding component of the leakage rate for the corresponding time segment. Then, the confounding component is subtracted from the original leakage rate observations to obtain the confounding-adjusted leakage rate feature, calculated using the following formula: ,in, The adjusted leakage rate characteristic for the k-th time segment is... This represents the original leakage rate observation for the k-th time segment. Let be the mixed component of the leakage rate for the k-th time segment. Arrange the adjusted leakage rate features of all time segments in index order to form a mixed adjusted leakage rate feature sequence.

[0104] S24. Combine and splice the original cause feature subset, the causal weighted feature subset, and the leakage rate feature to generate a causal feature set.

[0105] Specifically, when generating the causal feature set by combining and concatenating the original causal feature subset, the causal weighted feature subset, and the mixed adjusted leakage rate features, dimensionality matching is first performed. The adjusted leakage rate of each time segment in the leakage rate feature sequence is expanded into a time-series vector with a length consistent with the time window (each element being the adjusted leakage rate), ensuring that the time step length of the leakage rate feature is consistent with the first two feature subsets. Subsequently, following the order of "original causal features → causal weighted features → expanded leakage rate features," the feature vectors of each time segment are stacked dimensionally. The multidimensional vectors of the original causal features, the multidimensional vectors of the causal weighted features, and the expanded leakage rate vector of the segment are stacked according to the variable dimensions, forming a combined feature vector for a single time segment. The combined feature vectors of all time segments together constitute the causal feature set. The number of samples in this set is consistent with that of each input subset, and the dimension of each sample is the product of (2 × number of direct causal variables + 1) and the time window length, fully preserving the core information of the three types of features.

[0106] In one optional embodiment, the training of a prediction model using a causal feature set as input to obtain a trained leakage rate prediction model includes the following steps:

[0107] S31. Construct a causal attention neural network model, which includes an input layer, an embedding layer, a causal attention layer, a temporal coding layer, and an output layer connected in sequence.

[0108] Specifically, the input layer receives the causal feature set, with its input dimension matching the dimension of a single sample in the causal feature set. It directly passes the multidimensional temporal samples from the causal feature set to the next layer. The embedding layer connects to the input layer and is mainly used to reduce the dimensionality and encode the high-dimensional or multivariate temporal features, converting the original causal features into a low-dimensional, dense vector form. This eliminates interference caused by differences in the dimensions of different variables and provides a suitable feature format for subsequent attention calculations.

[0109] The causal attention layer, as the core layer of the model, connects to the embedding layer. Its key design element is the introduction of causal effect strength to guide attention allocation, unlike traditional attention mechanisms that rely solely on data correlation. This ensures the model prioritizes features with a direct causal impact on the leakage rate. The temporal encoding layer connects to the causal attention layer and captures temporal dependencies in the context vector sequence. By introducing positional encoding, temporal convolution, or recurrent structures, it fuses the attention-processed features with temporal information, adapting to the temporal characteristics of mechanical seal data. The output layer connects to the temporal encoding layer, using a linear transformation combined with an activation function (such as ReLU or Sigmoid, chosen based on the physical range of the leakage rate) to convert the output of the temporal encoding layer into a single-valued leakage rate prediction result. The layers are connected sequentially in the order of "input layer → embedding layer → causal attention layer → temporal encoding layer → output layer," forming a complete causal attention neural network model.

[0110] S32. Input the causal feature set into the causal attention neural network model, and perform embedding processing on the causal feature set through the embedding layer to obtain the embedded feature sequence.

[0111] Specifically, after inputting the causal feature set into the causal attention neural network model, the embedding layer performs embedding processing to obtain an embedded feature sequence. The core purpose is to unify the feature dimensions and enhance the feature expressive power. During the embedding process, the embedding layer first performs dimension mapping on each sample (multi-dimensional temporal feature vector) in the causal feature set. Through a preset embedding matrix, the multivariate features of each time step in the sample are converted into a fixed-dimensional embedding vector. The dimension of this embedding vector is set according to the model complexity and data scale, and it is necessary to balance expressive power and computational efficiency.

[0112] For example, if a single sample in the causal feature set has a dimension of (2m+1)×L (where m is the number of direct causal variables and L is the time window length), the embedding layer will map each (2m+1)-dimensional variable feature vector to a d-dimensional embedding vector (d is the embedding dimension), ultimately forming a sequence of L d-dimensional embedding vectors, i.e., the embedded feature sequence. This sequence preserves the temporal order of the original causal features and improves the computational efficiency of the subsequent causal attention layer through the form of low-dimensional dense vectors, while reducing the risk of overfitting that may be caused by high-dimensional data. After the embedding process is completed, the embedded feature sequence will be directly passed to the causal attention layer.

[0113] S33. In the causal attention layer, the embedded feature sequence is converted into a query matrix, a key matrix, and a value matrix. The causal attention weight matrix is ​​calculated based on the query matrix, the key matrix, and the causal effect strength.

[0114] Specifically, in the causal attention layer, the embedded feature sequence is first converted into a query matrix (Q), a key matrix (K), and a value matrix (V). The conversion process is achieved through three independent linear transformations. The embedded feature sequence is input into three different linear layers. Each linear layer maps the embedded feature sequence into Q, K, and V matrices of the same dimension through the learned weight matrix. The Q matrix is ​​used to represent the feature query that needs to be focused on, the K matrix is ​​used to calculate the correlation with the Q matrix, and the V matrix is ​​used to provide the final attention-weighted feature value.

[0115] The core component is the calculation of a causal attention weight matrix based on the Q matrix, K matrix, and the strength of causal effects. Unlike traditional attention weights that rely solely on the correlation between Q and K, this approach incorporates the strength of causal effects as a priori basis for attention allocation. Specifically, the initial attention score matrix is ​​obtained by performing a dot product operation on the transposes of Q and K. The formula can be simplified as follows: Subsequently, a causal effect strength vector (composed of the causal effect strengths of each direct cause variable obtained in S2) is introduced to modify the initial attention score matrix. The weight value corresponding to the causal effect strength is multiplied by the initial score, so that the score corresponding to the variable with a stronger causal effect on the leakage rate is amplified, while the score of the variable with a weaker causal effect is suppressed. Finally, the modified score matrix is ​​normalized by the Softmax function to obtain the causal attention weight matrix. Each element of this matrix represents the attention weight of the corresponding position feature, ensuring that the sum of the weights is 1. The modified weight calculation logic highlights the guiding role of causal relationship in attention allocation.

[0116] S34. The value matrix is ​​weighted and summed based on the causal attention weight matrix to obtain the context vector sequence. The context vector sequence is then input into the temporal coding layer and the output layer for processing to obtain the preliminary predicted value of the leakage rate.

[0117] Specifically, the weighted summation of the value matrix (V) based on the causal attention weight matrix is ​​the core process. This involves allocating feature importance according to the attention weights to obtain a sequence of context vectors. During the weighted summation, each element of the causal attention weight matrix is ​​multiplied by the corresponding feature vector in the V matrix. All multiplied vectors are then summed to obtain a single context vector. This operation is performed sequentially on each position in the embedded feature sequence to form the context vector sequence. This sequence integrates the importance information of features at different positions and prioritizes the contributions of features with strong causal effects.

[0118] The context vector sequence is then fed into a temporal encoding layer. This layer supplements temporal information through positional encoding (if the embedding process does not include temporal features), or captures long-short-term temporal dependencies in the sequence through structures such as temporal convolution and gated recurrent units (GRUs), ensuring that the model can recognize the changes in features over time. The sequence processed by the temporal encoding layer is then input into the output layer. The output layer maps the temporally encoded feature vectors to single values ​​through a linear transformation and combines them with an activation function (such as an activation function that ensures the leakage rate is non-negative) to obtain the final preliminary prediction of the leakage rate. This prediction will be used for error calculation in subsequent model training.

[0119] S35. Using the causal feature set and the corresponding true future leakage rate as training samples, and the error between the preliminary prediction value and the true future leakage rate as the loss, the causal attention neural network model is iteratively trained until the model converges, and a well-trained leakage rate prediction model is obtained.

[0120] Specifically, during the model training phase, the causal feature set and its corresponding true future leakage rate are used as training samples. Each sample in the causal feature set serves as the model input, and the corresponding true future leakage rate (i.e., the leakage rate value actually monitored after the time window of that causal feature sample ends) serves as the training label, forming an "input-label" paired training sample set. During training, the error between the initial predicted value and the true future leakage rate is used as the loss, and the loss function is typically chosen as the mean squared error (MSE), as shown in the formula: ,in Here, N is the loss value, and N is the number of training samples. This is the initial predicted value for the i-th sample. Let be the true future leakage rate of the i-th sample.

[0121] Using the backpropagation algorithm, the parameters of each layer of the model (such as the embedding matrix of the embedding layer, the linear transformation weights of the causal attention layer, and the linear transformation coefficients of the output layer) are adjusted based on the loss value. After each parameter adjustment, the loss value is recalculated, and this iterative process is repeated. The termination condition for iterative training is that the loss value no longer decreases for several consecutive epochs on the validation set (or the decrease is less than a preset threshold), or the number of iterations reaches a preset upper limit. At this point, the model is considered to have converged. After the model converges, the current model parameters are saved, and the trained leakage rate prediction model is obtained. This model retains the causal attention mechanism's ability to prioritize causal features, enabling more accurate prediction of the leakage rate.

[0122] In one optional embodiment, a causal attention weight matrix is ​​calculated based on the query matrix, the key matrix, and the causal effect strength, including the following steps:

[0123] S41. Based on the source of the feature vector of each time step in the embedded feature sequence, establish a mapping relationship between the time step index and the variables in the set of direct cause variables.

[0124] Specifically, the embedded feature sequence is obtained by processing the causal feature set through the embedding layer. The causal feature set includes a subset of original causal features and a subset of causal weighted features. The features of both subsets are directly derived from the set of direct causal variables. The original causal features are time-series segments of the direct causal variables, and the causal weighted features are time-series segments of the direct causal variables after being weighted by the causal effect strength. Therefore, the feature vector of each time step of the embedded feature sequence is associated with the direct causal variables.

[0125] The mapping process is executed in two steps: First, determine the correspondence between each feature dimension and the direct cause variable in the causal feature set. All variable dimensions in the causal feature set are labeled one by one, clarifying the direct cause variable corresponding to each dimension, forming a "feature dimension - direct cause variable" correspondence table. This ensures that each feature dimension can be traced back to a unique direct cause variable (if multiple variables share dimensions, dimension splitting rules need to be predefined). Second, associate the time step index with the feature dimension. Each time step of the embedded feature sequence corresponds to a feature of a time window in the causal feature set. The feature vector of each time step contains multiple dimensions, and each dimension corresponds to a dimension in the "feature dimension - direct cause variable" correspondence table. Therefore, the time step index is associated with the direct cause variables corresponding to each dimension of the feature vector of that time step, forming a "time step index - direct cause variable" mapping table. Through this mapping table, the direct cause variable corresponding to any time step index can be quickly determined, providing a basis for subsequently introducing the strength of the causal effect.

[0126] S42. Based on the mapping relationship and the strength of causal effect, calculate a corresponding causal bias value for each time step in the embedded feature sequence.

[0127] Specifically, when calculating the corresponding causal bias value for each time step in the embedded feature sequence based on the mapping relationship and the strength of the causal effect, the direct cause variables associated with each time step are first located. For each time step in the embedded feature sequence, all direct cause variables associated with the feature vector of that time step are determined through the "time step index - direct cause variable" mapping table. If a time step is associated with multiple direct cause variables, the weights of each variable are pre-set (the weights can be determined based on the dimensionality of the variable in the feature vector of that time step or the business priority).

[0128] Subsequently, the causal effect strength corresponding to the associated direct cause variable is extracted. This causal effect strength is a quantified value obtained through time-series causal inference, reflecting the magnitude of the variable's causal influence on the leakage rate. The calculation of the causal bias value requires combining the causal effect strength with preset hyperparameters to ensure that the influence of causal priors is controllable. If a time step is associated with only one direct cause variable, the calculation logic for the causal bias value is "the product of the causal effect strength and the preset hyperparameters." If a time step is associated with multiple direct cause variables, the causal effect strengths of each variable are first weighted and summed according to preset weights, and then multiplied by the preset hyperparameters to obtain the causal bias value for that time step. This calculation method ensures a positive correlation between the causal bias value and the causal effect strength of the direct cause variable; the stronger the causal effect of the variable, the larger the causal bias value for the corresponding time step, providing causal guidance for subsequent attention score adjustments.

[0129] S43. Based on the query matrix and key matrix, calculate the standard dot product attention score; add the causal bias value corresponding to each time step to the corresponding standard dot product attention score to generate a causal attention score that incorporates causal priors, and obtain the causal attention score matrix based on the causal attention scores. Among them, the causal attention score matrix The Middle Line 1 Column elements Calculated using the following formula:

[0130]

[0131] in, This represents the row vector in the query matrix corresponding to the target time step i. The key matrix represents the key with respect to the source time step. The corresponding row vector, The dimension of the vectors embedded in the feature sequence. These are preset hyperparameters used to control the strength of causal prior influence. Variables that belong to the set of direct cause variables; It is a variable The corresponding causal effect strength; It is an indicator function, when the source time step Belongs to variables Associated time step set hour, The function value is 1 if it is true, otherwise it is 0.

[0132] Specifically, the query matrix is ​​obtained by linear transformation of the embedded feature sequence, with each row corresponding to a feature vector of the target time step. Similarly, the key matrix is ​​obtained by another independent linear transformation of the embedded feature sequence, with each row corresponding to a feature vector of the source time step. The standard dot product attention score measures the correlation between the features of the target and source time steps. It is calculated by performing a transpose dot product operation on the query vector corresponding to the target time step and the key vector corresponding to the source time step, and then dividing by the square root of the dimension of the vectors in the embedded feature sequence. This scaling operation avoids the gradient vanishing during subsequent normalization when the embedding dimension is large, as the dot product result becomes too large. The formula for calculating the standard dot product attention score is:

[0133]

[0134] in, The standard dot product attention score represents the score between the target time step i and the source time step j. This represents the row vector in the query matrix corresponding to the target time step i. This represents the transpose of the row vector in the key matrix corresponding to the source time step j. This represents the dimension of the vector embedded in the feature sequence. A causal bias value is added to the standard dot product attention score to generate a causal attention score that incorporates causal priors, specifically through the following formula. Implementation, in the formula Representing the causal attention score matrix The element in the i-th row and j-th column corresponds to the causal attention score between the target time step i and the source time step j; and The meaning is consistent with that in the standard dot product attention score; The dimension of the vectors embedded in the feature sequence; The preset hyperparameter is used to control the strength of the influence of causal prior on attention score. It is determined by optimization through validation set to avoid the influence of causal prior being too strong or too weak; c represents a variable belonging to the set of direct cause variables. It represents the causal effect strength corresponding to variable c, reflecting the magnitude of the causal influence of variable c on the leakage rate; It is an indicator function. This represents the set of source time steps associated with variable c (determined by the "time step index - direct cause variable" mapping table), when source time step j belongs to When the value is 1, the indicator function evaluates to 1; otherwise, it evaluates to 0. This indicates that the summation is performed on all variables c in the set of direct cause variables to ensure that the causal effect strength of all direct cause variables associated with the source time step j is included in the calculation. Arranged in the order of target time step i (row) and source time step j (column), a causal attention score matrix is ​​formed. This matrix fully reflects the attentional correlation strength between the target time step and the source time step after fusing causal priors.

[0135] S44. Normalize the causal attention score matrix to obtain the causal attention weight matrix.

[0136] Specifically, when normalizing the causal attention score matrix to obtain the causal attention weight matrix, the Softmax function is used. This function can map the attention score of any real number field to the interval [0,1], and the sum of the weights of all source time steps corresponding to the same target time step is 1. This ensures that the subsequent weighted summation of the value matrix conforms to the probability distribution logic and avoids the imbalance of feature information caused by the weight of a certain source time step being too high or too low.

[0137] Normalization is performed on each row of the causal attention score matrix (i.e., a fixed target time step). The Softmax function is applied to the causal attention scores of all columns in that row (corresponding to different source time steps) to calculate the attention weight of each source time step to the target time step. The calculation formula is as follows:

[0138]

[0139] In the formula, The element in the i-th row and j-th column of the causal attention weight matrix W corresponds to the attention weight assigned to the source time step j by the target time step i. It is an exponential function used to amplify the differences in attention scores between different source time steps, making the weight allocation more discriminative; Representing the causal attention score matrix The causal attention score in the i-th row and j-th column; Indicates the total number of source time steps; This indicates all source time steps in the row corresponding to target time step i. The exponent of the causal attention score is used to ensure that the sum of all attention weights in the row is 1.

[0140] Attention weights for all target time steps Arranged in the order of rows (target time step) and columns (source time step), a causal attention weight matrix W is formed. The dimension of this matrix is ​​consistent with that of the causal attention score matrix. Each element reflects the attention allocation result guided by causal priors, providing a precise weight basis for subsequent calculation of context vector sequences based on the value matrix.

[0141] The aforementioned online monitoring method for mechanical seal leakage rate for predictive maintenance collects and preprocesses historical data from multi-dimensional sensors. Based on the temporal relationships, it performs causal inference to accurately identify the direct causal variables and confounding variables affecting the leakage rate and quantifies their causal effects. Then, it uses this causal knowledge to construct a dedicated causal feature set to train an attention neural network model that deeply integrates the strength of causal effects. Finally, it uses this model to monitor and predict real-time data online and triggers dynamic updates of the model based on the performance evaluation results of the predicted sequence. This achieves more accurate, robust, and causally interpretable predictions of mechanical seal leakage rate under complex dynamic operating conditions, effectively improving the decision-making accuracy and system adaptability of predictive maintenance.

[0142] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0143] Based on the same inventive concept, this application also provides a system for implementing the online monitoring method for predictive maintenance-oriented mechanical seal leakage rate described above. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more embodiments of the online monitoring system for predictive maintenance-oriented mechanical seal leakage rate provided below can be found in the limitations of the online monitoring method for predictive maintenance-oriented mechanical seal leakage rate described above, and will not be repeated here.

[0144] In one exemplary embodiment, such as Figure 3 As shown, an online monitoring system 30 for predictive maintenance of mechanical seal leakage rate is provided to implement the methods in the above embodiments. The system includes:

[0145] The time series data preprocessing module 31 is used to collect the time series historical data of the mechanical seal system under dynamic working conditions from multi-dimensional sensors, preprocess the time series historical data, and obtain the preprocessed time series historical dataset.

[0146] The causal effect analysis module 32 is used to perform time-series causal inference processing based on the processed time-series historical dataset to obtain the set of direct cause variables that have a direct causal effect on the leakage rate, the set of confounding variables that have a confounding effect on the leakage rate, and the causal effect strength of each variable in the set of direct cause variables on the leakage rate.

[0147] The feature fusion construction module 33 is used to construct causal features on the preprocessed multidimensional time series dataset based on the set of direct cause variables, the set of confounding variables, and the intensity of causal effects, and to generate a causal feature set.

[0148] The prediction model training module 34 is used to train the prediction model with the causal feature set as input to obtain the trained leakage rate prediction model; wherein, the prediction model is a causal attention neural network model that integrates the causal effect strength.

[0149] The real-time leakage monitoring module 35 is used to monitor leakage based on the collected real-time sensor data and through a leakage rate prediction model, and output a real-time leakage rate prediction value.

[0150] The dynamic optimization decision module 36 is used to evaluate the mechanical seal performance based on the sequence of real-time leakage rate prediction values ​​and obtain the evaluation results; when the evaluation results meet the preset update trigger conditions, the dynamic update of the leakage rate prediction model is triggered.

[0151] Embodiments of this application also provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the aforementioned method embodiments.

[0152] Embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.

[0153] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0154] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. A method for online monitoring of leakage rate of mechanical seal oriented to predictive maintenance, characterized in that, The method comprises: S1, collecting time series historical data of a mechanical seal system under dynamic working conditions, and preprocessing the time series historical data to obtain a preprocessed time series historical data set; S2, performing time series causal inference processing based on the preprocessed time series historical data set to obtain a direct cause variable set having a direct causal effect on the leakage rate, a confounding variable set having a confounding effect on the leakage rate, and a causal effect strength of each variable in the direct cause variable set on the leakage rate; S3, based on the direct cause variable set, the confounding variable set and the causal effect strength, performing causal feature construction processing on the preprocessed multi-dimensional time series data set to generate a causal feature set; S4, using the causal feature set as input to train a prediction model to obtain a trained leakage rate prediction model; wherein the prediction model is a causal attention neural network model that fuses the causal effect strength; S5, based on the collected real-time sensor data, monitoring through the leakage rate prediction model to output a real-time leakage rate prediction value; S6, based on the sequence of the real-time leakage rate prediction value, performing mechanical seal performance evaluation to obtain an evaluation result; when the evaluation result meets a preset update triggering condition, triggering dynamic update of the leakage rate prediction model.

2. The method of claim 1, wherein, The method comprises: S11, based on the preprocessed time series historical data set, using a nonlinear Granger causality test method to screen each candidate variable except the leakage rate to obtain a preliminary causal variable set having a predictive causal relationship with the leakage rate; S12, using a time series causal discovery PCMCI+ algorithm to perform causal learning using the preprocessed time series historical data set as input to obtain a time series causal graph representing the causal relationship between variables; S13, from the time series causal graph, extracting variables directly pointing to the leakage rate node to form the direct cause variable set, and extracting variables simultaneously pointing to the leakage rate node and any variable in the direct cause variable set to form the confounding variable set; S14, for each variable x in the direct cause variable set, determining a conditional variable set corresponding to the variable x based on the time series causal graph, and applying double machine learning to estimate the average causal effect of the variable x on the leakage rate to obtain a quantitative causal effect strength.

3. The method of claim 1, wherein, The method comprises: S21, from the preprocessed time series historical data set, extracting a historical time series segment of each variable in the direct cause variable set to form an original cause feature subset; S22, weight time series of each variable in the original cause feature subset by the causal effect strength, to generate a causal weighted feature subset; S23, based on the confounding variable set, fit a regression model of confounding variables on the current leakage rate, calculate the confounding component of the leakage rate using the regression model, and subtract the confounding component from the original leakage rate signal to obtain a confounding adjusted leakage rate feature; S24, combine and splice the original cause feature subset, the causal weighted feature subset and the leakage rate feature to generate the causal feature set.

4. The method according to any one of claims 1 to 3, characterized in that, The training of the prediction model with the causal feature set as input includes: S31, construct a causal attention neural network model, which includes an input layer, an embedding layer, a causal attention layer, a time series encoding layer and an output layer connected in turn; S32, input the causal feature set into the causal attention neural network model, and perform embedding processing on the causal feature set through the embedding layer to obtain an embedded feature sequence; S33, in the causal attention layer, convert the embedded feature sequence into a query matrix, a key matrix and a value matrix, and calculate a causal attention weight matrix based on the query matrix, the key matrix and the causal effect strength; S34, weight and sum the value matrix based on the causal attention weight matrix to obtain a context vector sequence, input the context vector sequence into the time series encoding layer and the output layer for processing to obtain a preliminary prediction value of the leakage rate; S35, use the causal feature set and the corresponding real future leakage rate as training samples, and use the error between the preliminary prediction value and the real future leakage rate as loss to iteratively train the causal attention neural network model until the model converges, and obtain the trained leakage rate prediction model.

5. The method of claim 4, wherein, The calculation of the causal attention weight matrix based on the query matrix, the key matrix and the causal effect strength includes: S41, according to the source of each time step feature vector in the embedded feature sequence, establish a mapping relationship between the time step index and the variables in the direct cause variable set; S42, based on the mapping relationship and the causal effect strength, calculate a corresponding causal bias value for each time step in the embedded feature sequence; S43, based on the query matrix and the key matrix, calculate the standard dot product attention score; add the causal bias value corresponding to each time step to the corresponding standard dot product attention score to generate a causal attention score fused with causal prior, and obtain a causal attention score matrix according to the causal attention score ; wherein the element in the i-th row and the j-th column of the causal attention score matrix is calculated by the following formula: ​​​ wherein, denotes a row vector in the query matrix corresponding to target time step i, denotes a row vector in the key matrix corresponding to source time step , is the dimension of the vectors in the embedding feature sequence, is a preset hyperparameter for controlling the strength of the causal prior influence, is a variable belonging to the direct cause variable set; is the causal effect strength corresponding to variable ; is an indicator function, when source time step belongs to the time step set associated with variable , the function value of is 1, otherwise 0. S44, normalize the causal attention score matrix to obtain the causal attention weight matrix.

6. A predictive maintenance oriented mechanical seal leakage rate online monitoring system for implementing the method of any one of claims 1 to 5, characterized by The system includes: A time series data preprocessing module for collecting time series historical data of multi-dimensional sensors of a mechanical sealing system under dynamic working conditions, preprocessing the time series historical data to obtain a preprocessed time series historical data set; A causal effect analysis module for performing time series causal inference processing based on the preprocessed time series historical data set to obtain a direct cause variable set having a direct causal effect on the leakage rate, a confounding variable set having a confounding effect on the leakage rate, and a causal effect strength of each variable in the direct cause variable set on the leakage rate; a feature fusion construction module, configured to perform a causal feature construction process on the preprocessed multi-dimensional time series data set based on the direct cause variable set, the confounding variable set, and the causal effect strength, to generate a causal feature set; a prediction model training module, configured to train a prediction model by taking the causal feature set as input, to obtain a trained leakage rate prediction model; wherein the prediction model is a causal attention neural network model that fuses the causal effect strength; a real-time leakage monitoring module, configured to perform monitoring by the leakage rate prediction model based on collected real-time sensor data, to output a real-time leakage rate prediction value; a dynamic optimization decision module, configured to perform mechanical seal performance evaluation based on a sequence of the real-time leakage rate prediction value, to obtain an evaluation result; and trigger dynamic update of the leakage rate prediction model when the evaluation result meets a preset update triggering condition. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. The processor executes the computer program to implement the method in any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method in any one of claims 1 to 5.

Citation Information

Cited By

  • Performance detection method and system for industrial valve

    CN121829936A