The invention provides an
elevator risk early warning method based on local patch and enhanced position coding, which comprises the following steps of: firstly, collecting
original data of an
elevator of
the internet of things, and converting the
original data into multivariable
time sequence characteristics after cleaning the
original data; secondly, performing patch operation on the multivariate
time sequence, namely, firstly dividing each input univariate
time sequence into patches to serve as input tokens of
Transformer, so that local
semantic information is reserved, and a longer review window can be obtained under the condition that the number of the input tokens is the same; after relative position coding is carried out on the token, the token is input into a Transform model, and in the model, a self-attention mechanism and a
convolution pooling layer are adopted to carry out extraction and intersection on patches, so that the feature relation between the patches is concerned, and meanwhile, the time feature relation in the patches is concerned; performing fusion operation on the
global time sequence characteristics and the in-patch time sequence characteristics, and then handing over to a full connection layer for prediction to output a prediction result; during model training, the model is adjusted through an optimization
algorithm to improve the performance.