Elevator risk early warning method based on time sequence attention and decomposition module
By introducing the timing attention and decomposition module in the elevator fault warning system, the problem of insufficient extraction capability of discrete data and long-time series feature in the prior art is solved, and more accurate elevator fault warning and trend prediction are achieved.
Patent Information
- Application Number
- CN202510388927.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing deep learning technologies cannot accurately capture and utilize discrete data in elevator fault warning, it is difficult to effectively extract features of long time series, and it is impossible to effectively utilize interactive information of dynamic and static characteristics.
The elevator risk warning method based on the timing attention and decomposition module is adopted, and the discrete data is converted into dense multivariable timing feature vectors through the feature embedding module. The timing decomposition module is used to decompose features into trend terms and non-trend terms, and the similarity of point-to-point features is calculated through the timing self-attention module, and finally the elevator fault type and fault probability are obtained through the prediction layer.
The accuracy of the model's elevator fault warning is improved, the overfitting problem is reduced, the ability to capture long-term time series and trend changes is improved, and the identification and utilization of the importance of different characteristics is enhanced.
Smart Images

Figure CN119917935A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of elevator fault warning, and in particular to an elevator risk warning method based on temporal attention and decomposition module. Background Art
[0002] With the rapid development of urbanization, the number of elevators is increasing, and elevator failures are becoming more frequent. The importance of maintaining elevator safety and warning of elevator failures is increasing. As a complex device that combines mechanical and electrical systems, the law of the change of the equipment failure rate over time conforms to the bathtub curve. At the same time, a large number of studies have shown that it is feasible to use historical data to predict elevator failures. Deep learning models can learn the intrinsic connections between data without clear mathematical modeling to complete multiple tasks such as classification and prediction. Therefore, studying and implementing an elevator failure warning system based on deep learning has important research significance and social value.
[0003] Current deep learning technology has the following limitations in the field of elevator fault warning: (1) It cannot accurately capture and effectively utilize discrete data such as elevator fault records and manufacturing units; (2) It has limited feature extraction capabilities for long time series; and (3) It cannot effectively utilize the interactive information of dynamic and static features. Summary of the invention
[0004] In order to overcome the deficiencies of the prior art, the present invention provides an elevator risk warning method based on temporal attention and decomposition module.
[0005] In order to achieve the above object, the present invention provides an elevator risk warning method based on temporal attention and decomposition module, and the specific steps include:
[0006] Get discrete data of IoT elevators;
[0007] The discrete data is input into the data encoding layer, and the feature embedding module is used to convert the discrete data into a dense multivariate time series feature vector; the multivariate time series feature vector is input into the feature extraction layer, and the time series decomposition module is used to decompose the multivariate time series features into trend items and non-trend items;
[0008] The decomposed multivariate temporal features are positionally encoded, and the temporal self-attention module is used to calculate the similarity of point-to-point features;
[0009] The prediction layer is used to predict the feature vector output by the temporal self-attention module to obtain the elevator fault type and fault probability, and corresponding alarm prompts are given based on the fault type and fault probability.
[0010] Preferably, when the feature embedding module converts discrete data, the discrete data is multiplied by the feature matrix to obtain the hidden layer features after the discrete data is mapped.
[0011] Preferably, the time series decomposition module decomposes the expression of multivariate time series features as follows:
[0012] ,
[0013] ,
[0014] Where X is the original time series, AvgPool(X) is the average pooling operation function, and X t is the trend term, X nt It is a non-trend item.
[0015] Preferably, after decomposing the multivariate time series features, sine functions and cosine functions with different frequencies are used to encode the positions, and the encoding formula is:
[0016] ,
[0017] ,
[0018] Among them, t is the time sequence number, d m is the feature dimension of the input feature, and i is the dimension number of the position encoding.
[0019] Preferably, when the temporal self-attention module calculates the similarity of point-to-point features, its calculation steps include: multi-head self-attention calculation, feature attention calculation and forward calculation;
[0020] The steps of multi-head self-attention calculation include:
[0021] Get the attention score: Map the input feature vector into a query vector, a key vector, and a value vector through the linear transformation weight matrix corresponding to each self-attention head, and calculate the similarity between the query vector and the key vector. The calculation formula is:
[0022] ;
[0023] Concatenate the output of the linear transformation weight matrix corresponding to each self-attention head, and the formula is:
[0024] ,
[0025] Among them, SelfAttention() is the self-attention function, is the output of the i-th attention head; MultiHead() is the multi-head attention function; concat() is the concatenation function; , , are the linear transformation weight matrices of the query vector Q, key vector K and value vector V, respectively. It is the linear transformation weight matrix after concatenating the multi-head attention matrix.
[0026] Preferably, the step of feature attention calculation includes:
[0027] Calculate the weights between different features, the calculation formula is:
[0028] ,
[0029] Among them, L is the time series length, x i,j is the jth feature at position i in the time series, z j is the global aggregation information of the jth feature;
[0030] A two-layer MLP hidden unit is used to learn the weights of each feature, and the calculation formula is as follows:
[0031] ,
[0032] ,
[0033] Among them, W s1 and W s2 is the weight matrix for feature attention calculation, bs1 and bs2 are the weight matrix and bias vector for feature attention calculation, z is the global aggregation feature, and ReLu is the weight matrix W s1 The activation function; ω is the weight vector of the feature, and the softmax function is the weight matrix W s2 The activation function, z' is the feature vector after activation;
[0034] Multiply the weights of different features with the input time series Tin to obtain the weighted time series Tout.
[0035] Preferably, during forward calculation, a multilayer perceptron is used to extract high-level features of the input features, and the formula is:
[0036] MLP(x)=W2·Activation(W1·x+b1)+b2,
[0037] Among them, x represents the input vector, W1 is the weight matrix from the input layer to the hidden layer, W2 is the weight matrix from the hidden layer to the output layer; b1 is the bias vector of the weight matrix W1, b2 is the bias vector of the weight matrix W2, and the Activation activation function is a nonlinear function. The calculation formula of the activation function Relu() used is:
[0038] Relu(z) = max(0,z),
[0039] Among them, z is the global aggregation feature;
[0040] Based on the extracted high-level features, layer normalization and dimensionality reduction processing is performed, and the calculation formula is:
[0041] ,
[0042] Among them, for the l-th layer feature, x (l) is the input feature, y (l) is the output feature, µ (l) and σ (l) are the mean and standard deviation of the current layer of input features, γ (l) and β (l) are the scaling parameter and the translation parameter respectively, and ϵ is a very small quantity.
[0043] Preferably, the dimension of the MLP hidden layer unit in the multi-layer perceptron is half the dimension of the input feature.
[0044] Preferably, based on the feature vector output by the temporal self-attention module, the prediction layer converts the output feature vector into the probability of elevator failure;
[0045] When the prediction layer is converted, the MLP hidden layer unit is used for nonlinear fitting transformation. The MLP hidden layer unit has two fully connected layers, and the formula for nonlinear fitting transformation is:
[0046] ,
[0047] ,
[0048] Among them, T e is the temporal hidden layer feature, T1 is the intermediate hidden layer feature, W1 and W2 are the weight matrices of the two fully connected layers, b1 and b2 are the bias matrices of the two fully connected layers, and α is the prediction score.
[0049] Preferably, the step of performing feature conversion at the prediction layer further includes: using a softmax function to predict the failure probability, and the prediction formula is:
[0050] ,
[0051] Among them, Pi is the predicted probability of the i-th category; α i is the score of the i-th category, and N is the number of categories; is the sum of the index scores of all categories, Pi∈[0,1] and .
[0052] The elevator risk warning method based on temporal attention and decomposition module provided by the present invention is beneficial in that:
[0053] 1. In traditional models, discrete data is usually converted into sparse vectors through One-Hot encoding, which will cause the feature space to be very large, easily lead to overfitting, and it is difficult to capture the relationship between features. Based on this, the present invention introduces a feature embedding layer. By mapping discrete data (such as fault records, alarm records, maintenance records, etc.) to a dense embedding space, sparsity can be reduced and the model can better understand the relationship between different categories. Through the embedding layer, discrete data can be input into the model in a more efficient way, improving the learning ability of the model and alleviating the overfitting problem.
[0054] 2. When processing long time series, the traditional LSTM model may encounter the problem of gradient vanishing or gradient exploding, which makes it difficult for the model to capture long-term dependencies and affects the accuracy of the prediction of the remaining life of the elevator. Based on this, the present invention adopts a time series self-attention module to capture the correlation of long time series. The self-attention mechanism can calculate the correlation between two time points of any distance, and compared with the LSTM model, it performs better in capturing long-term dependencies. In this way, the model can better extract features in long time series and improve the prediction ability of the remaining life of the elevator.
[0055] 3. When processing time series data, the traditional self-attention mechanism usually focuses on the point-to-point feature similarity. Therefore, the prediction ability of long-term trends in the data (such as the gradual aging of elevators) is weak. Based on this, the present invention introduces a time series decomposition module to decompose the time series data into trend items and non-trend items. In this way, the model can process long-term trends and short-term fluctuations separately, reducing the burden of the self-attention calculation module, enabling the model to more accurately capture the changes in trend items and improve the prediction ability of trends.
[0056] 4. The feature attention module is introduced. Through feature self-attention calculation, the importance of each feature in the prediction task can be learned. Through this module, the model can automatically adjust the weight of each feature according to the importance of the feature, thereby optimizing the performance of the model. In this way, the model can pay more attention to the features that have a greater impact on life prediction, improve the prediction accuracy, and solve the problem that the traditional model does not distinguish the different effects of different features on elevator fault prediction, and therefore cannot effectively give important features a higher weight, which may lead to poor prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A flowchart of an elevator risk warning method based on temporal attention and decomposition module provided by the present invention.
[0058] Figure 2 A schematic diagram of a self-attention mechanism provided for an embodiment of the present invention.
[0059] Figure 3This is a structural diagram of the elevator risk warning big data model system provided in an embodiment of the present invention.
[0060] Figure 4 Schematic diagram of discrete data categories of an IoT elevator in an embodiment of the present invention.
[0061] Figure 5 The present invention is a flow chart of processing abnormal data in discrete data.
[0062] Figure 6 A sampling diagram of model fault error data provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0063] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0064] like Figure 1 As shown, the present invention provides an elevator risk warning method based on temporal attention and decomposition module, and its specific steps include:
[0065] Get discrete data of IoT elevators;
[0066] The discrete data is input into the data encoding layer, and the feature embedding module is used to convert the discrete data into a dense multivariate time series feature vector; the multivariate time series feature vector is input into the feature extraction layer, and the time series decomposition module is used to decompose the multivariate time series features into trend items and non-trend items;
[0067] The decomposed multivariate temporal features are positionally encoded, and the temporal self-attention module is used to calculate the similarity of point-to-point features;
[0068] The prediction layer is used to predict the feature vector output by the temporal self-attention module to obtain the elevator fault type and fault probability, and corresponding alarm prompts are given based on the fault type and fault probability.
[0069] Specifically, the present invention provides an elevator risk warning method based on a time series attention calculation module and a time series decomposition module, which is applied to the elevator risk warning big data model system. The present invention densely represents the discrete data of the IoT elevator through a feature embedding layer to generate a multivariate time series feature vector; the time series decomposition module is used to decompose the multivariate time series data into trend items and non-trend items, and the time series self-attention mechanism is combined to deeply mine the feature correlation of long time series; at the same time, a feature attention mechanism is introduced to perform weighted optimization on different features to improve the accuracy of the remaining life prediction of the elevator. Maintenance units can formulate more scientific maintenance plans based on this, improve the efficiency of elevator operation and maintenance, and reduce maintenance costs.
[0070] In this embodiment, the value of the discrete feature is a discrete value in a fixed interval. The size of the value does not represent the order relationship of the feature, but is only a mark of a specific value. In order to reduce the difficulty of model learning, the discrete feature needs to be mapped into a dense feature vector. In the current elevator fault prediction algorithm, discrete data is one-hot encoded when input into the model, that is, a set of vectors is used to represent an attribute. For each value of this attribute, there is a unique position corresponding to it. The one-hot encoding is in the form of [0,···, 0,1,0,···, 0]. The one-hot encoding of discrete data is directly input into the deep learning model, forming a huge and coefficient input vector, which increases the difficulty of model learning and reduces the generalization performance of the model.
[0071] Feature embedding is a technique that maps high-dimensional data to a low-dimensional space. It reduces the dimensionality of discrete data by representing each feature of the one-hot encoding as a dense vector, thereby better capturing the relationships and patterns between data. When converting the discrete data of the elevator, prepare a feature matrix to record the hidden features corresponding to each value in the attribute field. Multiplying the one-hot encoding of the discrete data with the feature matrix can obtain the hidden features corresponding to the discrete data. Let the hidden features after the discrete data is mapped be A, the value range of the discrete data is [1,m], the dimension of the mapped hidden features is n, and the dimension of the feature dictionary is m×n. Based on this, the expression for calculating the hidden features of discrete data is:
[0072] ,
[0073] To simplify calculations, feature embedding of discrete data can be simplified using embedding layers. First, sequential encoding is used for discrete data to generate a feature table. For each encoding of discrete data, its corresponding feature vector is recorded. During calculation, the corresponding feature vector can be directly taken from the feature table. The feature vector in the feature table can be optimized when the model is updated. Among them, multivariate time series features include: dynamic discrete features, dynamic continuous features, and static features.
[0074] Based on the dense multivariate time series feature vector, in the feature extraction layer, the time series decomposition module in the feature extraction layer decomposes it into trend items and non-trend items to reduce the fitting difficulty of the self-attention mechanism and help the model more effectively process and learn different types of time series features, thereby improving the model prediction performance.
[0075] Specifically: the trend term (X t ) is the trend item extracted by the average pooling operation, which represents the long-term change trend in the time series, such as the gradual aging of elevators and performance degradation. This part of the data is relatively stable, describing the overall development direction of the system, and can help the model capture long-term change patterns. Non-trend items (X nt ) is a non-trend term calculated by subtracting the trend term from the original time series, which usually contains short-term fluctuation components such as noise, seasonal fluctuations or cyclical changes in the time series data. The non-trend term can help the model focus on short-term, local changes, such as sudden failures, fluctuations in maintenance cycles, etc., which is very important for improving the model's sensitivity to abnormal changes and temporary fluctuations. Its decomposition steps include:
[0076] (a) The trend term is extracted from the original time series through the average pooling (AvgPool) operation, and its formula is:
[0077] ,
[0078] (b) The detrend term is calculated by subtracting the trend term from the original time series, i.e.:
[0079] ,
[0080] Where X is the original time series, AvgPool(X) is the average pooling operation function, and X t is the trend term, X nt The non-trend term is the term that is removed from the original time series. The remaining term is the non-trend term. The non-trend term usually contains data noise, seasonal fluctuations, or cyclical changes.
[0081] Based on the decomposed multivariate time series features, position encoding is performed on them. The time series self-attention module uses the self-attention mechanism to calculate the direct point-to-point correlation, but lacks the position information of the sequence. Therefore, before inputting the time series features into the self-attention module, position encoding needs to be added to the time series features.
[0082] Since the order relationship of the temporal hidden layer features in the current task is clear, that is, it has a clear time order, the position encoding used here is one-dimensional fixed position encoding. One-dimensional fixed position encoding uses sine and cosine functions with different frequencies to encode the position, and its encoding formula is:
[0083] ,
[0084] ,
[0085] Among them, t is the time sequence number, d m is the feature dimension of the input feature, i is the dimension number of the position encoding, and the dimension of the position encoding should be kept consistent with the dimension of the time series feature. Therefore, the value range of i is [0,d m / 2].
[0086] Among them, each dimension of the position encoding corresponds to a sine signal or a cosine signal. When i takes different values for position encoding within the specified range, the sin function and cos function in the above formula correspond to a set of odd and even feature number dimensions, respectively, and are processed by sin function and cos function respectively, thereby producing different periodic changes.
[0087] The advantage of using sin and cos functions for position encoding is that PEt+k at any position can be represented by a linear function of PEt, so that there is a certain position dependency between the two positions. Among them, in positional encoding (PE for short), PE is a feature vector used to represent the position of a certain time step. Assuming that PEt represents the position encoding of time step t, PEt+k represents the position encoding of time step t+k. The principle of position encoding is as follows:
[0088] .
[0089] By introducing position encoding, the position information is integrated into the features of each time series element, so that the self-attention mechanism can understand the relative position of each element in the sequence. This method enables the model to not only capture the inherent characteristics of each element, but also identify the positional dependencies between elements, helping the model to more accurately extract local patterns and long-term dependencies in the sequence. By using sine and cosine functions of different frequencies for position encoding, the model can ensure the linear relationship between position encodings, so that effective dependencies can be established at each position in the sequence. This process enables the self-attention mechanism to fully understand the relative positional relationship between each time point in addition to learning the feature information at each moment when processing time series data, further enhancing the model's ability to model time series, especially when capturing time dependencies and contextual relationships.
[0090] Based on the encoded features, the temporal self-attention module is used to calculate the similarity of point-to-point features. Among them, the temporal self-attention module can be divided into three parts: multi-head self-attention mechanism, feature attention module and forward calculation module, which implement three steps respectively, namely: multi-head self-attention calculation, feature attention calculation and forward calculation. The specific steps include:
[0091] (a) The steps of multi-head self-attention calculation include:
[0092] Get attention scores: Map the input feature vector into query vector, key vector and value vector through the linear transformation weight matrix corresponding to each self-attention head, and calculate the similarity between the query vector and the key vector.
[0093] Specifically, multiple attention heads are processed in parallel to help the model focus on information in different subspaces and integrate their outputs to enhance the model’s expressiveness. Figure 2 As shown. First, the input time series feature T1T_1T1 will pass through three different linear transformation matrices W Q , W K , W V Mapping is performed to obtain the query vector Q, key vector K and value vector V, namely:
[0094] ,
[0095] Next, the model calculates the similarity between the query vector and the key vector, obtains the attention score, and normalizes it through Softmax:
[0096] ,
[0097] Among them, d h is the feature dimension of each head, which is used to control the scale. Through the multi-head self-attention mechanism, the model calculates different attention outputs for each head. Finally, these outputs are concatenated and linearly transformed:
[0098] ,
[0099] Among them, head i is the output of the ith attention head, W O It is the linear transformation matrix output after splicing. Compared with the prior art, such as the combination of multiple single-head self-attention mechanisms, the present invention improves the working efficiency. The combination of multiple single-head self-attention mechanisms increases the implementation complexity and has low calculation efficiency.
[0100] (b) Feature attention calculation. When calculating feature attention, the weights of different features are learned to improve the expressiveness of the features, so as to further optimize the prediction performance of the model. Since the weights between different features cannot be obtained by calculating the similarity between the features, the SE attention mechanism (Squeeze and Excitation, SE) is used to calculate the weights of different features. The specific steps include:
[0101] In order to learn the weights of different features, global average pooling (GAP) is performed to aggregate the information of each feature at all time points to obtain the global feature, that is, to calculate the weights between different features. The calculation formula is:
[0102] ,
[0103] Among them, L is the time series length, x i,j is the jth feature at position i in the time series, z j is the global aggregation information of the jth feature.
[0104] A two-layer MLP hidden unit is used to learn the weight of each feature, that is, a two-layer MLP network is used to calculate the weight of each feature. After activation by the ReLU activation function, the final feature weight is output through the Sigmoid activation function, that is, its calculation formula is:
[0105] ,
[0106] ,
[0107] Among them, W s1 and W s2 is the weight matrix calculated for feature attention, b s1 and b s2 is the weight matrix and bias vector calculated for feature attention, z is the global aggregate feature, and ReLu is the weight matrix W s1 The activation function; ω is the weight vector of the feature, and the softmax function is the weight matrix W s2 The activation function is , and z' is the feature vector after activation.
[0108] After obtaining the weights of different features, multiply them with the input time series Tin to obtain the weighted time series Tout. The calculation process is as follows:
[0109] Tout = ω ·Tin.
[0110] (c) Forward calculation, through the multi-layer perceptron (MLP) and normalization operation, the features are further transformed to promote the model to learn more abstract representations, and finally the output features are obtained. The feature sequence after the forward calculation is ready to be used as the input or output of the next layer. The multi-layer perceptron is usually composed of several fully connected layers and nonlinear activation functions. Its function is to further nonlinearly transform the input features and extract higher-level features. Its calculation formula is:
[0111] MLP(x)=W2·Activation(W1·x+b1)+b2,
[0112] Among them, x represents the input vector, W1 is the first weight matrix, which is the weight matrix from the input layer to the hidden layer. W2 is the second weight matrix, which is the weight matrix from the hidden layer to the output layer. b1 is the bias vector of the weight matrix W1, and b2 is the bias vector of the weight matrix W2. The activation function is a nonlinear function used to introduce nonlinear capabilities so that the model can learn more complex features. The calculation formula of the activation function Relu() used is:
[0113] Relu(z) = max(0,z),
[0114] Among them, z is the global aggregation feature;
[0115] Layer normalization normalizes neurons by calculating the mean and variance of all neurons in a certain layer on the training sample, which can improve the generalization performance of the model and improve gradient propagation. The calculation formula is as follows:
[0116] ,
[0117] Among them, for the l-th layer feature, x (l) is the input feature, y (l) is the output feature, µ (l) and σ (l) are the mean and standard deviation of the current layer of input features, γ (l) and β (l) are respectively learnable scaling parameters and translation parameters, and ϵ is a very small quantity to avoid the denominator being 0. In this embodiment, high-level features refer to features obtained by performing nonlinear transformation and abstraction on the original input features through a multi-layer perceptron, which have the characteristics of abstractness, nonlinear relationship, information compression, and task relevance. In elevator risk warning, these features can better reflect the key modes and potential risks in elevator operation.
[0118] In this embodiment, the feature learning ability of the self-attention calculation module depends on a large parameter space and requires effective large data set support, but the effectiveness of discrete data is limited and easily leads to overfitting. In order to improve the generalization ability of the model, the MLP hidden layer unit in the forward calculation is set to half of the input feature dimension, and the generalization ability of higher-level abstract features is used to reduce the feature dimension, so as to encourage the model to learn more generalized features, thereby improving the generalization ability and speeding up the training speed.
[0119] Based on the feature similarity weights learned by the temporal self-attention module, the present invention predicts the failure probability of the IoT elevator through the prediction layer. The prediction layer performs dimensionality reduction through an MLP, outputs the corresponding fault type, and converts the elevator aggregation features into the elevator failure probability through the Sigmod function. The MLP used in the prediction layer consists of two layers of fully connected layers. Compared with a single-layer fully connected layer that can only fit linear transformations, two layers of fully connected layers can fit nonlinear transformations. The calculation process is as follows:
[0120] ,
[0121] ,
[0122] Among them, T e is the temporal hidden layer feature, T1 is the intermediate hidden layer feature, W1 and W2 are the weight matrices of the two fully connected layers, b1 and b2 are the bias matrices of the two fully connected layers, and α is the prediction score.
[0123] Then the prediction score α is processed by the softmax function to make the prediction result p∈[0,1]. The calculation formula of the softmax function is as follows:
[0124] ,
[0125] Among them, Pi is the predicted probability of the i-th category; α i is the score of the i-th category, and N is the number of categories; is the index score and of all categories, used for normalization, Pi∈[0,1] and .
[0126] Specifically, the output vector processed by the temporal self-attention module will be input into the fully connected layer for dimensionality reduction processing to map the high-dimensional temporal features to a lower-dimensional space and output the corresponding fault type. The fully connected layer learns the potential patterns in the data and reduces the feature dimensions by weighted summation and adding bias, thereby improving the computational efficiency and prediction accuracy of the model. Specifically, the feature vector extracted by the temporal self-attention module is passed to the fully connected layer, and after calculation by two layers of fully connected layers, an intermediate feature vector is output, which represents the current operating status of the elevator and its potential fault type. Then, these intermediate features are normalized by the Softmax function, which converts the model's prediction score into a probability distribution to obtain the predicted probability pi of each possible fault type. These probability values Pi represent the possibility of each fault type, and the sum of all probabilities is 1. The use of the Softmax function enables the model to provide a clear probability value for each elevator fault type, which is convenient for subsequent fault warning and decision-making. This process not only provides a clear probability distribution for the model's prediction results, but also enhances the interpretability of the model. In this way, the system can effectively classify the potential fault types of the elevator and provide maintenance personnel with data-driven, accurate fault warnings, thereby improving the efficiency of elevator maintenance and reducing the occurrence of sudden failures.
[0127] Based on the obtained IoT elevator fault types and fault probabilities, the deep learning model is trained and its performance is optimized by adjusting the model parameters, such as Figure 3 As shown. During the training process, the optimized parameters include hyperparameters and other parameters of the model itself. In order to improve the predictive ability of the model, a weighted cross entropy loss function is adopted, and the effect of the model is evaluated by a validation set. When faced with the problem of sample imbalance, the use of traditional cross entropy loss functions may cause the model to tend to predict categories with more samples, thereby affecting the accuracy and generalization ability of the model, especially for categories with fewer samples. The prediction effect of the model may be poor. Therefore, in order to solve this problem, the present invention adopts a weighted cross entropy loss function Loos to balance the influence of various categories during the training process. Its calculation formula is shown below:
[0128] ,
[0129] Among them, N is the total number of samples, M is the number of categories, and w c is the weight coefficient of the cth category, y ic is the true probability of the sample, p ic is the probability that the ith sample belongs to category c. The weight calculation formula for category c is as follows, where n c is the number of samples belonging to category c. Weight coefficient w cThe calculation formula is:
[0130] .
[0131] As shown in Tables 1-5, it is a schematic diagram of the prediction results of the system provided by the example of the present invention for different fault types. The actual measurement object is 8,000 elevators of KONE Elevator. The prediction is made for the four time periods of early March, late March, early April and late April in KONE data. The results are shown in the table: The model shows stability in terms of door opening and closing, and can achieve a hit rate of about 30%. It can also show a hit rate of about 20% in terms of other faults. This proves the effectiveness of the model. Moreover, even in the case of a small sample, it can predict faults such as trapped people, door opening operation and overspeeding.
[0132]
[0133] Table 1
[0134]
[0135] Table 2
[0136]
[0137] Table 3
[0138]
[0139] Table 4
[0140]
[0141] Table 5
[0142] like Figure 3 , 4 As shown in Table 6, the elevator risk warning big data model uses the Internet of Things technology to collect elevator operation data in real time as discrete data for risk warning and stores it in the database. These discrete data mainly include basic information of the elevator, fault records, weather temperature data, and maintenance records. The elevator basic data includes the core characteristics of the elevator, such as manufacturing date, model, installation location, etc., which provides key supporting data for evaluating the overall health status of the elevator. As shown in Table 6.
[0143]
[0144] Table 6
[0145] The fault record records in detail the equipment code, fault occurrence time, maintenance arrival time, repair time, fault type and other information of the elevator. These data can be used in the model to predict the fault type, analyze the time characteristics of the fault occurrence, fault statistics and maintenance effect evaluation, further improving the accuracy of the prediction and the effect of the maintenance decision. As shown in Table 7.
[0146]
[0147] Table 7
[0148] The fault types are divided into five categories, including: trapped people, door opening operation, door opening and closing, overspeed and others, as shown in Table 8.
[0149]
[0150] Table 8
[0151] The weather temperature data is shown in Table 9, which includes historical meteorological information related to the elevator location, such as temperature and weather conditions. These data are helpful for analyzing the potential impact of different weather conditions on elevator performance.
[0152]
[0153] Table 9
[0154] The maintenance information table is shown in Table 10, which records the maintenance details of the elevator, including registration code, maintenance time, maintenance unit, maintenance personnel, maintenance type, failed component code and upload time, etc. This information is crucial for managing the maintenance status of the elevator, identifying potential maintenance problems and tracking maintenance history, which helps to improve maintenance efficiency and quality.
[0155]
[0156] Table 10
[0157] After the discrete data of the IoT elevator is uploaded, the data preprocessing function is responsible for data cleaning of the discrete data in the database. In addition, the dynamic data will generate a time series sequence, which will be used as the input data of the elevator fault prediction model.
[0158] like Figure 5As shown, the present invention combines the advantages of internal data association and external data source in data processing, effectively solves the problems of integrity and accuracy of IoT elevator data, and provides reliable data support for elevator fault prediction. Data anomalies include data value anomalies, data confusion, data out of range, and inconsistent data standards. For data value anomalies and data out of range, the true value of the data cannot be restored based on the existing data. Therefore, it is necessary to contact the data provider to correct the data, or temporarily leave it blank; for data confusion, it is necessary to set rules to parse specific data, extract valid data and reassign it to the current field; for the problem of inconsistent data standards, it is necessary to study the mapping relationship between different coding rules and map the old code to the new code. Taking the cause of elevator failure as an example, due to the continuous standardization of elevator failure records, there are two sets of coding rules for the cause of elevator failure. The current coding rules are shown in Table 11. The system needs to convert the old code into the new code according to the mapping relationship.
[0159]
[0160] Table 11
[0161] Different completion measures are needed for different situations. Common data completion measures include taking adjacent values, taking empirical values, taking the mean of the same type and taking zero values. In this paper, for discrete data, the solution of taking zero values is adopted, and for continuous data, the solution of taking the mean of the same type is adopted.
[0162] Relevance verification is to ensure that the relevance between multiple data items meets the expected constraints or business rules during the data verification process. In this system, only the geographical location information of the IoT elevator is verified, and the districts, counties, and streets where the elevators are located can be verified with each other.
[0163] Data conversion is responsible for converting the original text type data into digital type data. There are a lot of text type data in discrete data. Since such data cannot be directly input into the elevator fault prediction model, it is necessary to convert the data type first. For all text type data, this embodiment adopts the method of recording all valid values and encoding them in sequence to convert the text type data into digital codes.
[0164] like Figure 6 As shown in the figure, in the process of processing discrete data, the elevator risk warning big data model system counts multiple alarms of the same fault type in one day as one alarm, and converts the number of alarms on that day into new features and inputs them into the model for training data samples. In this way, the input data of the model is optimized, and the accuracy and efficiency of fault prediction are improved.
[0165] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
Claims
1. An elevator risk warning method based on temporal attention and decomposition module, characterized in that: The specific steps include: obtaining discrete data of the IoT elevator; inputting the discrete data into the data encoding layer, and converting the discrete data into a dense multivariate time series feature vector through the feature embedding module; inputting the multivariate time series feature vector into the feature extraction layer, and decomposing the multivariate time series features into trend items and non-trend items through the time series decomposition module; position encoding the decomposed multivariate time series features, and using the time series self-attention module to calculate the similarity of point-to-point features; using the prediction layer to predict the feature vector output by the time series self-attention module, obtain the elevator fault type and fault probability, and issue corresponding alarm prompts based on the fault type and fault probability.
2. The elevator risk warning method based on temporal attention and decomposition module according to claim 1 is characterized in that: When the feature embedding module converts discrete data, the discrete data is multiplied by the feature matrix to obtain the hidden layer features after the discrete data is mapped.
3. The elevator risk warning method based on temporal attention and decomposition module according to claim 1 is characterized in that: The expression for decomposing multivariate time series features by the time series decomposition module is: , , where X is the original time series, AvgPool(X) is the average pooling operation function, and X t is the trend term, X nt It is a non-trend item.
4. The elevator risk warning method based on temporal attention and decomposition module according to claim 3 is characterized in that: After the multivariate time series feature is decomposed, the position is encoded using sine functions and cosine functions with different frequencies, and the encoding formula is: , , where t is the time sequence number, d m is the feature dimension of the input feature, and i is the dimension number of the position encoding.
5. The elevator risk warning method based on temporal attention and decomposition module according to claim 1 is characterized in that: When the temporal self-attention module calculates the similarity of point-to-point features, its calculation steps include: multi-head self-attention calculation, feature attention calculation and forward calculation; the multi-head self-attention calculation step includes: obtaining attention score: mapping the input feature vector into a query vector, a key vector and a value vector through the linear transformation weight matrix corresponding to each self-attention head, calculating the similarity between the query vector and the key vector, and the calculation formula is: ; Concatenate the output of the linear transformation weight matrix corresponding to each self-attention head, the formula is: , where SelfAttention() is the self-attention function, is the output of the i-th attention head; MultiHead() is the multi-head attention function; concat() is the concatenation function; , , are the linear transformation weight matrices of the query vector Q, key vector K and value vector V, respectively. It is the linear transformation weight matrix after concatenating the multi-head attention matrix.
6. The elevator risk warning method based on temporal attention and decomposition module according to claim 5 is characterized in that: The steps of feature attention calculation include: calculating the weights between different features, and the calculation formula is: , where L is the time series length, x i,j is the jth feature at position i in the time series, z j is the global aggregation information of the jth feature; two layers of MLP hidden units are used to learn the weights of each feature, and the calculation formula is as follows: , , where W s1 and W s2 is the weight matrix calculated for feature attention, b s1 and b s2 is the weight matrix and bias vector calculated for feature attention, z is the global aggregate feature, and ReLu is the weight matrix W s1 The activation function; ω is the weight vector of the feature, and the softmax function is the weight matrix W s2 The activation function is , z' is the activated feature vector; the weights of different features are multiplied by the input time series Tin to obtain the weighted time series Tout.
7. The elevator risk warning method based on temporal attention and decomposition module according to claim 5 is characterized in that: In the forward calculation, a multi-layer perceptron is used to extract high-level features of the input features. The formula is: MLP(x)=W2·Activation(W1·x+b1)+b2, where x represents the input vector, W1 is the weight matrix from the input layer to the hidden layer, and W2 is the weight matrix from the hidden layer to the output layer; b1 is the bias vector of the weight matrix W1, and b2 is the bias vector of the weight matrix W2. The Activation activation function is a nonlinear function. The calculation formula of the activation function Relu() used is: Relu(z) = max(0, z), where z is the global aggregation feature; based on the extracted high-level features, layer normalization and dimensionality reduction are performed, and the calculation formula is: , where for the l-th layer feature, x (l) is the input feature, y (l) is the output feature, µ (l) and σ (l) are the mean and standard deviation of the current layer of input features, γ (l) and β (l) are the scaling parameter and the translation parameter respectively, and ϵ is a very small quantity.
8. The elevator risk warning method based on temporal attention and decomposition module according to claim 7 is characterized in that: The dimension of the MLP hidden layer unit in the multi-layer perceptron is half of the input feature dimension.
9. The elevator risk warning method based on temporal attention and decomposition module according to claim 1 is characterized in that: Based on the feature vector output by the temporal self-attention module, the prediction layer converts its output feature vector into the probability of elevator failure. When the prediction layer performs the conversion, the MLP hidden layer unit is used for nonlinear fitting transformation. The MLP hidden layer unit has two fully connected layers, and the formula for nonlinear fitting transformation is: , , where T e is the temporal hidden layer feature, T1 is the intermediate hidden layer feature, W1 and W2 are the weight matrices of the two fully connected layers, b1 and b2 are the bias matrices of the two fully connected layers, and α is the prediction score.
10. The elevator risk warning method based on temporal attention and decomposition module according to claim 9 is characterized in that: The step of performing feature conversion in the prediction layer also includes: using a softmax function to predict the probability of failure, and the prediction formula is: , where Pi is the predicted probability of the i-th category; α i is the score of the i-th category, and N is the number of categories; is the sum of the index scores of all categories, Pi∈[0,1] and .
Citation Information
Cited By
Elevator early warning method and system based on semantic injection and cross-channel fusion large model
CN122186849A
Elevator early warning method and system based on semantic injection and cross-channel fusion large model
CN122186849B
Elevator risk early warning method and system based on time sequence partitioning and dynamic and static fusion
CN122221036A
An elevator risk early warning method and system based on time sequence blocking and dynamic-static fusion
CN122221036B