Aiming at the low accuracy of posture recognition and power supply of wearable devices, a human posture recognition algorithm based on time series shapelets and long short-term memory network (LSTM) ???? proposed. In this algorithm, triboelectric nanogenerator (TENG) is used as a self-driven sensor to collect data of human knees and feet, and shapelets time series feature extraction based on dynamic time warping (DTW) distance is used, and the feature value is used as the input information of bi-directional long short-term memory network. Finally, the data processed by bidirectional network is classified by soft-max function to obtain the recognition of human daily actions. Feature extraction based on shapelets time series has good performance. At the same time, LSTM is skilled at dealing with time series problems, so both are integrated. Experimental results show that, compared with other gesture recognition algorithms, the recognition accuracy of this algorithm is as high as 97.3%, and it can more effectively recognize everyday human activities.