Provided are an optimized Der f2 gene, a recombinant Der f2 protein encoded thereby, a vector comprising said gene, and a Pichia pastoris strain. Also provided are an expression method, a purification method, and an application of the recombinant Der f2 protein.