Research on Intelligent Classification Recommendation System for Campus Safety Hazards Based on the BERT Model
(Shanghai Putuo District Education Supervision and Safety Affairs Center, Shanghai 200333, China)
Abstract
Campus safety management systems usually face problems such as complex classification systems and low operation efficiency in the hazard registration stage, which seriously affect the effectiveness and data quality. Taking the classification standard of campus safety hazards in a district of Shanghai as an example, and aiming at the problems of difficulty in searching and high misjudgment rate in traditional classification methods, this paper proposes an intelligent recommendation method for hazard classification based on the BERT model. The system utilizes a pre-trained language model to vectorize the semantics of safety hazard descriptions, and achieves automatic recommendation of hazard categories by calculating similarity with standard classification vectors. Among more than 200 standard classifications, the average response time of the system is less than 0.2 s, and the accuracy reaches 77.5%. The efficiency of this stage increases by more than 500%, and the overall time of a single hazard registration decreases by 42%. Experimental results show that this method significantly optimizes the hazard registration process, improves classification accuracy and user enthusiasm, and provides strong support for the intelligent transformation of campus safety management.
Keywords
campus safety; BERT; hazard classification; ONNX; Natural Language Processing
References
- [1] DEVLIN J,CHANG M W,LEE K,et al. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding [C]//Conference on the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.Minneapolis:Association for Computational Linguistics,2019:4171-4186.
- [2] ONNX community ONNX: Open Neural Network Interchange Format [EB/OL]. [205-06-16] https://github.com/onnx/onnx.
- [3] Hugging Face. BERT base Chinese: A Chinese Pre trained Language Model Based on BERT Architecture [EB/OL]. [June 15, 2025] https://huggingface.co/bert-base-chinese.
- [4] Meta Corporation. PyTorch Documentation [EB/OL].[2024-06-15].https://pytorch.org/docs/stable/index.html.
- [5] Microsoft Corporation. ML.net Tutorial [EB/OL]. [2022-07-06] https://learn.microsoft.com/zh-cn/dotnet/machine-learning/tutorials/.
- [6] Chen Erjing, Jiang Enbo A review of research on text similarity calculation methods [J]. Data Analysis and Knowledge Discovery, 2017, 1 (6): 1-11
- [7] SUN C,QIU X P,XU Y G,et al. How to Fine-Tune BERT for Text Classification? [J/OL].arXiv:1905.05583 [cs.CL].[2025-07-01].https://arxiv.org/abs/1905.05583.
- [8] Hugging Face. Transformers: The Model-definition Framework for State-of-the-art Machine Learning Models in Text, Vision, Audio, and Multimodal Models, for Both Inference and Training [EB/OL].[2025-07-01].https://github.com/huggingface/transformers.
- [9] scikit-learn developers. Scikit-learn: Machine Learning in Python [EB/OL].[2025-06-20]. https://scikit-learn.org/.
- [10] Scikit-learn Developers. Sklearn.Metrics. Accuracy_Score [EB/OL].[2025-06-22].https://scikit-learn.org/stable/modules/generated/sklearn.metrics.accuracy_score.html.
About the authors
Wu Hao (1977-), male, Han ethnicity, from Shanghai, assistant researcher, master's degree, research interests include application development, network security and campus security.