Processes responsible for the compositional structure of the thermosphere