Battery component positive and negative pole judgment