Theory and practice of formation of ecological knowledge