Caenorhabditis elegans is a model organism with a simple and well-connected nervous system. Phenotype is the manifestation of nematodes in various environments, and the accurate extraction of phenotypes is of great significance for the study of locomotion behavior, physiological changes and life expectancy of C. elegans. Here, we propose an efficient, low-cost and automated nematode phenotypic feature extraction method based on shape mathematical representation and image processing technology, and combine with nematode movement models to analyze the movement differences of different strains. We also proposed a posture prediction model based on the mathematical representation of nematode shape and deep learning method (Time2vec-LSTM-Attention). Through the results of experiment, it can be seen that our method can achieve good performance.