Cloud computing will be the next major storage centre of the future for medical data. There are many powerful data centres that are usually heterogeneous and geographically distributed. Providing access to cloud computing data, however, is a big challenge. This article proposes a new method for securely storing and converting medical data into the cloud computing platform. Medical data are classified as sensitive or insensitive data by machine learning techniques and encrypted by encrypting security encryption method (IBE) for secure data access. Because the cloud's medical data is shared by multiple users, data protection is very important. In this way, the proposed system use of protection filtering mechanism user verification. Finally, compare the proposed method with other cloud-based data encryption methods with simulation and comprehensive analysis. The experimental results show that the solution proposed for cloud-based data transfer is very safe and feasible.