This study focuses on the security challenges of big data in online education platforms and proposes an AI-based data encryption algorithm. This algorithm integrates the four-dimensional features of big data with advanced encryption techniques, aiming to enhance the confidentiality and integrity of educational data. The article begins by analyzing the technical principles of big data encryption, including modern cryptography, biotechnology, attribute-based encryption, and parallel computing, and constructs an algorithm model that adapts to the characteristics of online education. Furthermore, it delves into key processes such as data preprocessing, encryption, and decryption, and applies the encryption algorithm in online education systems to achieve the goal of data protection. Through experimental verification, this system not only effectively enhances data security and user privacy protection but also maintains reasonable encryption and decryption efficiency. The research findings are of great significance in guiding the formulation and implementation of data security strategies for online education platforms.