Glass is valuable evidence of cultural exchanges between my country and the West through the Silk Road, and ancient glass is extremely susceptible to weathering due to the impact of the burial environment. During the weathering process, internal elements undergo a substantial exchange with environmental elements, resulting in changes in their compositional proportions that affect the correct judgment of their category. In order to improve the accuracy of glass classification, this paper conducts statistical analysis based on the given glass data to summarize the statistical laws of chemical composition and weathering, and establishes a machine learning model to analyze and identify glass cultural relics. First, the chi-square test was used to confirm the correlation between whether the glass was weathered and various factors, and a descriptive statistical analysis was performed on the change law of the chemical composition before and after weathering. Then, according to the weathering situation, the glass cultural relics were divided into high-potassium or lead-barium categories, and the system clustering model and random forest model were respectively established to obtain the classification results; in this case, the cluster analysis is carried out, and the significant difference value of the clustering results is used as the basis for the selection of the appropriate chemical composition, and the subcategories are divided by comparing the Euclidean distance between the samples; finally, the correlation analysis is carried out on the classified glass cultural relics, and the correlation Coefficient heatmaps show chemical composition correlations and differences for different classes of glasses. The validity of the proposed method is verified on a batch of detection data of ancient glass products in my country, and the perturbation experiments with different intervals are set for each chemical composition, which proves that the model has good robustness.