Distributed energy trading is a kind of power bilateral transaction which is directly involved by power producers, operators, e-sellers and large users. Blockchain is a multi-center, distributed storage technology essentially, which has natural adaptability in distributed energy trading. Applying blockchain to distributed energy trading needs to solve the problem of data desensitization first. Aiming at the data characteristics in energy trading, this paper proposes an energy blockchain data desensitization algorithm based on differential privacy, which realizes the randomization of query results by adding noise data of different distribution. Experiments show that the algorithm can better combine distributed energy service, which is beneficial to speed up the upload-chain speed of data and improve the data storage efficiency of the system.