Internet of vehicles (IoV) system is mixed-criticality, and different functions have different requirements for information security and real-time performance. Thesis aims to design a comprehensive dynamic encryption algorithm to ensure the function of the IoV system while taking into account the security level required by different critical functions. The algorithm can flexibly coordinate the security requirements between different functions, improve the efficiency and reliability of the system to the greatest extent, and ensure information security. In order to verify the performance of the algorithm, thesis uses Pycharm platform to carry out simulation experiments through python programming and verifies the feasibility of the algorithm.