Аннотация:The Sobolev probability method is used to calculate relative line intensities and level populations of hydrogen and He II for a broad range of physical conditions, as well as velocity gradients in the gas in nuclei of Seyfert galaxies and quasars. It is assumed that the stationary population of the levels is due to the simultaneous action of shock and radiative mechanisms of gas heating and ionization. Physical conditions are estimated for the regions of the formation of high-excitation lines located above the accretion disk surface.