Our study shed light on the characterization of the periprosthetic environment microbiome in patients after TJA. Based on the RandomForest model, we established a basic "typing system" for the microbiota in the periprosthetic environment. This work can provide a reference for future studies about the characterization of periprosthetic microbiota in periprosthetic joint infection patients.