Let [Formula: see text] be the ring of Laurent polynomials in commuting variables. As a generalization of the toroidal Lie algebra, the gradation shifting toroidal Lie algebra [Formula: see text] is isomorphic to the corresponding (centerless) toroidal Lie algebra so(n, ℂ) ⨂ A of type B or D as a vector space, with the Lie bracket twisted by n fixed elements E1,…,En from A. In this paper, we study the automorphisms of the gradation shifting toroidal algebra [Formula: see text], which is proved to be closely related to a class of subgroups of GL(n,ℤ), called the linear groups over semilattices. We use the linear group over a special semilattice to determine the automorphism group of the gradation shifting toroidal algebra [Formula: see text], which extends our earlier work.