The invention discloses a method for achieving data security communication by applying a blockchain encryption technology, and relates to the technical field of data encryption. According to the invention, a secure communication system comprising a data layer, a data encryption layer, a data network layer, a data transmission layer and a data application layer is constructed; a block chain technology is integrated into data communication, safe transmission of data is realized, the transmitted data can be shared and cannot be tampered, the encryption performance of the data is improved, remote,online and real-time acquisition and application of the data can be achieved through systematic construction, and a user can achieve application, management and monitoring of database data without going to the site personally. According to the invention, the ant colony algorithm is adopted; according to the characteristics of data communication and the requirements of interaction equipment, the optimization search of the encryption algorithm is carried out among the plurality of encryption units, so that a user can quickly find out the optimal value of the target data suitable for applicationfrom the plurality of encryption algorithms, and the efficiency and the data management capability of the encryption unit application algorithm are greatly improved.