Total reflection X-ray fluorescence has advantages of simultaneous multi-element detection, potential of trace analysis, etc. However, overlapping effects may lead to loss of accuracy or even faulty results in practical quantitative multi-element analysis, especially for trace elements in environmental samples. Conventional approaches consider only partial overlapping effects and are difficult to be generalized. Thus, an intelligent quantitative multi-element determination method is proposed. With a scalable spectral decomposition framework, quantification becomes approximating measured spectra with characteristic curves of possible elements. Particle swarm optimization is used to solve the problem with a heuristic scheme. Trace elements, including K, Cr, Mn, Fe, Co, Ni, As and Pb, are measured simultaneously on the established TXRF analysis platform. Experiments verify that high measurement precision and computational efficiency can both be obtained by adopting the proposed method.