The mixing process of battery production contains a variety of monitoring sensors. These sensors generate a large number of multivariate time series during production, which reflect the potential operating conditions of the production equipment. By accurately detecting anomalies in the equipment, battery quality can be improved. However, due to the diverse types of anomalies in the mixing process and the large number of subtle anomalies, it is challenging to construct a robust and accurate anomaly detection model. In this article, we propose TPAD, a multivariate time series anomaly detection model based on temporal pattern, which learns serial temporal-pattern-based on attention mechanism and detects anomalies by temporal pattern discrepancy, making the model adaptive to detect multiple types of anomalies. Moreover, the model improves the accuracy of detecting subtle anomalies through an adversarial training reconstruction method. Finally, we conducted experiments on two public datasets and a battery mixing process dataset from a battery factory, and the experimental results outperformed the baseline methods, with an average F1 score of over 92% on the three datasets.