This paper offers an improved effective message encoding technique,which can be used to encode message that has different length or composed of various message elements dynamically.This technique shows its superiority and well satisfies the simulation demand.