[en] All-sky, multicolour, medium deep (V similar or equal to 20) surveys have the potentiality of detecting several hundred thousands of quasi-stellar objects (QSOs). Spectroscopic confirmation is not possible for such a large number of objects, so that secure photometric identification and precise photometric determination of redshifts (and other spectral features) become mandatory. This is especially the case for the Gaia mission, in which QSOs play the crucial role of fixing the celestial referential frame, and in which more than 900 gravitationally lensed QSOs should be identified. We first built two independent libraries of synthetic QSO spectra reflecting the most important variations in the spectra of these objects. These libraries are publicly available for simulations with any instrument and photometric system. Traditional template fitting and artificial neural networks (ANNs) are compared to identify QSOs among the population of stars using broad- and medium-band photometry (BBP and MBP, respectively). Besides those two methods, a new one, based on the spectral principal components (SPCs), is also introduced to estimate the photometric redshifts. Generic trends as well as results specifically related to Gaia observations are given. We found that (i) ANNs can provide clean, uncontaminated QSO samples suitable for the determination of the reference frame, but with a level of completeness decreasing from similar or equal to 50 per cent at the Galactic pole at V= 18 to similar or equal to 16 per cent at V= 20; (ii) the chi(2) approach identifies about 90 per cent (60 per cent) of the observed QSOs at V= 18 (V= 20), at the expense of a higher stellar contamination rate, reaching similar or equal to 95 per cent in the galactic plane at V= 20. Extinction is a source of confusion and makes difficult the identification of QSOs in the galactic plane and (iii) the chi(2) method is better than ANNs to estimate the photometric redshifts. Due to colour degeneracies, the largest median absolute error (vertical bar Delta z vertical bar(Median)similar or equal to 0.2) is predicted in the range 0.5 < z(spec) < 2. The method based on the SPCs is promisingly good at recovering the redshift, in particular for V < 19 and z < 2.5 QSOs. For bright (V less than or similar to 18) QSOs, SPCs are also able to recover the spectral shape from the BBP and MBP data.