Data security is very important for the whole electric energy measurement system. On the basis of the current distributed measurement acquisition mode, this paper put forward a distributed collection mode of energy metering data based on blockchain technology and its security mechanism, which is distributed, tamper-proof and highly extensible. By stored the device information and the public key certificate in blockchain and data interaction between devices adopts signature verification mechanism, data security is guaranteed and equipment are protected from illegal attacks. The experimental analysis proves that this mechanism can be applied in the field of distributed power metering, which improves the security of metering equipment and data.