Effective Heisenberg model and exchange interaction for strongly correlated systems