An industrial equipment anomaly monitoring method based on linear attention and physical state mapping
By using a device state model based on a linear attention recurrent neural network, combined with physical state mapping and recursive computation mode, the problems of long-cycle information utilization and deterministic reasoning in edge computing environments are solved, enabling efficient and interpretable real-time monitoring and safety interlocking control of industrial equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TAIJI COMPUTER CORPORATION LIMITED
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies struggle to achieve efficient utilization of long-cycle information, deterministic low-latency reasoning, and deep correlation of physical processes in industrial equipment anomaly monitoring under edge computing environments. In particular, they cannot achieve 24/7 uninterrupted streaming monitoring on resource-constrained edge devices, and their model generalization and adaptive capabilities are insufficient.
A device state model based on a linear attention recurrent neural network architecture is adopted. The recursive update mechanism of the linear attention layer achieves constant memory usage and computational complexity. Combined with physical state mapping and recursive computation mode, it is deployed on edge computing devices for real-time monitoring. Physical state constraints and online adaptive fine-tuning are introduced to improve the interpretability and responsiveness of the model.
It enables ultra-long-cycle, highly sensitive, and interpretable real-time status monitoring and safety protection of industrial processes on resource-constrained edge devices, and can promptly detect equipment anomalies and trigger deterministic safety interlock controls.
Smart Images

Figure CN121502618B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of interdisciplinary technology of industrial Internet of Things and artificial intelligence, and specifically relates to an industrial equipment anomaly monitoring method based on linear attention and physical state mapping. Background Technology
[0002] In critical industrial sectors such as chemical engineering, energy, and high-end manufacturing, continuous and accurate monitoring of the operational status of core equipment is fundamental to ensuring safety, improving efficiency, and achieving predictive maintenance. However, industrial equipment failures are complex, ranging from slow, gradual processes spanning weeks or even months, such as mechanical wear and catalyst deactivation, to sudden instability events occurring within milliseconds, such as surge. This places extremely stringent demands on monitoring technologies: they must be able to integrate and understand extremely long historical data in edge environments with limited computing power, and make deterministic and rapid responses. Simultaneously, the model's conclusions must possess a certain degree of physical interpretability to gain engineers' trust. The contradiction between long-cycle reliance and limited computing power, the contradiction between real-time requirements and algorithm latency uncertainties, and the contradiction between data-driven models and physical mechanisms collectively constitute the core technological bottlenecks that urgently need to be overcome in the current field of industrial intelligent monitoring.
[0003] To address the aforementioned issues, existing technologies suffer from the following limitations: While monitoring schemes based on the standard Transformer architecture possess strong global modeling capabilities, their attention mechanisms require caching a massive historical KVCache during inference, leading to a linear increase in memory usage over time. This makes it impossible to achieve 24 / 7 uninterrupted streaming monitoring on resource-constrained edge devices. Furthermore, their computational latency varies with input length, failing to meet the deterministic requirements of industrial hard real-time control. Schemes based on traditional recurrent neural networks such as LSTM, while possessing constant memory usage for inference, are limited by the difficulty of sequential training and long-term reliance on weak learning capabilities, making it difficult to fully learn complex and subtle early fault modes from massive historical data. While pure mechanistic models possess clear physical meaning, they struggle to accurately characterize parameter drift, nonlinear coupling, and unknown disturbances present in real-world systems, exhibiting insufficient generalization and adaptive capabilities.
[0004] In summary, existing technologies fail to provide a device monitoring method that simultaneously achieves efficient utilization of long-cycle information, deterministic low-latency inference, and deep correlation between internal states and physical processes in an edge computing environment. Therefore, there is an urgent need in this field for an innovative technical solution that integrates the advantages of data-driven approaches and physical laws to achieve highly reliable, interpretable, and real-time responsive industrial equipment anomaly monitoring with limited resources. Summary of the Invention
[0005] According to a first aspect of the present invention, the present invention claims protection for an industrial equipment anomaly monitoring method based on linear attention and physical state mapping, the method comprising:
[0006] S1. Acquire multi-channel time-series monitoring data from the sensor network and control system of the target industrial equipment in real time or offline, preprocess the monitoring data, and form a standardized time-series data stream.
[0007] S2, Construct a device state model based on a linear attention recurrent neural network architecture, and input the normalized time-series data stream into the device state model in parallel computing mode for training to obtain the device state model with stable parameters;
[0008] S3, the trained device state model is converted from a mode suitable for batch parallel computing to a loop inference mode suitable for sequential step computing, and the converted model is deployed to an edge computing device located in an industrial field with limited computing power;
[0009] S4, on the edge computing device, real-time streaming monitoring data from the sensor network is received and preprocessed in the same way as in step S1 to obtain real-time normalized data. The device state model is run in a loop inference mode. For the input at the current moment, the model only depends on the internal hidden state at the previous moment and the current input to perform calculations, update the internal hidden state and generate output.
[0010] S5. Based on the information generated by the equipment state model during the cyclic reasoning process, calculate the abnormality index; when the abnormality index exceeds the preset threshold or meets a specific mutation pattern, determine that the target industrial equipment has an abnormality.
[0011] S6. Based on the determination result of step S5, trigger the corresponding alarm, log recording or safety interlock control command.
[0012] Furthermore, the method also includes:
[0013] The monitoring data includes physical quantity sensing data and control command data;
[0014] The preprocessing includes at least data cleaning, alignment, and standardization;
[0015] The training process includes forward propagation to calculate the loss and backpropagation to update the model parameters, wherein the loss function includes at least a term that measures the difference between the model's predicted output and the real sensor data;
[0016] The dimension and storage usage of the internal hidden state remain constant throughout the inference process and do not increase with runtime;
[0017] The calculation of the anomaly index depends not only on the direct comparison error between the model's predicted output and the real-time sensor readings, but also on the analysis of the dynamic change characteristics of the hidden state vector within the model.
[0018] Furthermore, the device state model based on the linear attention recurrent neural network architecture described in step S2 of the method includes at least multiple stacked linear attention layers;
[0019] The linear attention layer captures the dependencies between elements in the input sequence by replacing the dot product attention mechanism in the standard Transformer. The calculation of any target position in the sequence is achieved by weighted aggregation of historical information through a recursive weight update mechanism.
[0020] Furthermore, the recursive weight update mechanism in the linear attention layer described in this method is specifically implemented using the WKV operator;
[0021] For each attention head in the model, at time t, the computation process includes:
[0022] S21a, receive the accumulated state from the previous time t-1, the accumulated state including at least the normalized historical key value accumulation and att_{t-1}, and the denominator accumulation and den_{t-1} used for normalization;
[0023] S21b, calculate the query vector q_t, key vector k_t, and value vector v_t based on the input vector at the current time;
[0024] S21c, using a preset channel-related attenuation factor w, calculate the contribution weight of the current key vector k_t to the historical accumulation, where the contribution weight is related to the power of expw;
[0025] S21d, update the cumulative state recursively: add the cross product of the current key vector k_t and the value vector v_t to the historical cumulative sum att_{t-1} according to the contribution weight determined in step S21c, to form a new cumulative sum att_t; add the current key vector k_t to the historical denominator cumulative sum den_{t-1} according to the same contribution weight, to form a new denominator cumulative sum den_t;
[0026] S21e, calculate the output of the attention head at the current time, interact the current query vector q_t with the updated sum att, and divide by the result of the interaction between the current query vector q_t and the updated denominator sum den_t to obtain the weighted aggregated context vector;
[0027] In step S21f, the context vector obtained in step S21e is linearly transformed and then fused with the input information processed by another path to form the final output of the linear attention layer. This output is then passed to the next layer or used as the model output. The updated cumulative states att_t and den_t are saved for calculation in the next time step.
[0028] Furthermore, the training process described in step S2 of this method further includes a step guided by physical state constraints, specifically:
[0029] S22a, Identify calculable or estimable physical state quantities related to the key physical degradation processes or states of the target industrial equipment;
[0030] S22b, Based on the historical monitoring data obtained in step S1, the physical state quantity reference value in time series form, synchronized with the historical monitoring data, is calculated offline through mechanism formulas, empirical models, or high-fidelity simulation.
[0031] S22c, In the network structure of the device state model, a specific internal hidden state vector or a derived vector obtained by its linear transformation is specified as the physical state mapping quantity represented by the neural network.
[0032] S22d, In the loss function for training the device state model, a physical state consistency constraint term is added. This term is used to measure the difference between the physical state mapping represented by the neural network in step S22c and the physical state quantity reference value calculated offline in step S22b at the corresponding time.
[0033] S22e, by optimizing the model through the overall loss function that includes the physical state consistency constraint, one or more dimensions of the internal hidden state of the device state model are forced to learn and approximate the state evolution law of the real physical system, thus injecting physical meaning into the black-box representation of the neural network.
[0034] Furthermore, in step S2 of this method, when constructing the device state model, the decay-related parameters of the linear attention layer in the model are initialized using physical guidance, specifically as follows:
[0035] S23a, Analyze the characteristics of sensor signals of different physical quantities in the multi-channel time-series monitoring data, and determine their respective physical time constants or dominant change frequency ranges;
[0036] S23b, map the initial value of the decay time constant determined in step S23a to the initial parameter value of the decay factor w of the corresponding channel in the linear attention layer;
[0037] S23c, In the early stage of model training, the initial parameter value of the decay factor w set in step S23b is subject to a stronger regularization constraint than other network parameters or a smaller learning rate is allowed, so as to maintain its weak correlation with physical time characteristics during training.
[0038] Furthermore, the analysis of the dynamic change characteristics of the hidden state vector within the model described in step S5 of this method specifically includes at least one of the following calculation methods:
[0039] S51a, State Trajectory Distance Calculation: Calculate the Euclidean distance or cosine similarity between the hidden state vector inside the model at the current moment and a baseline state vector obtained from historical normal data statistics; when the distance exceeds the dynamic threshold or the similarity is lower than the threshold, an anomaly prompt is triggered.
[0040] S51b, State Differential Energy Calculation: Calculate the norm of the difference vector of the hidden state vector inside the model between adjacent time steps, as a measure of the rate of state change; when the rate of change shows a significant peak or is continuously higher than the normal level in a short period of time, it is determined that the physical state has changed abruptly.
[0041] S51c, State Subspace Projection Analysis: Projects a series of hidden state vectors inside the model obtained during real-time inference onto a low-dimensional subspace obtained by principal component analysis of state vectors under normal operating conditions, and calculates its reconstruction error; when the reconstruction error continues to increase, it indicates that the system state is deviating from the state space spanned by the normal operating conditions.
[0042] Furthermore, the multi-channel timing monitoring data mentioned in step S1 of the method includes control command data, and the device state model constructed in step S2 includes a channel mixing module;
[0043] The channel mixing module is configured to simultaneously receive embedded representations of physical quantity data from sensors and embedded representations of control command data. It then fuses and interacts these two types of input information with different properties through learnable network weights. This enables the model to learn the hysteresis and inertial response characteristics of the controlled physical quantity after the control command is issued, allowing it to more accurately predict the system behavior under specific control actions during inference.
[0044] Furthermore, the model transformation described in step S3 of this method specifically includes rewriting all parallel computation operations based on historical windows in the model into recursive computation operations that depend only on the previous state.
[0045] For the linear attention layer, the Transformer-like computation graph in parallel mode is transformed into a mathematically equivalent loop computation unit that only maintains and updates the accumulated states att and den.
[0046] Furthermore, the triggering of the safety interlock control command in step S6 of the method depends on the deterministic delay guarantee of the model cyclic reasoning process in step S4; since the amount of calculation for each reasoning of the device state model at the edge is constant, the worst-case execution time is controllable and predictable.
[0047] Based on the worst-case execution time, a deterministic alarm response delay window is set in the safety interlock logic of the industrial control system to ensure that model inference, anomaly determination and interlock command are completed within the critical time before the physical failure occurs, and the anomaly monitoring method is seamlessly integrated into the industrial safety instrument system with hard real-time requirements.
[0048] The method also includes an online adaptive fine-tuning step for the model:
[0049] During the deployment and operation of S7 at the edge, it continuously collects new, confirmed normal operating condition monitoring data and corresponding hidden state sequences within the model.
[0050] S71, after a preset amount of new data is collected, supervised or self-supervised fine-tuning is performed on the edge computing device or a lightweight server intermittently connected to it, in a way that the backbone parameters of the device state model are fixed and only a few specific layer or adapter parameters are updated.
[0051] S72, the goal of fine-tuning is to enable the model to maintain its ability to track slow drift caused by normal aging of equipment and process fine-tuning, while maintaining high sensitivity to sudden anomalies.
[0052] S73 safely updates the fine-tuned parameter increments to the running model, achieving progressive adaptation of the equipment status model and extending its effective monitoring lifecycle.
[0053] This invention discloses an anomaly monitoring method for industrial equipment based on linear attention and physical state mapping, belonging to the interdisciplinary field of Industrial Internet of Things (IIoT) and Artificial Intelligence (AI). Addressing the core bottlenecks of existing technologies in long-cycle monitoring, such as memory explosion, uncertain inference latency, and poor model interpretability, this method proposes a collaborative architecture of cloud-based parallel training and edge recurrent inference. Its core lies in using a linear attention recurrent neural network to construct the equipment state model, achieving constant memory usage and computational complexity during inference through its unique recursive update mechanism. During the training phase, physical state constraints are introduced, embedding the mechanism of key equipment degradation quantities into the model's hidden states, giving them explicit physical meaning. In the edge deployment phase, the dynamic changes of the model's internal state vectors and prediction errors are used for comprehensive anomaly judgment, enabling the output of control commands with deterministic latency. This invention achieves ultra-long-cycle, highly sensitive, and interpretable real-time state monitoring and safety protection of industrial processes on resource-constrained edge devices. Attached Figure Description
[0054] Figure 1 A flowchart illustrating the workflow of an industrial equipment anomaly monitoring method based on linear attention and physical state mapping, as claimed in an embodiment of the present invention.
[0055] Figure 2 The second flowchart is shown for an industrial equipment anomaly monitoring method based on linear attention and physical state mapping, as claimed in an embodiment of the present invention.
[0056] Figure 3 A third flowchart of an industrial equipment anomaly monitoring method based on linear attention and physical state mapping, as claimed in an embodiment of the present invention;
[0057] Figure 4 The fourth flowchart of an industrial equipment anomaly monitoring method based on linear attention and physical state mapping claimed in the embodiments of the present invention;
[0058] Figure 5 The fifth flowchart is a method for monitoring industrial equipment anomalies based on linear attention and physical state mapping, as claimed in an embodiment of the present invention. Detailed Implementation
[0059] The following examples use a large centrifugal compressor as the target industrial equipment to illustrate in detail the specific implementation methods, processes, and verification effects of the method of the present invention. As a core moving equipment in the chemical and energy fields, the compressor's typical faults, such as slow bearing wear and sudden surge instability, perfectly match the contradiction between long-cycle dependence and instantaneous response, and between limited computing power and high precision requirements that the present invention aims to solve.
[0060] According to the first embodiment of the present invention, referring to Figure 1 This invention claims protection for an industrial equipment anomaly monitoring method based on linear attention and physical state mapping, the method comprising:
[0061] S1. Acquire multi-channel time-series monitoring data from the sensor network and control system of the target industrial equipment in real time or offline, preprocess the monitoring data, and form a standardized time-series data stream.
[0062] S2, Construct a device state model based on a linear attention recurrent neural network architecture, and input the normalized time-series data stream into the device state model in parallel computing mode for training to obtain the device state model with stable parameters;
[0063] S3, the trained device state model is converted from a mode suitable for batch parallel computing to a loop inference mode suitable for sequential step computing, and the converted model is deployed to an edge computing device located in an industrial field with limited computing power;
[0064] S4, on the edge computing device, real-time streaming monitoring data from the sensor network is received and preprocessed in the same way as in step S1 to obtain real-time normalized data. The device state model is run in a loop inference mode. For the input at the current moment, the model only depends on the internal hidden state at the previous moment and the current input to perform calculations, update the internal hidden state and generate output.
[0065] S5. Based on the information generated by the equipment state model during the cyclic reasoning process, calculate the abnormality index; when the abnormality index exceeds the preset threshold or meets a specific mutation pattern, determine that the target industrial equipment has an abnormality.
[0066] S6. Based on the determination result of step S5, trigger the corresponding alarm, log recording or safety interlock control command.
[0067] Furthermore, the method also includes:
[0068] The monitoring data includes physical quantity sensing data and control command data;
[0069] The preprocessing includes at least data cleaning, alignment, and standardization;
[0070] The training process includes forward propagation to calculate the loss and backpropagation to update the model parameters, wherein the loss function includes at least a term that measures the difference between the model's predicted output and the real sensor data;
[0071] The dimension and storage usage of the internal hidden state remain constant throughout the inference process and do not increase with runtime;
[0072] The calculation of the anomaly index depends not only on the direct comparison error between the model's predicted output and the real-time sensor readings, but also on the analysis of the dynamic change characteristics of the hidden state vector within the model.
[0073] In this embodiment, multi-channel time-series monitoring data is collected from an online centrifugal compressor and its auxiliary systems. Physical quantity sensing data includes: high-frequency radial and axial vibration acceleration signals at the front and rear ends of the main shaft, low-frequency inlet and outlet pressure and temperature signals, speed signals, and motor current and voltage signals. Control command data includes: anti-surge valve opening commands, guide vane opening commands, and start / stop switching signals. All data is aggregated to an edge gateway via a field industrial Ethernet network. The sampling frequency varies from tens of thousands of vibrations per second to several temperature readings per second, depending on the signal characteristics. In the preprocessing stage, the raw data is first cleaned to remove obvious outliers caused by momentary sensor malfunctions or communication interference; signals with different sampling rates are aligned to a unified timestamp sequence through interpolation or extraction; finally, standardization is performed by subtracting the historical normal operating condition mean from each channel's data and dividing by the standard deviation, forming a normalized time-series data stream with a mean of zero and a variance of one, for use in subsequent models.
[0074] On a cloud server equipped with high-performance GPUs, a 12-layer device state model based on the RWKV architecture was constructed, with its input dimension corresponding to the sum of all sensor and control command channels. Historical data from the compressor's operation over the past three years was collected, including data from normal start-ups and shutdowns, load adjustments, several minor surge alarms, and data before and after a planned major overhaul. The total time span and data volume are enormous. This historical normalized data stream was segmented into fixed-length segments, for example, equivalent to 24 hours of data, and batch-fed into the model for training using a parallel computing Transformer mode. The training objective was to minimize the model's prediction error for sensor data at the next moment. After multiple rounds of iterative training, the model parameters converged, demonstrating a good ability to capture the dynamic characteristics of the compressor under various operating conditions.
[0075] The trained cloud-based model is then transformed. Specifically, all linear attention layers in the model are converted from a parallel computation mode that depends on the entire input sequence to a recursive computation mode that depends only on the previous hidden state and the current input. The transformed model is a pure feedforward recurrent network. Subsequently, the model is quantized to INT8 precision and deployed to an industrial-grade ARM architecture edge computing device edge gateway installed in the field. This gateway has limited memory, typically 4GB or less.
[0076] After the edge gateway starts, it receives streaming data from field sensors in real time and performs the same real-time preprocessing as S1. The processed real-time normalized data is then input into the deployed device state model point by point in chronological order. The model runs in a loop: for the input at time t, it uses the internally maintained hidden state vector H_t-1, updated at time t-1, combined with the current input X_t, to calculate a new hidden state vector H_t and a predicted output Y_t, which is the prediction of the sensor data for the next time step. The key to this process is that regardless of whether the compressor runs for 1 hour or 10,000 hours, the model only needs to maintain a fixed-size hidden state vector H in memory. Its dimension is defined by the model structure and does not grow linearly with the running time, thus achieving constant memory usage.
[0077] The anomaly detection module monitors two indicators simultaneously: 1. Prediction error: Calculates the root mean square error between the model's predicted value Y_t and the actual sensor reading. 2. State vector dynamics: Calculates the Mahalanobis distance between the current hidden state vector H_t and its historical mean within a sliding time window. During normal, stable operation, the prediction error is small, and the state vector distance fluctuates gently. When an anomaly occurs, the system dynamically deviates from the patterns learned by the model, leading to an increase in prediction error. More importantly, for fundamental changes in certain physical states, such as a step increase in bearing clearance due to wear, even if the instantaneous sensor reading does not exceed the threshold, the inherent dynamic characteristics have changed, causing a drastic and continuous deviation in the model's internal state vector H. Therefore, by comprehensively judging the sudden increase in prediction error and the continuous anomaly in state vector distance, faults can be detected more sensitively and reliably.
[0078] When the anomaly detection module outputs an error exceeding a preset confidence threshold, the edge gateway immediately sends a tiered alarm warning to the host computer monitoring system via OPCUA or MQTT protocols. Simultaneously, for emergency faults like surge, the model-generated high-risk surge digital signal can be directly hardwired into the compressor's Safety Instrumented System (SIS) or Programmable Logic Controller (PLC), triggering the anti-surge valve to open rapidly within milliseconds, forming a safety interlock protection.
[0079] Furthermore, the device state model based on the linear attention recurrent neural network architecture described in step S2 of the method includes at least multiple stacked linear attention layers;
[0080] The linear attention layer captures the dependencies between elements in the input sequence by replacing the dot product attention mechanism in the standard Transformer. The calculation of any target position in the sequence is achieved by weighted aggregation of historical information through a recursive weight update mechanism.
[0081] Furthermore, the recursive weight update mechanism in the linear attention layer described in this method is specifically implemented using the WKV operator;
[0082] For each attention head in the model, at time t, refer to Figure 2 The calculation process includes:
[0083] S21a, receive the accumulated state from the previous time t-1, the accumulated state including at least the normalized historical key value accumulation and att_{t-1}, and the denominator accumulation and den_{t-1} used for normalization;
[0084] S21b, calculate the query vector q_t, key vector k_t, and value vector v_t based on the input vector at the current time;
[0085] S21c, using a preset channel-related attenuation factor w, calculate the contribution weight of the current key vector k_t to the historical accumulation;
[0086] S21d, update the cumulative state recursively: add the cross product of the current key vector k_t and the value vector v_t to the historical cumulative sum att_{t-1} according to the contribution weight determined in step S21c, to form a new cumulative sum att_t; add the current key vector k_t to the historical denominator cumulative sum den_{t-1} according to the same contribution weight, to form a new denominator cumulative sum den_t;
[0087] S21e, calculate the output of the attention head at the current time, interact the current query vector q_t with the updated sum att, and divide by the result of the interaction between the current query vector q_t and the updated denominator sum den_t to obtain the weighted aggregated context vector;
[0088] In step S21f, the context vector obtained in step S21e is linearly transformed and then fused with the input information processed by another path to form the final output of the linear attention layer. This output is then passed to the next layer or used as the model output. The updated cumulative states att_t and den_t are saved for calculation in the next time step.
[0089] In this embodiment, the RWKV architecture used in model S2 is based on a linear attention layer, which replaces the standard Transformer's SoftmaxAttention with WKV operators. Specifically, in each linear attention layer, for each attention head, the computation does not involve calculating the dot product of the current query and all historical keys and then performing a Softmax operation, as is done in a traditional Transformer. Instead, it maintains two cumulative states: one is the weighted sum of the outer products of historical key-value pairs, denoted as att, and the other is the weighted sum of historical keys, denoted as den. These two states are recursively updated at each step.
[0090] When new input arrives, the model calculates the current query q_t, key k_t, and value v_t. The core of the update is a decay mechanism controlled by a learnable parameter w. This parameter determines the strength of historical information retention; a negative w means that earlier information decays exponentially. The recursive nature of the update formula is: the new att_t equals the previous time step's att_{t-1} adjusted for the decay factor, plus the contribution of the cross product of the current k_t and v_t. The update of den_t follows the same logic. Finally, the output context vector for the current time step is calculated through the interaction of the current query q_t with the latest att_t and den_t.
[0091] The physical significance of this design lies in the fact that the w parameter is analogous to a forget gate or an inertial time constant, allowing the model to fuse historical information in a controllable manner without explicitly storing a massive sequence of historical key-value pairs, i.e., a KVCache. Therefore, during edge inference S4, regardless of the length of the continuous data stream being processed, each attention head only needs to store a fixed-dimensional set of att and den states, achieving constant-level memory and computational complexity, fundamentally solving the memory explosion problem caused by long-cycle monitoring.
[0092] Furthermore, referring to Figure 3 The training process described in step S2 of this method further includes a step guided by physical state constraints, specifically:
[0093] S22a, Identify calculable or estimable physical state quantities related to the key physical degradation processes or states of the target industrial equipment;
[0094] S22b, Based on the historical monitoring data obtained in step S1, the physical state quantity reference value in time series form, synchronized with the historical monitoring data, is calculated offline through mechanism formulas, empirical models, or high-fidelity simulation.
[0095] S22c, In the network structure of the device state model, a specific internal hidden state vector or a derived vector obtained by its linear transformation is specified as the physical state mapping quantity represented by the neural network.
[0096] S22d, In the loss function for training the device state model, a physical state consistency constraint term is added. This term is used to measure the difference between the physical state mapping represented by the neural network in step S22c and the physical state quantity reference value calculated offline in step S22b at the corresponding time.
[0097] S22e, by optimizing the model through the overall loss function that includes the physical state consistency constraint, one or more dimensions of the internal hidden state of the device state model are forced to learn and approximate the state evolution law of the real physical system, thus injecting physical meaning into the black-box representation of the neural network.
[0098] In this embodiment, rotor imbalance is a key, gradually changing physical state quantity in compressor monitoring, directly related to faults such as bearing wear and blade fouling. While imbalance cannot be directly measured, it can be estimated through spectral analysis of vibration signals, particularly the amplitude of the rotational frequency and its harmonics.
[0099] During the cloud-based training phase of S2, physical state constraints are implemented for guidance:
[0100] S22a: Determine the target physical state quantity as the rotor equivalent unbalance quantity.
[0101] S22b: Using historical vibration data, and through professional rotor dynamics analysis software and signal processing algorithms, an offline calculation is performed to obtain a sequence of equivalent unbalance reference values corresponding to the historical data at each moment, which serves as a physical truth label.
[0102] S22c: When designing the RWKV model, this embodiment specifies a certain dimension or a linear combination of several dimensions in the hidden state vector of the final layer linear attention output as the imbalance quantity of the neural network representation.
[0103] S22d: In the training loss function, in addition to the usual prediction error loss such as MSE, an additional physical state consistency loss term is added. For example, the mean square error between the imbalance represented by the model and the offline calculated imbalance reference value is calculated.
[0104] S22e: By jointly optimizing the total loss function, the model, while learning to predict sensor data, is forced to track the actual physical degradation process through a specific state channel within it. After training, this constrained hidden state dimension is no longer a black box number, but a digital twin with a clear physical meaning: rotor imbalance. During edge inference, monitoring the values and trends of this specific state channel allows for direct assessment of the device's health degradation level, achieving a deep fusion and mapping between the physical entity and the digital state.
[0105] Furthermore, referring to Figure 4 In step S2 of this method, when constructing the device state model, the decay-related parameters of the linear attention layer in the model are initialized using physical guidance, specifically as follows:
[0106] S23a, Analyze the characteristics of sensor signals of different physical quantities in the multi-channel time-series monitoring data, and determine their respective physical time constants or dominant change frequency ranges;
[0107] S23b, map the initial value of the decay time constant determined in step S23a to the initial parameter value of the decay factor w of the corresponding channel in the linear attention layer;
[0108] S23c, In the early stage of model training, the initial parameter value of the decay factor w set in step S23b is subject to a stronger regularization constraint than other network parameters or a smaller learning rate is allowed, so as to maintain its weak correlation with physical time characteristics during training.
[0109] In this embodiment, the signals from different physical sensors have distinctly different time characteristics. The compressor vibration signal, especially the high-frequency acceleration signal, has an extremely fast response and can capture transient impacts at the millisecond level; while signals such as cylinder temperature and coolant temperature change slowly and have great thermal inertia.
[0110] During the initialization of the S2 model, this embodiment provides physical guidance for setting the decay parameter w in the linear attention layer:
[0111] S23a: Analyze each input channel. For the high-frequency signal input channel from the vibration accelerometer, its physical process time constant is small and changes rapidly. Therefore, in this embodiment, a smaller initial decay time constant is set for its associated model internal feature channel, i.e., the initial value of w is more negative, resulting in faster forgetting. For the low-frequency signal input channel from the temperature sensor, its physical process inertia is large and changes slowly. Therefore, a larger initial decay time constant is set for its associated channel, i.e., the initial value of w is biased towards zero, resulting in longer memory retention.
[0112] S23b: The above time constant is converted into the initial value of the w parameter through a mapping function.
[0113] S23c: In the initial training phase, this embodiment applies stricter L2 regularization to these w parameters than to other weight parameters and uses a lower learning rate. This ensures that w is primarily guided by physical priors in the early stages of training, and can only be adjusted slowly in subsequent training. This guarantees that the temporal mixing characteristics of the model always roughly conform to the basic inertial laws of the physical process, enhancing the interpretability of the model and its generalization ability under unseen conditions.
[0114] Furthermore, referring to Figure 5The analysis of the dynamic change characteristics of the hidden state vector within the model described in step S5 of this method specifically includes at least one of the following calculation methods:
[0115] S51a, State Trajectory Distance Calculation: Calculate the Euclidean distance or cosine similarity between the hidden state vector inside the model at the current moment and a baseline state vector obtained from historical normal data statistics; when the distance exceeds the dynamic threshold or the similarity is lower than the threshold, an anomaly prompt is triggered.
[0116] S51b, State Differential Energy Calculation: Calculate the norm of the difference vector of the hidden state vector inside the model between adjacent time steps, as a measure of the rate of state change. When the rate of change shows a significant peak or is continuously higher than the normal level in a short period of time, it is determined that the physical state has changed abruptly.
[0117] S51c, State Subspace Projection Analysis: Projects a series of hidden state vectors inside the model obtained during real-time inference onto a low-dimensional subspace obtained by principal component analysis of state vectors under normal operating conditions, and calculates its reconstruction error; when the reconstruction error continues to increase, it indicates that the system state is deviating from the state space spanned by the normal operating conditions.
[0118] In this embodiment, in the anomaly detection of S5, in addition to the prediction error, this embodiment deeply mines the information contained in the hidden state vector H_t:
[0119] S51a State Trajectory Distance Monitoring targets slow-changing faults: During the compressor's long-term normal operation, this embodiment calculates the average value H_normal of its hidden state vector H over one month as a health baseline. In real-time inference, the Euclidean distance D_t between H_t and H_normal is calculated at each moment. In the early stages of normal, slow bearing wear, the vibration amplitude may still be within the standard range, but H_t has already begun to gradually move away from H_normal, causing D_t to show a slow upward trend. This embodiment sets a dynamic threshold based on historical statistics. When D_t continuously exceeds the threshold, an early degradation warning is issued even if the prediction error does not increase significantly.
[0120] S51b state differential energy monitoring targets sudden faults by calculating the intensity of changes in the hidden state vector between adjacent time points, i.e., E_t = ||H_t - H_{t-1}||^2. During normal, stable operation or gradual changes, the value of E_t is small and stable. When surge precursors or sudden, strong impacts occur, the dynamic characteristics of the system change drastically, causing a violent adjustment of the internal state of the model. E_t will generate a sharp, high-energy pulse within milliseconds. Monitoring the instantaneous peak value of E_t can detect the onset of instability earlier than threshold alarms based on vibration amplitude.
[0121] S51c state subspace projection monitoring targets unknown mode anomalies: It collects a large number of hidden state vector sequences under normal operating conditions, extracts the first k principal components using Principal Component Analysis (PCA), and constructs a normal state subspace. During real-time inference, each H_t is projected onto this subspace to obtain a reconstructed vector H_t_recon, and then the reconstruction error R_t = ||H_t - H_t_recon|| is calculated. When the compressor enters an abnormal mode not fully covered by training data, such as a previously unseen airflow disturbance, its state vector will deviate from the normal subspace, causing the reconstruction error R_t to increase systematically. This method has good detection capability for unknown types of anomalies.
[0122] Furthermore, the multi-channel timing monitoring data mentioned in step S1 of the method includes control command data, and the device state model constructed in step S2 includes a channel mixing module;
[0123] The channel mixing module is configured to simultaneously receive embedded representations of physical quantity data from sensors and embedded representations of control command data. It then fuses and interacts these two types of input information with different properties through learnable network weights. This enables the model to learn the hysteresis and inertial response characteristics of the controlled physical quantity after the control command is issued, allowing it to more accurately predict the system behavior under specific control actions during inference.
[0124] In this embodiment, the compressor's anti-surge control is its core safety logic. The opening command control quantity of the anti-surge valve has a strong coupled and lagging relationship with the physical quantities of outlet pressure and flow rate.
[0125] When building the model in S2, the model's embedding layer and channel mixing module are designed to simultaneously receive two types of input: one is embedded physical quantity sensing data, such as pressure and flow rates, and the other is control command data, such as valve opening commands and start / stop signals, which are either heat-coded or embedded. The channel mixing module uses a learnable weight matrix to allow the physical quantity channels and control quantity channels to fully interact and merge at the feature level.
[0126] Training on large-scale historical data in S2, the model can automatically learn dynamic response relationships such as how the outlet pressure is expected to decrease and the flow rate to increase within hundreds of milliseconds after a sudden 20% increase in the anti-surge valve opening command. In edge inference in S4, when the operator or control system issues new valve commands, the model can make more accurate short-term predictions based on the learned physical-control coupling laws. This significantly improves the accuracy of state estimation under active control intervention conditions and reduces false alarms caused by control actions.
[0127] Furthermore, the model transformation described in step S3 of this method specifically includes rewriting all parallel computation operations based on historical windows in the model into recursive computation operations that depend only on the previous state.
[0128] For the linear attention layer, the Transformer-like computation graph in parallel mode is transformed into a mathematically equivalent loop computation unit that only maintains and updates the accumulated states att and den.
[0129] In this embodiment, during the conversion phase of S3, the conversion is not approximate, but rather a mathematically equivalent pattern rewrite.
[0130] During parallel training in the cloud, to facilitate parallel computation of long sequences using GPUs, this embodiment implements WKV in Transformer mode. This means that while the entire sequence is visible simultaneously, the computation process can be decomposed into a recursive form. Once training is complete and the model parameters are fixed, these parameters are directly used to initialize a loop inference model.
[0131] Each linear attention layer in this recurrent inference model acts like a special recurrent unit (RNNCell). During forward propagation, it requires only three inputs: the previous state of the unit (att_{t-1}, den_{t-1}), the current input features, and fixed model parameters including w. It outputs the current layer output and updates its own state to att_t, den_t. This transformation is precise and lossless. Therefore, for models deployed at the edge, the number of floating-point operations (FLOPs) for each forward inference iteration is absolutely constant, completely independent of the device's runtime, laying the foundation for deterministic real-time response.
[0132] Furthermore, the triggering of the safety interlock control command in step S6 of the method depends on the deterministic delay guarantee of the model cyclic reasoning process in step S4; since the amount of calculation for each reasoning of the device state model at the edge is constant, the worst-case execution time is controllable and predictable.
[0133] Based on the worst-case execution time, a deterministic alarm response delay window is set in the safety interlock logic of the industrial control system to ensure that model inference, anomaly determination and interlock command are completed within the critical time before the physical failure occurs, and the anomaly monitoring method is seamlessly integrated into the industrial safety instrument system with hard real-time requirements.
[0134] The method also includes an online adaptive fine-tuning step for the model:
[0135] During the deployment and operation of S7 at the edge, it continuously collects new, confirmed normal operating condition monitoring data and corresponding hidden state sequences within the model.
[0136] S71, after a preset amount of new data is collected, supervised or self-supervised fine-tuning is performed on the edge computing device or a lightweight server intermittently connected to it, in a way that the backbone parameters of the device state model are fixed and only a few specific layer or adapter parameters are updated.
[0137] S72, the goal of fine-tuning is to enable the model to maintain its ability to track slow drift caused by normal aging of equipment and process fine-tuning, while maintaining high sensitivity to sudden anomalies.
[0138] S73 safely updates the fine-tuned parameter increments to the running model, achieving progressive adaptation of the equipment status model and extending its effective monitoring lifecycle.
[0139] In this embodiment, the industrial safety interlocking system has extremely high requirements for the determinism of response time, typically requiring the entire chain from detection of action to completion to be completed within milliseconds.
[0140] Since the loop inference model described in S8 has a constant computational cost, worst-case execution time (WCET) analysis can be performed on specific edge hardware, such as an ARM processor with a specified clock frequency. Through performance profiling, this embodiment can determine the absolute longest time required for the model to complete a single inference iteration, for example, it will not exceed 2 milliseconds under any circumstances.
[0141] Based on this defined 2-millisecond upper limit, system integration engineers can design safety interlocking logic: from the moment the sensor signal enters the edge gateway, to the model outputting an anomaly signal, and then to the PLC driving the valve action, the delay of the entire loop can be precisely estimated and tested. For example, if the total delay budget is set at 10 milliseconds, then the 2-millisecond model inference time is a fixed part of this loop. This contrasts sharply with the use of the standard Transformer, whose inference time increases linearly with runtime, exhibiting unpredictable time jitter and failing to meet the certification requirements of hard real-time systems such as SIL level certification. This invention enables the reliable integration of advanced anomaly detection algorithms based on deep learning into control loops with the highest safety levels.
[0142] During long-term operation, compressors can experience very slow characteristic drift due to normal mechanical loosening, seal aging, and changes in process media. A fixed model may gradually misinterpret this drift as an anomaly.
[0143] Therefore, this embodiment implements online adaptive fine-tuning step S7:
[0144] S71: During normal operation, the edge gateway continuously caches model input data, prediction output, and hidden states. Once new data that is confirmed to be in normal operating condition after a certain period of time, such as a week, is accumulated, a low-priority background fine-tuning task is initiated.
[0145] S72: Fine-tuning employs efficient parameter fine-tuning techniques such as LoRA (Local Alternative Framework). This embodiment fixes all parameters of the original model (the model deployed in S3) and adds only a small number of low-rank trainable adapter parameters to the output projection bypass of key layers, such as the channel mixing layer. Then, using newly collected normal data, with the goal of self-supervised learning such as predicting the next time step, only these newly added adapter parameters are updated. This process has low computational cost and can be performed on an edge gateway or a connected lightweight server.
[0146] S73: After fine-tuning, a small incremental file containing only adapter parameters is generated. This incremental file is then merged into the running model through a secure verification and update mechanism. This preserves the model's core knowledge while adaptively adjusting to the device's current state, effectively reducing false alarms and extending the model's effective lifespan without the need for frequent redeployment of the complete model from the cloud.
[0147] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0148] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0149] The specific embodiments of the invention have been described in detail above, but they are only examples, and this application is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications or substitutions to the invention are also within the scope of this application. Therefore, all equivalent changes, modifications, and improvements made without departing from the spirit and principles of this application should be covered within the scope of this application.
Claims
1. A method for monitoring anomalies in industrial equipment based on linear attention and physical state mapping, characterized in that, The method includes: S1. Acquire multi-channel time-series monitoring data from the sensor network and control system of the target industrial equipment in real time or offline, preprocess the monitoring data, and form a standardized time-series data stream. S2, Construct a device state model based on a linear attention recurrent neural network architecture, and input the normalized time-series data stream into the device state model in parallel computing mode for training to obtain the device state model with stable parameters; S3. Convert the trained device state model from a mode suitable for batch parallel computing to a loop inference mode suitable for sequential step computing, and deploy the converted model to an edge computing device located in an industrial field with limited computing power; S4, on the edge computing device, real-time streaming monitoring data from the sensor network is received and preprocessed in the same way as in step S1 to obtain real-time normalized data. The device state model is run in a loop inference mode. For the input at the current moment, the model only depends on the internal hidden state at the previous moment and the current input to perform calculations, update the internal hidden state and generate output. S5. Based on the information generated by the equipment state model during the cyclic reasoning process, calculate the abnormality index; when the abnormality index exceeds the preset threshold or meets a specific mutation pattern, determine that the target industrial equipment has an abnormality. S6. Based on the determination result of step S5, trigger the corresponding alarm, log recording or safety interlock control command. The device state model based on the linear attention recurrent neural network architecture described in step S2 includes at least multiple stacked linear attention layers; The linear attention layer captures the dependencies between elements in the input sequence by replacing the dot product attention mechanism in the standard Transformer. The calculation of any target position in the sequence is achieved by weighted aggregation of historical information through a recursive weight update mechanism. The training process described in step S2 further includes a step guided by physical state constraints, specifically: S22a, Identify calculable or estimable physical state quantities related to the key physical degradation processes or states of the target industrial equipment; S22b, Based on the historical monitoring data obtained in step S1, the physical state quantity reference value in time series form, synchronized with the historical monitoring data, is calculated offline through mechanism formulas, empirical models, or high-fidelity simulation. S22c, In the network structure of the device state model, a specific internal hidden state vector or a derived vector obtained by its linear transformation is specified as the physical state mapping quantity represented by the neural network. S22d, In the loss function for training the device state model, a physical state consistency constraint term is added. This term is used to measure the difference between the physical state mapping represented by the neural network in step S22c and the physical state quantity reference value calculated offline in step S22b at the corresponding time. S22e, by optimizing the model through the overall loss function including the physical state consistency constraint, one or more dimensions of the internal hidden state of the device state model are forced to learn and approximate the state evolution law of the real physical system, and the physical meaning is injected into the black box representation of the neural network. In step S2, when constructing the device state model, the decay-related parameters of the linear attention layer in the model are initialized using physical guidance, specifically as follows: S23a, Analyze the characteristics of sensor signals of different physical quantities in the multi-channel time-series monitoring data, and determine their respective physical time constants or dominant change frequency ranges; S23b, map the initial value of the decay time constant determined in step S23a to the initial parameter value of the decay factor w of the corresponding channel in the linear attention layer; S23c, In the early stage of model training, the initial parameter value of the decay factor w set in step S23b is subject to a stronger regularization constraint than other network parameters or a smaller learning rate is allowed, so as to maintain its weak correlation with physical time characteristics during training.
2. The industrial equipment anomaly monitoring method based on linear attention and physical state mapping according to claim 1, characterized in that, Also includes: The monitoring data includes physical quantity sensing data and control command data; The preprocessing includes at least data cleaning, alignment, and standardization; The training process includes forward propagation to calculate the loss and backpropagation to update the model parameters, wherein the loss function includes at least a term that measures the difference between the model's predicted output and the real sensor data; The dimension and storage usage of the internal hidden state remain constant throughout the inference process and do not increase with runtime; The calculation of the anomaly index depends not only on the direct comparison error between the model's predicted output and the real-time sensor readings, but also on the analysis of the dynamic change characteristics of the hidden state vector within the model.
3. The industrial equipment anomaly monitoring method based on linear attention and physical state mapping according to claim 2, characterized in that, The recursive weight update mechanism in the linear attention layer is specifically implemented using the WKV operator. For each attention head in the model, at time t, the computation process includes: S21a, receive the accumulated state from the previous time t-1, the accumulated state including at least the normalized historical key value accumulation and att_{t-1}, and the denominator accumulation and den_{t-1} used for normalization; S21b, calculate the query vector q_t, key vector k_t, and value vector v_t based on the input vector at the current time; S21c, using a preset channel-related attenuation factor w, calculate the contribution weight of the current key vector k_t to the historical accumulation, where the contribution weight is related to the power of expw; S21d, update the cumulative state recursively: add the cross product of the current key vector k_t and the value vector v_t to the historical cumulative sum att_{t-1} according to the contribution weight determined in step S21c, to form a new cumulative sum att_t; add the current key vector k_t to the historical denominator cumulative sum den_{t-1} according to the same contribution weight, to form a new denominator cumulative sum den_t; S21e, calculate the output of the attention head at the current time, interact the current query vector q_t with the updated sum att, and divide by the result of the interaction between the current query vector q_t and the updated denominator sum den_t to obtain the weighted aggregated context vector; In step S21f, the context vector obtained in step S21e is linearly transformed and then fused with the input information processed by another path to form the final output of the linear attention layer. This output is then passed to the next layer or used as the model output. The updated cumulative states att_t and den_t are saved for calculation in the next time step.
4. The industrial equipment anomaly monitoring method based on linear attention and physical state mapping according to claim 2, characterized in that, The analysis of the dynamic change characteristics of the hidden state vector within the model described in step S5 specifically includes at least one of the following calculation methods: S51a, State Trajectory Distance Calculation: Calculate the Euclidean distance or cosine similarity between the hidden state vector inside the model at the current moment and a baseline state vector obtained from historical normal data statistics; when the distance exceeds the dynamic threshold or the similarity is lower than the threshold, an anomaly prompt is triggered. S51b, State Differential Energy Calculation: Calculates the norm of the difference vector of the hidden state vectors inside the model between adjacent time steps, as a measure of the rate of state change. When the rate of change shows a significant peak or remains above the normal level within a short period of time, it is determined that a sudden change has occurred in the physical state. S51c, State Subspace Projection Analysis: Projects a series of hidden state vectors inside the model obtained during real-time inference onto a low-dimensional subspace obtained by principal component analysis of state vectors under normal operating conditions, and calculates its reconstruction error. When the reconstruction error continues to increase, it indicates that the system state is deviating from the state space spanned by the normal operating conditions.
5. The industrial equipment anomaly monitoring method based on linear attention and physical state mapping according to claim 1, characterized in that, The multi-channel timing monitoring data mentioned in step S1 includes control command data, and the device state model constructed in step S2 includes a channel mixing module; The channel mixing module is configured to simultaneously receive embedded representations of physical quantity data from sensors and embedded representations of control command data. It then fuses and interacts these two types of input information with different properties through learnable network weights. This enables the model to learn the hysteresis and inertial response characteristics of the controlled physical quantity after the control command is issued, allowing it to more accurately predict the system behavior under specific control actions during inference.
6. The industrial equipment anomaly monitoring method based on linear attention and physical state mapping according to claim 3, characterized in that, The model transformation described in step S3 specifically includes rewriting all parallel computation operations based on historical windows in the model into recursive computation operations that depend only on the previous state. For the linear attention layer, the Transformer-like computation graph in parallel mode is transformed into a mathematically equivalent loop computation unit that only maintains and updates the accumulated states att and den.
7. The industrial equipment anomaly monitoring method based on linear attention and physical state mapping according to claim 2, characterized in that, The triggering of the safety interlock control command in step S6 depends on the deterministic delay guarantee of the model cyclic inference process in step S4; since the amount of calculation for each inference of the device state model at the edge is constant, the worst-case execution time is controllable and predictable. Based on the worst-case execution time, a deterministic alarm response delay window is set in the safety interlock logic of the industrial control system to ensure that model inference, anomaly determination and interlock command are completed within the critical time before the physical failure occurs, and the anomaly monitoring method is seamlessly integrated into the industrial safety instrument system with hard real-time requirements. The method also includes an online adaptive fine-tuning step for the model: During the deployment and operation of S7 at the edge, it continuously collects new, confirmed normal operating condition monitoring data and corresponding hidden state sequences within the model. S71, after a preset amount of new data is collected, supervised or self-supervised fine-tuning is performed on the edge computing device or a lightweight server intermittently connected to it, in a way that the backbone parameters of the device state model are fixed and only a few specific layer or adapter parameters are updated. S72, the goal of fine-tuning is to enable the model to maintain its ability to track slow drift caused by normal aging of equipment and process fine-tuning, while maintaining high sensitivity to sudden anomalies. S73 safely updates the fine-tuned parameter increments to the running model, achieving progressive adaptation of the equipment status model and extending its effective monitoring lifecycle.
Citation Information
Patent Citations
Network modeling method based on GNN and Transform model
CN119558346A
Physical information constraint embedded non-stationary industrial process anomaly detection method
CN120873899A