With the rapid development of Internet finance, P2P online lending platform (LP) has also been growing rapidly. However, due to its own many risks, China's P2P online loan industry is facing huge challenges. Therefore, this paper intends to use machine learning related algorithms to predict and prevent the risk of the LP. This paper takes P2P network LP as the research object, and uses data analysis, case comparison and summary methods to sort out and discuss the current situation of the industry. This paper mainly uses the survey method and the analytic hierarchy process to study the suggestions of both lenders and borrowers and the norms of the platform. The experimental results show that about 24% of borrowers and lenders believe that integrity is the basis for maintaining interests. In order to reduce the risk of the LP, it is necessary to rely on the cooperation between the borrower and the borrower and the national regulation. Therefore, the risk warning of the LP is also an important part.