Provided are a secure two-party data comparison method and apparatus based on
scale transformation. The method includes: transmitting, by a computation requesting party, a two-party data comparison request to two participant nodes; performing, by each participant node,
scale transformation and linear scaling on private data locally after receiving the two-party data comparison request, to obtain an encrypted vector; determining, by each participant node, a real number locally using a secure two-party dot product protocol based on the local encrypted vector, and sharing the real number with the other participant node; determining, by each participant node, a comparison sign based on the obtained real number and transmitting the comparison sign to the computation requesting party; and determining, by the computation requesting party, a comparison result of the private data of the two participant nodes based on the comparison signs transmitted by the two participant nodes.