In this study, the co-doping of heterogeneous metals(Pd,Ru) and non-metals(B, N) can enhance the light response intensity throughout the entire spectral range(200nm-800nm). In the catalytic system for the formic acid decomposition, the adsorption process of HCOOH is an exothermic process, the adsorption heat increases with the increase of temperature, the adsorption capacity decreases with temperature increases, the rate-determining step of the dehydrogenation and dehydration reactions are C-H bond breakup and O-C bond breakup step, respectively, and the corresponding energy barriers under Pd-based catalysts are 42.48 kcal/mol and 62.13 kcal/mol. The reaction patterns of formic acid on Ru-based catalysts are similar to those on Pd-based catalysts, but the energy barriers for formic acid dehydrogenation and dehydration under Ru-based catalysts are 31.72 kcal/mol and 41.09 kcal/mol. Under the action of the Pd@N-CeO2 catalyst, formic acid decomposes exclusively into CO2 and H2, which is in good agreement with DFT calculations. The introduction of methyl groups onto formic acid molecules reduces the stability of the C-H bonds, consequently lowering the activation energy barrier for the hydrogen evolution reaction to 36.91 kcal/mol. These findings offer a theoretical foundation for the development of formic acid-derived catalysts for hydrogen production.