Invariant measures of discrete interacting particle systems: Algebraic aspects