An engineering machine abnormality detection method based on conditional constraint virtual state repair
By constructing a multi-sensor relationship learning model, generating a virtual health status and combining it with various deviation evaluations, the accuracy of anomaly detection and the location of abnormal factors in engineering machinery under complex working conditions are solved, achieving more efficient anomaly detection and fault diagnosis.
Patent Information
- Application Number
- CN202611586617.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-14
- Publication Date
- 2026-11-10
AI Technical Summary
Existing methods for detecting anomalies in construction machinery are insufficient to accurately characterize the normal state distribution of sensors and the dynamic correlation between multiple sensors under complex working conditions. Furthermore, it is difficult to simultaneously achieve anomaly detection and anomaly location based solely on the deviation of a single state.
By constructing a multi-sensor relationship learning model, including a sensor state encoding module, an operating condition encoding module, a condition constraint learning module, and a virtual state generation module, the dynamic correlation between sensors is learned, the virtual health state of the target sensor is generated, and a comprehensive judgment is made through state deviation, sensor relationship deviation, and virtual state repair consistency evaluation.
It improves the accuracy of anomaly detection under complex working conditions, and can generate a virtual health state without using the target sensor's own state information, reducing the impact of changes in working conditions on the detection results and providing a basis for locating abnormal factors.
Smart Images

Figure CN123069233A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of health monitoring and intelligent operation and maintenance technology for construction machinery, specifically relating to a method for detecting anomalies in construction machinery based on condition-constrained virtual state repair. Background Technology
[0002] Construction machinery operates in complex environments such as mines, ports, construction sites, and material transport. Its critical components, including engines, hydraulic systems, transmission systems, and electrical systems, are typically monitored by multiple sensors. Sensor data such as engine temperature, coolant temperature, engine speed, hydraulic pressure, oil pressure, battery voltage, vibration intensity, and fuel consumption rate reflect the equipment's operating status from various perspectives. Analyzing the time-series data from these multi-source sensors to promptly detect equipment anomalies and identify the main contributing factors is a crucial foundation for early warning and condition-based maintenance of construction machinery.
[0003] Construction machinery experiences frequent changes in operating conditions during actual operation. Under different operating states such as excavation, unloading, transportation, idling, and driving, the normal value range and variation patterns of the same sensor may differ significantly. Furthermore, different sensors are not independent of each other; for example, changes in engine speed may simultaneously cause changes in fuel consumption, vibration, and hydraulic pressure, and their correlations may change with operating conditions. Therefore, relying solely on the value of a single sensor or a fixed normal range for anomaly detection can easily lead to misinterpreting fluctuations caused by changes in normal operating conditions as equipment malfunctions.
[0004] Existing methods for detecting anomalies in construction machinery typically employ fixed thresholds, statistical features, reconstruction errors, or anomaly representations obtained from neural networks for state discrimination. Fixed thresholds and statistical methods have limited adaptability to changes in the distribution of normal states under different operating conditions. While some deep learning-based methods can learn multi-sensor temporal features, they usually judge anomalies directly based on the deviation between input data and prediction or reconstruction results, failing to adequately utilize the dynamic correlations between different sensors as operating conditions change. When equipment operating conditions change, the distribution shift inherent in the normal state itself can cause significant changes in the anomaly representation, thus affecting the stability of the detection results.
[0005] Furthermore, when using multi-sensor data to predict the normal state of a specific sensor, if the model simultaneously uses the target sensor's own current state information, the model output is easily influenced by the target sensor's current observations. When the sensor has already malfunctioned, its malfunction information may simultaneously enter the state prediction process, preventing the generated results from fully reflecting the normal state the target sensor should possess under the constraints of other sensor states and current operating conditions. Therefore, how to establish the correlation between sensors based on the states and operating conditions of non-target sensors without utilizing the target sensor's own current state information, and thereby obtain a reference normal state for the target sensor, is a problem that needs to be solved in complex operating condition anomaly detection.
[0006] On the other hand, simply comparing the deviation between the actual state and the reference state of a sensor is insufficient to fully determine whether a change in a state has truly disrupted the original multi-sensor correlation of the device. For example, a sensor may exhibit a certain degree of numerical deviation, but its overall correlation with other sensors may still conform to the current operating conditions; conversely, some anomalies with insignificant amplitude changes may also disrupt the original correlation between multiple sensors. Therefore, relying solely on a single state deviation is insufficient to simultaneously reflect changes in the sensor's own state and changes in the multi-sensor relationships.
[0007] Furthermore, existing anomaly detection methods typically focus more on whether equipment is abnormal. However, further determination of the cause of anomalies often relies on ranking by anomaly amplitude, feature importance, or the degree of anomaly in a single sensor. This makes it difficult to directly determine whether the overall sensor correlation of the equipment improves after a particular sensor returns to its normal reference state. Therefore, for complex, coupled multi-sensor systems in engineering machinery, it is necessary to establish an evaluation method that reflects the degree of restoration of equipment correlation after the target sensor's state is restored. This would provide a basis for anomaly detection and localization.
[0008] Based on the above problems, it is necessary to propose a multi-sensor anomaly detection method for engineering machinery applicable to complex operating conditions. Under the constraints of operating conditions, the method learns the dynamic correlation between different sensors under normal conditions. When generating the reference state of the target sensor, its current state information is excluded. A corresponding virtual health state is generated based on the state of non-target sensors and operating conditions. The operating status of the equipment is comprehensively judged by the state deviation between the actual state and the virtual health state, the deviation of sensor relationship, and the relationship recovery after virtual state repair. This improves the accuracy of anomaly detection under complex operating conditions and provides a basis for locating abnormal factors. Summary of the Invention
[0009] The purpose of this invention is to provide an anomaly detection method for engineering machinery based on condition-constrained virtual state repair, in order to solve the problems in the prior art where the distribution of normal sensor states changes with operating conditions under complex working conditions, the dynamic correlation between multiple sensors is difficult to accurately depict, and it is difficult to simultaneously take into account anomaly detection and anomaly factor location based solely on a single state deviation or anomaly discrimination quantity.
[0010] The technical solution for achieving the present invention is: a method for detecting anomalies in engineering machinery based on conditional constraint virtual state repair, comprising the following steps:
[0011] Step 1: Based on the operating conditions and cycle time information of multiple construction machines, each construction machine uses multiple sensors to collect data and obtain multi-source sensor time-series data. The multi-source sensor time-series data includes the operating status data of each construction machine. The multi-source sensor time-series data are all labeled with health status. The samples in the multi-source sensor time-series data are divided into normal samples containing the normal operating status of the construction machine and abnormal samples containing the abnormal operating status of the construction machine. The multi-source sensor time-series data are divided into training set, validation set and test set according to the proportion.
[0012] Step 2: Construct a state view for the time series data from multiple sources sensors, and establish a multi-view state representation that includes a basic state view, a differential state view, a rolling fluctuation state view, and a robust standard state view for operating conditions.
[0013] Step 3: Construct a multi-sensor relationship learning model:
[0014] The multi-sensor relationship learning model includes a sensor state encoding module, an operating condition encoding module, a condition constraint learning module, and a virtual state generation module.
[0015] Select the i-th sensor as the target sensor, and the others as non-target sensors.
[0016] The sensor state coding module performs feature mapping on the multi-view state representations corresponding to each sensor and introduces sensor type coding to distinguish different physical measurement objects, thereby obtaining multi-sensor state representations.
[0017] The operating condition coding module performs time-series coding on the operating condition data, which includes information on the operating conditions and cycle time of the construction machinery, to obtain operating condition characteristics.
[0018] The condition constraint learning module learns the relationship between the non-target sensor state and the operating condition features to obtain the relational context of the i-th target sensor.
[0019] The virtual state generation module takes the relational context, operating condition characteristics, and target sensor identity code of the i-th target sensor as input to obtain the virtual health state corresponding to the i-th target sensor.
[0020] Step 4: Train the multi-sensor relationship learning model using the training and validation sets to obtain the trained multi-sensor relationship learning model.
[0021] S4-1. Input the normal samples of the training set into the multi-sensor relationship learning model. The sensor state encoding module and the operating condition encoding module respectively obtain the multi-sensor state representation and operating condition features of the normal samples. Input the multi-sensor state representation and operating condition features of the normal samples into the condition constraint learning module and the virtual state generation module for the first stage of training to learn the dynamic correlation between different sensors under normal operating conditions of the construction machinery.
[0022] S4-2. Freeze the parameters of the sensor state encoding module, the operating condition encoding module, the condition constraint learning module, and the virtual state generation module; use all samples in the training set to perform a second-stage training on the fusion parameters of the state deviation representation quantity, the sensor relationship deviation representation quantity, and the virtual state repair consistency representation quantity, and determine the anomaly discrimination threshold based on the validation set to obtain the trained multi-sensor relationship learning model.
[0023] Step 5: Input the test set into the trained multi-sensor relationship learning model to obtain the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation. Perform weighted fusion of the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation to obtain the virtual state repair consistency evaluation value. Compare the virtual state repair consistency evaluation value with the anomaly discrimination threshold to determine whether the construction machinery is in an abnormal state.
[0024] Step 6: When the construction machinery is determined to be in an abnormal state, the main abnormal factors are determined based on the local state deviation contribution of each target sensor and the relationship recovery contribution after virtual state repair; when the construction machinery is determined to be in a normal state, no abnormal factor localization is performed, and the current detection ends.
[0025] Compared with the prior art, the significant advantages of this invention are:
[0026] (1) By introducing the characteristics of operating conditions into the multi-sensor relationship learning process, the correlation between different sensors can be adjusted with the changes in the operating conditions of the engineering machinery, thereby reducing the impact of normal state changes caused by different operating conditions on abnormal detection results.
[0027] (2) By adopting the independent relationship construction method of target sensors, the target sensor’s own state information is removed when generating the virtual health state of the target sensor, and the corresponding virtual health state is generated according to the non-target sensor state, operating condition characteristics and target sensor identity code; at the same time, the three types of characterization quantities, state deviation, sensor relationship deviation and virtual state repair consistency, are combined to make anomaly judgment, thereby improving the accuracy of anomaly detection under complex working conditions.
[0028] (3) By replacing the actual multi-view state representation of the target sensor with the virtual health state multi-view representation one by one, and calculating the contribution of abnormal factors of each target sensor based on the relationship recovery contribution and local state deviation contribution before and after repair, the abnormal factors are sorted and the main abnormal factors are determined, providing a basis for subsequent fault investigation and maintenance decisions. Attached Figure Description
[0029] Figure 1 This is a flowchart of an anomaly detection method for engineering machinery based on conditional constraint virtual state repair according to the present invention.
[0030] Figure 2 This is a structural diagram of the anomaly detection model based on conditional constraint virtual state repair according to the present invention.
[0031] Figure 3 This is a graph showing the anomaly detection performance evaluation index of the present invention.
[0032] Figure 4 The sensor contributes a heat map to the abnormal samples of this invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] Combination Figure 1 The present invention discloses an anomaly detection method for engineering machinery based on conditional constraint virtual state repair. First, time-series data from multiple sensor sources of the engineering machinery are collected and proportionally divided into training, validation, and test sets. Then, a multi-sensor state view is constructed, and a multi-sensor relationship learning model is established. This model includes a sensor state encoding module, an operating condition encoding module, a conditional constraint learning module, and a virtual state generation module. Next, the multi-sensor relationship learning model is trained using the training and validation sets to obtain a well-trained model. Finally, the test set is input into the trained model to determine whether the engineering machinery is in an abnormal state, and the main anomaly factors are determined based on the contribution of each target sensor to the anomaly factors. The specific steps are as follows:
[0035] Step 1: Based on the operating conditions and cycle time information of multiple construction machines, each machine uses multiple sensors to collect data, obtaining multi-source sensor time-series data. This multi-source sensor time-series data includes the operating status data of each construction machine. Each multi-source sensor time-series data item carries a health status label. The samples in the multi-source sensor time-series data are divided into normal samples containing data of the construction machines operating normally and abnormal samples containing data of the construction machines operating abnormally. The multi-source sensor time-series data is then proportionally divided into training, validation, and test sets, as detailed below:
[0036] The operating condition information includes 5-dimensional operating status information and 4-dimensional cycle time information. The 5-dimensional operating status information includes excavation status, unloading status, transportation status, idling status, and driving status. The 4-dimensional cycle time information includes time sine feature, time cosine feature, date sine feature, and date cosine feature. The multi-source sensor time series data includes eight types of sensor signals: engine temperature, coolant temperature, engine speed, hydraulic pressure, oil pressure, battery voltage, vibration intensity, and fuel consumption rate. According to the preset proportion of the number of construction machinery, the multi-source sensor time series data is divided into training set, validation set, and test set.
[0037] Step 2: Construct a state view for the multi-source sensor time-series data, establishing a multi-view state representation that includes a basic state view, a differential state view, a rolling fluctuation state view, and a robust standard state view for operating conditions, as detailed below:
[0038] Basic State View Represented as:
[0039] ,
[0040] Differential State View Represented as:
[0041] ,
[0042] Scrolling fluctuation status view Represented as:
[0043] ,
[0044] Operating condition robust standard sub-state view Represented as:
[0045] ,
[0046] In the formula, For the first The target sensor is in The state at any given moment, The length of the scroll window. and Information on operating conditions of construction machinery Next The mean and standard deviation of normal state data from each target sensor. This is the function for calculating standard deviation. .
[0047] By combining the basic state view, differential state view, rolling fluctuation state view, and robust standard state view corresponding to the same sensor, a multi-view state representation of the sensor is obtained. :
[0048] .
[0049] Step 3: Construct a multi-sensor relationship learning model:
[0050] The multi-sensor relationship learning model includes a sensor state encoding module, an operating condition encoding module, a condition constraint learning module, and a virtual state generation module.
[0051] Select the One sensor is designated as the target sensor, and the others are designated as non-target sensors.
[0052] The sensor state encoding module performs feature mapping on the multi-view state representations corresponding to each sensor and introduces sensor type encoding to distinguish different physical measurement objects, thereby obtaining multi-sensor state representations. .
[0053] The operating condition encoding module performs time-series encoding on the operating condition data, which includes information on the operating conditions and cycle time of the construction machinery, to obtain operating condition characteristics. .
[0054] The conditional constraint learning module learns the relationship between the non-target sensor states and operating condition characteristics to obtain the first... The relational context of the target sensors .
[0055] The virtual state generation module will... The relational context of the target sensors Operating conditions and characteristics and target sensor identification code As input, obtain the first The virtual health status corresponding to each target sensor is as follows:
[0056] The sensor state encoding module performs feature mapping on the multi-view state representations corresponding to each sensor and introduces sensor type encoding to distinguish different physical measurement objects, thereby obtaining multi-sensor state representations. The operating condition encoding module performs time-series encoding on the operating condition data, which includes information on the operating conditions and cycle time of the construction machinery, to obtain operating condition features. The condition constraint learning module learns the relationship between the non-target sensor states and the operating condition features to obtain the first... The relational context of each target sensor; the virtual state generation module will generate the first... Taking the relational context of each target sensor, its operating condition characteristics, and its identity code as input, we obtain the first... Virtual health status corresponding to each target sensor The details are as follows:
[0057] The sensor state encoding module performs feature mapping on the multi-view state representations corresponding to each sensor and introduces sensor type encoding to distinguish different physical measurement objects, thereby obtaining multi-sensor state representations. The specific operation is as follows:
[0058] No. The target sensor is in State representation at time for:
[0059] ,
[0060] In the formula, It is a multi-view state mapping function composed of a linear mapping layer, a non-linear activation layer, and a linear mapping layer. For the first The sensor type code corresponding to each target sensor For the first The target sensor is in The state representation at any given moment. This is the layer normalization function.
[0061] Representing the status of each sensor By combining the data, a multi-sensor state representation can be obtained. :
[0062] .
[0063] The operating condition coding module uses operating condition data that includes information on the operating conditions and cycle time of the construction machinery. As input, the data first undergoes linear mapping, nonlinear activation, and normalization to obtain the conditional basic features. The specific steps are as follows:
[0064] ,
[0065] In the formula, For the conditional mapping weight matrix, For bias parameters, is the activation function for the Gaussian error linear unit.
[0066] Then, conditional basic features are extracted through temporal convolution. The dynamic characteristics are obtained by introducing residual fusion to obtain the operating condition characteristics. :
[0067] ,
[0068] In the formula, This is the temporal convolution mapping function.
[0069] Finally, the multi-sensor state representation will be... and operating condition characteristics Common input condition constraint learning module.
[0070] The conditional constraint learning module adopts a target sensor independence relationship construction method in the construction of the first... When dealing with the relational context corresponding to a target sensor, the target sensor's own state information is removed. Based on the state of non-target sensors, current operating conditions, and the target sensor's identity information, the association relationship between the target sensor and other non-target sensors is determined. The specific operation is as follows:
[0071] For the A non-target sensor, its state is represented. Characteristics of current operating conditions Perform concatenation and obtain the first [unclear] through relation key mapping. Non-target sensor relationship key :
[0072] ,
[0073] In the formula, For the first A non-target sensor in The key to time relationships These are the parameters for mapping relational keys.
[0074] For the Each target sensor is identified by encoding its identity. Characteristics of current operating conditions The data is then concatenated, and the target sensor relationship query is obtained through a relationship query mapping. :
[0075] ,
[0076] In the formula, For the first The target sensor is in Time-based relationship lookup For relational query mapping parameters, Identify the target sensor.
[0077] Query based on target sensor relationship Relationship with each non-target sensor The degree of correlation between them, calculate the first The non-target sensor for the first Relationship weights of target sensors :
[0078] ,
[0079] In the formula, For the first The non-target sensor and the first The relationship weights between individual target sensors In the process of summing, the first A relational key vector for a non-target sensor. It is the transpose symbol. For relational feature dimensions, It is an exponential function; by letting , making the first The state of a target sensor itself does not participate in the construction of its relational context.
[0080] After mapping the state representations of each non-target sensor through relational values, weighted fusion is performed according to the corresponding relational weights to obtain the first... The relational context of the target sensors :
[0081] ,
[0082] In the formula, For the first The target sensor is in The context of time, These are parameters for mapping relational values.
[0083] The virtual state generation module will... The relational context of the target sensors Current operating conditions and characteristics and target sensor identification code As input, we get the first The target sensor is in Virtual health status at any given time The specific steps are as follows:
[0084] ,
[0085] In the formula, A virtual state generator mapper is generated for all target sensors.
[0086] To ensure that the virtual health status has a consistent multi-view representation with the actual sensor status, the first... Virtual health status of individual target sensors Following the same state view construction method as the actual sensor state, virtual basic state view, virtual differential state view, virtual rolling fluctuation state view, and virtual operating condition robust standard score state view are constructed respectively, as follows:
[0087] ,
[0088] ,
[0089] ,
[0090] ,
[0091] In the formula, , , and The first The virtual health status of each target sensor includes a basic state view, a differential state view, a rolling fluctuation state view, and a robust standard state view for operating conditions. The length of the scroll window. and Information on operating conditions of construction machinery Next The mean and standard deviation of the normal state data of each target sensor.
[0092] The first The four types of state views corresponding to the virtual health status of each target sensor are combined to obtain a multi-view representation of the virtual health status:
[0093] .
[0094] Step 4: Train the multi-sensor relationship learning model using the training and validation sets to obtain the trained multi-sensor relationship learning model.
[0095] S4-1. Input the normal samples from the training set into the multi-sensor relationship learning model. The sensor state encoding module and the operating condition encoding module respectively obtain the multi-sensor state representation and operating condition features of the normal samples. Input the multi-sensor state representation and operating condition features of the normal samples into the condition constraint learning module and the virtual state generation module for the first stage of training. Learn the dynamic correlation between different sensors under normal operating conditions of the construction machinery, as follows:
[0096] In S4-1, the multi-sensor relationship learning model is trained in the first stage using normal samples from the training set. The training loss includes virtual health state generation loss, relationship consistency loss, and virtual state relationship alignment loss, specifically expressed as follows:
[0097] ,
[0098] In the formula, For the training losses in the first phase, Generate loss for virtual health status. For relationship consistency loss, For virtual state relation alignment loss, and These are the weight parameters corresponding to the relation consistency loss and the virtual state relation alignment loss, respectively.
[0099] The virtual health state generation loss is used to constrain the difference between the virtual health state generated under normal operating conditions and the corresponding actual sensor state, and is expressed as:
[0100] ,
[0101] In the formula, For the first Virtual health status of each target sensor. For the first The actual state sequence of each sensor For smoothing L1 loss function; This is the length of the scroll window.
[0102] The first The state representation of each sensor is obtained by mapping the actual state relationship. :
[0103] ,
[0104] The relationship consistency loss is calculated based on the difference between the actual state relationship representation and the relationship context formed by the non-target sensor states and operating conditions:
[0105] ,
[0106] In the formula, For the first The actual state relationship of each sensor. For the first Target sensor relationship context, It is the vector 2 norm.
[0107] The first Multi-view representation of the virtual health status of individual target sensors Input the sensor status encoding module to obtain the corresponding virtual health status representation. Virtual state relation alignment loss To ensure that the virtual health state multi-view representation obtained by the sensor state encoding module remains consistent with the corresponding relational context:
[0108] ,
[0109] Finally, the parameters of the sensor state encoding module, the running condition encoding module, the conditional constraint learning module, and the virtual state generation module are updated by minimizing the training loss of the first stage, thus completing the first stage of training.
[0110] S4-2. Freeze the parameters of the sensor state encoding module, operating condition encoding module, conditional constraint learning module, and virtual state generation module; use all samples in the training set to perform a second-stage training on the fusion parameters of the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation; and determine the anomaly discrimination threshold based on the validation set to obtain the trained multi-sensor relationship learning model, as detailed below:
[0111] The parameters of the sensor state encoding module, operating condition encoding module, condition constraint learning module, and virtual state generation module, which were completed in the first phase of training, are frozen. Using normal and abnormal samples in the training set, the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation are calculated respectively. The three types of representations are then fused, and the output is denoted as the virtual state repair consistency evaluation quantity. ;
[0112] The state deviation representation quantities are as follows:
[0113] For the A target sensor, based on its position state of time With Virtual health status at any given time The deviation between them is used to calculate the state deviation:
[0114] ,
[0115] In the formula, For the first The state deviation of each target sensor This function represents the time aggregation of time series within a scrolling window.
[0116] The maximum value among the deviations of the states of each target sensor is taken as the state deviation characterization quantity. :
[0117] ,
[0118] The sensor relationship deviates from the representation quantity as follows:
[0119] According to the The actual state relationship of each sensor is represented Relationship context formed by non-target sensor states and operating conditions The difference between them, calculate the first The relationship violation quantity of the individual sensors:
[0120] ,
[0121] In the formula, For the first One sensor in The relationship between time and quantity violates the principle of quantity.
[0122] The degree of deviation in the relationship between each sensor is aggregated over time and averaged to obtain the sensor relationship deviation characterization quantity. :
[0123] ,
[0124] In the formula, Represents the time series Perform aggregation.
[0125] The consistency representation of virtual state repair is as follows:
[0126] Regarding the first Each target sensor, representing its multi-view state. Replace with the corresponding virtual health status multi-view representation Constructing a multi-sensor state representation after virtual state restoration :
[0127] ,
[0128] and in accordance with The sensor relationship obtained in the same way deviates from the characterization quantity According to the deviation of the sensor relationship before and after repair from the characterization quantity Calculate the first Contribution to relation recovery for each target sensor:
[0129] ,
[0130] In the formula, For the first Each target sensor contributes to the relationship recovery after completing virtual state repair.
[0131] The virtual state repair consistency representation is obtained by recovering the contribution of the relationships corresponding to all target sensors. :
[0132] ,
[0133] In the formula, To restore the consistency representation of virtual states.
[0134] The training loss in the second stage uses binary cross-entropy loss with class weights:
[0135] ,
[0136] In the formula, Losses due to the second phase of training The health status labels for the training samples, with the normal state corresponding to... Abnormal state corresponding , The category weights are the corresponding to the anomaly categories. For the Sigmoid function, To improve the consistency evaluation of virtual state repair.
[0137] After the second phase of training is completed, the anomaly discrimination threshold is determined based on the distribution of the virtual state repair consistency evaluation quantity corresponding to the normal samples in the validation set. This yields a well-trained multi-sensor relationship learning model.
[0138] Step 5: Input the test set into the trained multi-sensor relationship learning model to obtain the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation. Then, perform a weighted fusion of these representations to obtain the virtual state repair consistency evaluation value. Finally, compare the virtual state repair consistency evaluation value with the anomaly detection threshold. A comparison was made to determine whether the construction machinery was in an abnormal state, as follows:
[0139] Deviate from the representation quantity Sensor relationship deviation from the characterization quantity and the consistency representation of virtual state repair The three types of representations are weighted and fused to obtain the consistency evaluation quantity for virtual state repair. :
[0140] ,
[0141] In the formula, , and These are the fusion weights corresponding to the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation obtained in the second stage of training, respectively. To fuse bias parameters.
[0142] Virtual state repair consistency evaluation quantity The anomaly detection threshold determined by the validation set When comparing, If the condition is abnormal, the construction machinery is determined to be in an abnormal state; otherwise, the construction machinery is determined to be in a normal state.
[0143] Step 6: When the construction machinery is determined to be in an abnormal state, the contribution of the local state deviation of each target sensor is used to determine the impact factor. And the contribution to relationship restoration after virtual state repair The main anomalies have been identified, as follows:
[0144] For the The contribution of anomalous factors to a target sensor is expressed as follows:
[0145] ,
[0146] In the formula, For the first The contribution of anomalous factors to each target sensor. For the first The contribution of local state deviation to each target sensor. To make the first The relation recovery contribution is obtained after replacing the multi-view state representation of each target sensor with the corresponding virtual health state multi-view representation.
[0147] Next, the contribution of abnormal factors to each target sensor is calculated: The abnormal factors were sorted from largest to smallest according to their contribution, and the sensor with the largest contribution was identified as the main abnormal factor causing the abnormality of the engineering machinery.
[0148] Example 1: Experimental Verification of Anomaly Detection in Multi-Sensor Operation Data of Engineering Machinery
[0149] This experiment uses operational data from multiple construction machines to verify the proposed anomaly detection method for construction machinery based on conditional constraint virtual state repair. The experimental data includes operational status data from 20 construction machines, denoted as HM-001 to HM-020. For each machine, eight sensor signals were collected: engine temperature, coolant temperature, engine speed, hydraulic pressure, oil pressure, battery voltage, vibration intensity, and fuel consumption rate. For each sensor signal, a basic state view, a differential state view, a rolling fluctuation state view, and a robust standard state view were constructed; 5-dimensional operational status information and 4-dimensional periodic time information were also introduced. In the experiment, the equipment status samples corresponding to HM-001 to HM-014 were selected as the training set, HM-015 to HM-017 as the validation set, and HM-018 to HM-020 as the test set.
[0150] Figure 2 This invention presents the anomaly detection model structure based on conditional constraint virtual state repair. First, multi-source sensor time-series data is constructed into a multi-view state representation, and state features and operating condition features are extracted using a sensor state encoding module and an operating condition encoding module, respectively. Then, a conditional constraint learning module is used to learn the dynamic correlation between sensors, and a virtual health state corresponding to the target sensor is generated using a virtual state generation module. In the detection phase, a fusion evaluation is performed based on the state deviation between the actual state and the virtual health state, the sensor relationship deviation, and the consistency representation quantity of virtual state repair, to achieve equipment anomaly state identification. Furthermore, the main anomaly factors are determined by ranking the contribution of each sensor's anomaly factors, thus achieving anomaly factor localization.
[0151] Combination Figure 3 As shown in Table 1, Accuracy, Precision, Recall, F1, ROC-AUC, and PR-AUC were used as evaluation metrics. Accuracy measures the overall detection accuracy; Precision measures the proportion of actually abnormal samples among those judged as abnormal; Recall measures the proportion of actually abnormal samples correctly detected; F1 is used to comprehensively evaluate the balance between Precision and Recall; and ROC-AUC and PR-AUC are used to evaluate the model's ability to distinguish between normal and abnormal states. The test dataset contained 6459 equipment state samples. This invention achieved a detection accuracy of 97.72%, precision of 87.15%, recall of 86.99%, and F1 score of 87.07%, with ROC-AUC reaching 98.07% and PR-AUC reaching 92.29%, and a false positive rate of 1.24%. The test results show that this invention can effectively distinguish between normal and abnormal states of construction machinery under different operating conditions and has good anomaly detection performance.
[0152] Table 1. Anomaly detection results on the test set
[0153]
[0154] Figure 4 A heatmap of sensor contributions for anomalous samples is presented, showing the distribution of anomalous factor contributions from each sensor in different anomalous samples. It can be seen that there are significant differences in the main contributing sensors corresponding to different anomalous samples. Specifically, the engine speed sensor has a relatively high contribution from anomalous factors in some anomalous samples, while sensors such as fuel consumption rate and vibration intensity also show high contributions in some samples. The results indicate that the proposed method can distinguish anomalous sensors by combining the local state deviation contribution and relationship recovery contribution of each sensor, and further identify the main anomalous factors.
[0155] In summary, to address the challenge of anomaly detection in complex working conditions caused by the changing normal states of sensors on construction machinery and the dynamic changes in the relationships between multiple sensors, this invention achieves anomaly detection in construction machinery through conditional constraint multi-sensor relationship learning, virtual health state generation, and consistency evaluation of virtual state repair. Furthermore, it can locate anomaly factors based on the local state deviation contribution and relationship recovery contribution of each sensor. Experimental results from multiple construction machinery operating data verify the effectiveness of the method presented in this invention.
[0156] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting anomalies in engineering machinery based on conditional constraint virtual state repair, characterized in that, Includes the following steps: Step 1: Based on the operating conditions and cycle time information of multiple construction machines, each construction machine uses multiple sensors to collect data and obtain multi-source sensor time-series data. The multi-source sensor time-series data includes the operating status data of each construction machine. The multi-source sensor time-series data are all labeled with health status. The samples in the multi-source sensor time-series data are divided into normal samples containing the normal operating status of the construction machine and abnormal samples containing the abnormal operating status of the construction machine. The multi-source sensor time-series data are divided into training set, validation set and test set according to the proportion. Step 2: Construct a state view for the time series data from multiple sources sensors, and establish a multi-view state representation that includes a basic state view, a differential state view, a rolling fluctuation state view, and a robust standard state view for operating conditions. Step 3: Construct a multi-sensor relationship learning model: The multi-sensor relationship learning model includes a sensor state encoding module, an operating condition encoding module, a condition constraint learning module, and a virtual state generation module. Select the One sensor is designated as the target sensor, and the others are designated as non-target sensors; The sensor state encoding module performs feature mapping on the multi-view state representations corresponding to each sensor and introduces sensor type encoding to distinguish different physical measurement objects, thereby obtaining multi-sensor state representations. ; The operating condition encoding module performs time-series encoding on the operating condition data, which includes information on the operating conditions and cycle time of the construction machinery, to obtain operating condition characteristics. ; The conditional constraint learning module learns the relationship between the non-target sensor states and operating condition characteristics to obtain the first... The relational context of the target sensors ; The virtual state generation module will... The relational context of the target sensors Operating conditions and characteristics and target sensor identification code As input, obtain the first The virtual health status corresponding to each target sensor; Step 4: Train the multi-sensor relationship learning model using the training and validation sets to obtain the trained multi-sensor relationship learning model. S4-1. Input the normal samples from the training set into the multi-sensor relationship learning model, and obtain the multi-sensor state representation and operating condition features of the normal samples through the sensor state encoding module and the operating condition encoding module, respectively. The multi-sensor state representation and operating condition features of normal samples are input into the condition constraint learning module and the virtual state generation module for the first stage of training, so as to learn the dynamic correlation between different sensors as the operating conditions change under the normal operating conditions of the construction machinery. S4-2. Freeze the parameters of the sensor state encoding module, the operating condition encoding module, the condition constraint learning module, and the virtual state generation module; use all samples in the training set to perform the second stage training on the fusion parameters of the state deviation representation quantity, the sensor relationship deviation representation quantity, and the virtual state repair consistency representation quantity, and determine the anomaly discrimination threshold based on the validation set to obtain the trained multi-sensor relationship learning model. Step 5: Input the test set into the trained multi-sensor relationship learning model to obtain the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation. Then, perform a weighted fusion of these representations to obtain the virtual state repair consistency evaluation value. Finally, compare the virtual state repair consistency evaluation value with the anomaly detection threshold. Compare the equipment to determine if it is in an abnormal condition. Step 6: When the construction machinery is determined to be in an abnormal state, the contribution of the local state deviation of each target sensor is used to determine the impact factor. And the contribution to relationship restoration after virtual state repair Identify the main abnormal factors; when the construction machinery is determined to be in normal condition, do not locate the abnormal factors and end the current inspection.
2. The method for detecting anomalies in engineering machinery based on conditional constraint virtual state repair according to claim 1, characterized in that: In step 1, the operating condition information includes 5-dimensional operating status information and 4-dimensional periodic time information. The 5-dimensional operating status information includes excavation status, unloading status, transportation status, idling status, and driving status. The 4-dimensional periodic time information includes time sine feature, time cosine feature, date sine feature, and date cosine feature. The multi-source sensor time series data includes eight sensor signals: engine temperature, coolant temperature, engine speed, hydraulic pressure, oil pressure, battery voltage, vibration intensity, and fuel consumption rate. According to the preset proportion of construction machinery, the multi-source sensor time series data is divided into training set, validation set, and test set.
3. The method for detecting anomalies in engineering machinery based on conditional constraint virtual state repair according to claim 2, characterized in that: In step 2, a basic state view, a differential state view, a rolling fluctuation state view, and a robust standard state view based on the multi-source sensor time-series data are constructed, as detailed below: Basic State View Represented as: , Differential State View Represented as: , Scrolling fluctuation status view Represented as: , Operating condition robust standard sub-state view Represented as: , In the formula, For the first The target sensor is in The state at any given moment, The length of the scroll window. and Information on operating conditions of construction machinery Next The mean and standard deviation of normal state data from each target sensor. This is the function for calculating standard deviation. ; By combining the basic state view, differential state view, rolling fluctuation state view, and robust standard state view corresponding to the same sensor, a multi-view state representation of the sensor is obtained. : 。 4. The method for detecting anomalies in engineering machinery based on conditional constraint virtual state repair according to claim 3, characterized in that: In step 3, the sensor state encoding module performs feature mapping on the multi-view state representations corresponding to each sensor and introduces sensor type encoding to distinguish different physical measurement objects, thereby obtaining multi-sensor state representations. The operating condition coding module performs time-series coding on the operating condition data, which includes information on the operating conditions and cycle time of the construction machinery, to obtain the operating condition characteristics. The conditional constraint learning module learns the relationship between the non-target sensor state and the operating condition characteristics to obtain the first... The relational context of the target sensors The virtual state generation module will generate the first... The relational context of the target sensors Operating conditions and characteristics and target sensor identification code As input, obtain the first Virtual health status corresponding to each target sensor The details are as follows: The sensor state coding module represents the multi-view state of each sensor. Perform feature mapping and introduce sensor type encoding. To distinguish different physical measurement objects and obtain multi-sensor state representations, the specific operations are as follows: No. The target sensor is in State representation at time for: , In the formula, It is a multi-view state mapping function composed of a linear mapping layer, a non-linear activation layer, and a linear mapping layer. For the first The sensor type code corresponding to each target sensor For the first The target sensor is in The state representation at any given moment. For layer normalization function; Representing the status of each sensor By combining the data, a multi-sensor state representation can be obtained. : ; The operating condition coding module uses operating condition data that includes information on the operating conditions and cycle time of the construction machinery. As input, the data first undergoes linear mapping, nonlinear activation, and normalization to obtain the conditional basic features. The specific steps are as follows: , In the formula, For the conditional mapping weight matrix, For bias parameters, The activation function for the Gaussian error linear unit; Extracting conditional basic features using temporal convolution The dynamic characteristics are obtained by introducing residual fusion to obtain the operating condition characteristics. : , In the formula, This is the temporal convolution mapping function; Multi-sensor state representation and operating condition characteristics Common input condition constraint learning module; The conditional constraint learning module adopts a target sensor independence relationship construction method in the construction of the first... When dealing with the relational context corresponding to a target sensor, the target sensor's own state information is removed. Based on the state of non-target sensors, current operating conditions, and the target sensor's identity information, the association relationship between the target sensor and other non-target sensors is determined. The specific operation is as follows: For the A non-target sensor, its state is represented. Characteristics of current operating conditions Perform concatenation and obtain the first [unclear] through relation key mapping. Non-target sensor relationship key : , In the formula, For the first A non-target sensor in The key to time relationships For relation key mapping parameters; For the Each target sensor is identified by encoding its identity. Characteristics of current operating conditions The data is then concatenated, and the target sensor relationship query is obtained through a relationship query mapping. : , In the formula, For the first The target sensor is in Time-based relationship lookup For relational query mapping parameters, Identify the target sensor; Query based on target sensor relationship Relationship with each non-target sensor The degree of correlation between them, calculate the first The non-target sensor for the first Relationship weights of target sensors : , In the formula, For the first The non-target sensor and the first The relationship weights between individual target sensors In the process of summing, the first A relational key vector for a non-target sensor. It is the transpose symbol. For relational feature dimensions, It is an exponential function; by letting , making the first The state of each target sensor itself does not participate in the construction of its relational context; After mapping the state representations of each non-target sensor through relational values, weighted fusion is performed according to the corresponding relational weights to obtain the first... The relational context of the target sensors : , In the formula, For the first The target sensor is in The context of time, For mapping parameters of relational values; The virtual state generation module will... The relational context of the target sensors Current operating conditions and characteristics and target sensor identification code As input, we get the first The target sensor is in Virtual health status at any given time The specific steps are as follows: , In the formula, Generate a mapper for the virtual state shared by all target sensors; To ensure that the virtual health status has a consistent multi-view representation with the actual sensor status, the first... Virtual health status of individual target sensors Following the same state view construction method as the actual sensor state, virtual basic state view, virtual differential state view, virtual rolling fluctuation state view, and virtual operating condition robust standard score state view are constructed respectively, as follows: , , , , In the formula, , , and The first The virtual health status of each target sensor includes a basic state view, a differential state view, a rolling fluctuation state view, and a robust standard state view for operating conditions. The length of the scroll window. and Information on operating conditions of construction machinery Next The mean and standard deviation of normal state data from each target sensor; The first The four types of state views corresponding to the virtual health status of each target sensor are combined to obtain a multi-view representation of the virtual health status: 。 5. The method for detecting anomalies in engineering machinery based on conditional constraint virtual state repair according to claim 4, characterized in that: In step 4, the multi-sensor relationship learning model is trained using the training set and validation set to obtain the trained multi-sensor relationship learning model, as detailed below: In S4-1, the multi-sensor relationship learning model is trained in the first stage using normal samples from the training set. The training loss includes virtual health state generation loss, relationship consistency loss, and virtual state relationship alignment loss, specifically expressed as follows: , In the formula, For the training losses in the first phase, Generate loss for virtual health status. For relationship consistency loss, For virtual state relation alignment loss, and These are the weight parameters corresponding to relation consistency loss and virtual state relation alignment loss, respectively; The virtual health state generation loss is used to constrain the difference between the virtual health state generated under normal operating conditions and the corresponding actual sensor state, and is expressed as: , In the formula, For the first Virtual health status of each target sensor. For the first The actual state sequence of each sensor For smoothing L1 loss function; The length of the scroll window; The first The state representation of each sensor is obtained by mapping the actual state relationship. : , The relationship consistency loss is calculated based on the difference between the actual state relationship representation and the relationship context formed by the non-target sensor states and operating conditions. : , In the formula, For the first The actual state relationship of each sensor. For the first Target sensor relationship context, It is the vector norm 2; The first Multi-view representation of the virtual health status of individual target sensors Input the sensor status encoding module to obtain the corresponding virtual health status representation. Virtual state relation alignment loss To ensure that the virtual health state multi-view representation obtained by the sensor state encoding module remains consistent with the corresponding relational context: , Finally, the parameters of the sensor state encoding module, the running condition encoding module, the conditional constraint learning module, and the virtual state generation module are updated by minimizing the training loss of the first stage, thus completing the first stage of training.
6. The method for detecting anomalies in engineering machinery based on conditional constraint virtual state repair according to claim 5, characterized in that: In S4-2, the parameters of the sensor state encoding module, operating condition encoding module, condition constraint learning module, and virtual state generation module are frozen. A second-stage training is performed using all samples in the training set to fuse the parameters of the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation. An anomaly detection threshold is determined based on the validation set, resulting in the trained multi-sensor relationship learning model, as detailed below: The parameters of the sensor state encoding module, operating condition encoding module, condition constraint learning module, and virtual state generation module, which were completed in the first phase of training, are frozen. Using normal and abnormal samples in the training set, the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation are calculated respectively. The three types of representations are then fused, and the output is denoted as the virtual state repair consistency evaluation quantity. ; The state deviation representation quantities are as follows: For the A target sensor, based on its position state of time With Virtual health status at any given time The deviation between them is used to calculate the state deviation: , In the formula, For the first The state deviation of each target sensor This function represents the time aggregation of time series within a scrolling window; The maximum value among the deviations of the states of each target sensor is taken as the state deviation characterization quantity. : , The sensor relationship deviates from the representation quantity as follows: According to the The actual state relationship of each sensor is represented Relationship context formed by non-target sensor states and operating conditions The difference between them, calculate the first The relationship violation quantity of the individual sensors: , In the formula, For the first One sensor in The relationship between time and quantity contradicts the relationship between time and quantity. The degree of deviation in the relationship between each sensor is aggregated over time and averaged to obtain the sensor relationship deviation characterization quantity. : , In the formula, Represents the time series Perform aggregation; The consistency representation of virtual state repair is as follows: Regarding the first Each target sensor, representing its multi-view state. Replace with the corresponding virtual health status multi-view representation Constructing a multi-sensor state representation after virtual state restoration : , and in accordance with The sensor relationship obtained in the same way deviates from the characterization quantity According to the deviation of the sensor relationship before and after repair from the characterization quantity Calculate the first Contribution to relation recovery for each target sensor: , In the formula, For the first The contribution of each target sensor to the relationship recovery after completing virtual state repair; The virtual state repair consistency representation is obtained by recovering the contribution of the relationships corresponding to all target sensors. : , In the formula, To restore the consistency representation of virtual states; The training loss in the second stage uses binary cross-entropy loss with class weights: , In the formula, Losses due to the second phase of training The health status labels for the training samples, with the normal state corresponding to... Abnormal state corresponding , The category weights are the corresponding to the anomaly categories. For the Sigmoid function, To restore consistency evaluation quantity for virtual state; After the second phase of training is completed, the anomaly discrimination threshold is determined based on the distribution of the virtual state repair consistency evaluation quantity corresponding to the normal samples in the validation set. This yields a well-trained multi-sensor relationship learning model.
7. The method for detecting anomalies in engineering machinery based on conditional constraint virtual state repair according to claim 6, characterized in that: In step 5, the test set is input into the trained multi-sensor relationship learning model to obtain the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation. These three representations are then weighted and fused to obtain the virtual state repair consistency evaluation value. This value is then compared with an anomaly detection threshold to determine whether the construction machinery is in an abnormal state. The details are as follows: Deviate from the representation quantity Sensor relationship deviation from the characterization quantity and the consistency representation of virtual state repair The three types of representations are weighted and fused to obtain the consistency evaluation quantity for virtual state repair. : , In the formula, , and These are the fusion weights corresponding to the state deviation representation, sensor relationship deviation representation, and virtual state repair consistency representation obtained in the second stage of training, respectively. For fusion bias parameters; Virtual state repair consistency evaluation quantity The anomaly detection threshold determined by the validation set When comparing, If the condition is abnormal, the construction machinery is determined to be in an abnormal state; otherwise, the construction machinery is determined to be in a normal state.
8. The method for detecting anomalies in engineering machinery based on conditional constraint virtual state repair according to claim 7, characterized in that: In step 6, when the construction machinery is determined to be in an abnormal state, the local state deviation contribution corresponding to each target sensor is calculated. And the contribution to relationship restoration after virtual state repair And based on the two, the abnormal factors were identified as follows: For the The contribution of anomalous factors to a target sensor is expressed as follows: , In the formula, For the first The contribution of anomalous factors to each target sensor. For the first The contribution of local state deviation to each target sensor. To make the first The relation recovery contribution obtained after replacing the multi-view state representation of each target sensor with the corresponding virtual health state multi-view representation; Next, the contribution of abnormal factors to each target sensor is calculated: The abnormal factors were sorted from largest to smallest according to their contribution, and the sensor with the largest contribution was identified as the main abnormal factor causing the abnormality of the engineering machinery.
