"PeVatrons" refer to astrophysical sources capable of accelerating particles to energies $\sim$PeV and higher, potentially contributing to the cosmic ray spectrum in the knee region. Recently, HAWC and LHAASO have discovered a new type PeVatrons -- X-ray binaries, allowing us to investigate in greater depth of the contributions of these sources to cosmic rays around the knee region. There are hundreds of X-ray binaries in our galaxy observed, which are potential PeVatrons. In this work, we derive the radial distribution of X-ray binaries in the Galaxy. Then we use the DRAGON package to simulate this distribution, and calculate energy spectrum, anisotropy of cosmic rays as well as the resulting diffuse gamma ray emissions, after considering them as factories of cosmic rays in the knee energy bands. our findings show that the contribution from the X-ray binaries, especially microquarsars, may be dominant. More microquasar PeVatrons can be observed by LHAASO and HAWC in the future, and will confirm the contribution of microquasars to high energy cosmic rays.