Secure comparison protocol is an important branch of secure multi-party computation(SMPC), which compares the size of input data without disclosing any information between participants. The development of cloud computing provides an application platform for SMPC, but it also brings new challenges. In cloud computing with SMPC, clients need to process their own data and submit the processed data to a cloud server, which then performs the computation. In this process, not only the clients need to maintain an honest state at all times, but sensitive data on the cloud server side may also be exposed. In this paper, zero-knowledge proof and homomorphic encryption techniques are used to improve Damgård-Geisler-KrØigaard(DGK) comparison protocol. The improved secure comparison protocol can not only safely calculate private data, but also be applicable to malicious participant model. Finally, the security analysis shows that the proposed scheme not only ensures the privacy security of participants, but also ensures the data fairness of comparison protocols.