A Group Preserving Scheme for Inverse Heat Conduction Problems