A data storage method, comprising: sending (S 100), by a first blockchain node associated with a blockchain, data to an encryption device to cause the encryption device to encrypt the data and return the encrypted data to the blockchain node; receiving, by the first blockchain node, the encrypted data returned by the encryption device; sending, by the first blockchain node, the encrypted data to other blockchain nodes associated with the blockchain to cause each of the other blockchain nodes to store the encrypted data in the blockchain after performing consensus verification on the encrypted data with success; determining, by a second blockchain node associated with the blockchain, data to be queried in the encrypted data stored in the blockchain; determining, through a smart contract, whether the second blockchain node has a permission to decrypt the data to be queried; if the second blockchain node has the permission, sending, by the second blockchain node, the data to be queried to an encryption device through the smart contract to cause the encryption device to decrypt the data to be queried and return data obtained from the decryption to the second blockchain node, and if the second blockchain node does not have the permission, refusing to send the data to be queried to the encryption device; sending, by the second blockchain node, a refill request to a refill device to cause the refill device to determine a refill certificate according to the refill request and return the refill certificate to the second blockchain node; the refill certificate comprising a first value being used to represent a value added into an account of the second blockchain node; and sending the second blockchain node's node identifier and the refill certificate to other blockchain nodes associated with the blockchain to cause each of the other blockchain nodes to store the node identifier and the first value in the blockchain after performing consensus verification on the node identifier and the refill certificate with success. sending (S 100), by a first blockchain node associated with a blockchain, data to an encryption device to cause the encryption device to encrypt the data and return the encrypted data to the blockchain node; receiving, by the first blockchain node, the encrypted data returned by the encryption device; sending, by the first blockchain node, the encrypted data to other blockchain nodes associated with the blockchain to cause each of the other blockchain nodes to store the encrypted data in the blockchain after performing consensus verification on the encrypted data with success; determining, by a second blockchain node associated with the blockchain, data to be queried in the encrypted data stored in the blockchain; determining, through a smart contract, whether the second blockchain node has a permission to decrypt the data to be queried; if the second blockchain node has the permission, sending, by the second blockchain node, the data to be queried to an encryption device through the smart contract to cause the encryption device to decrypt the data to be queried and return data obtained from the decryption to the second blockchain node, and if the second blockchain node does not have the permission, refusing to send the data to be queried to the encryption device; sending, by the second blockchain node, a refill request to a refill device to cause the refill device to determine a refill certificate according to the refill request and return the refill certificate to the second blockchain node; the refill certificate comprising a first value being used to represent a value added into an account of the second blockchain node; and sending the second blockchain node's node identifier and the refill certificate to other blockchain nodes associated with the blockchain to cause each of the other blockchain nodes to store the node identifier and the first value in the blockchain after performing consensus verification on the node identifier and the refill certificate with success.