Smart medical care will realize the self-management, selection, and optimization of related things with more thorough induction, more comprehensive interconnection, and more intelligent insight, so that people can get an increasingly personalized medical and health service experience. 5G-enabled Internet of Things and AI (artificial intelligence) will continue to drive innovative applications in the medical industry. Access control and sharing of medical data is of great significance to the development of smart medical care, but the security problems in medical data sharing cannot be ignored. In this paper, a privacy protection scheme of medical service data based on blockchain and AI is proposed. The user chain is constructed as a public chain. In the user chain, the data privacy of users is protected, and users can safely transmit data to doctors and realize the management of session keys. CNN (convolutional neural network) privacy protection protocol based on homomorphic encryption can protect users’ privacy input, server model parameters, and calculated intermediate values. Experimental analysis and comparison with other schemes show that the scheme in this model is safer and more practical.