The invention discloses a
data processing method and a related device, and the method comprises the steps: firstly obtaining a target instruction of a
virtual machine, and enabling the target instruction to be used for controlling the
virtual machine; and then according to the target
virtual memory address corresponding to the target instruction, an
encryption key corresponding to the target instruction is determined, and different
virtual memory addresses correspond to different
encryption keys. And according to the
encryption key, performing instruction coding on the target instruction through a coding
algorithm to obtain a coding result, and storing the coding result as the target instruction in the target
virtual memory address. Finally, in the running process of the
virtual machine, when a calling request for the target instruction is obtained, the coding result is read from the target virtual
memory address, instruction decoding is conducted on the coding result through a decoding
algorithm corresponding to the coding
algorithm according to the encryption key, and the target instruction is obtained. The encryption key is generated based on the storage address of the instruction, and the encryption key is used for instruction coding to realize the specificity of a coding result, so that the security of the virtual
machine is improved.