For traditional Factorization Machines (FM) algorithms and various deep learning-based FM algorithms, although they perform well in tasks such as feature learning and recommender systems, they are often single-computer operations that require powerful computational and storage resources, and they have problems such as excessive irrelevant feature redundancy, slow convergence and low efficiency of parallelized training when running on large-scale datasets training efficiency, a Spark-based parallelized FM (SFM) algorithm is proposed. With the efficient distributed processing platform provided by Spark, the parallel computing of RDD datasets on multiple machines in the HDFS cluster can accelerate the processing speed, and at the same time ensure the scalability and fault tolerance when processing large-scale data. Part of the publicly available advertisement dataset is used for the experimental data. The experimental results show that the parallelized FM algorithm has better performance in recommendation accuracy, recall, F1 value, and scalability, and at the same time, it can significantly improve the operation efficiency in the case of large-scale data through multi-node parallelism.