Privacy data query method for smart contracts