| With the rapid development of chemical enterprises,environmental protection and chemical safety problems have become more and more prominent,especially the sewage discharge problem caused by the relatively backward construction of urban drainage network is becoming more and more serious.At present,there are some problems in sewage treatment,such as complex monitoring methods and low real-time monitoring.The traditional data analysis and processing methods are difficult to solve because of various data types and no unified data processing methods.To address the above problems,an XGBoost-based classification model for identifying emission anomalies in chemical companies is proposed.The collected flow data are pre-processed and then clustered for classification modeling.The model uses machine learning technology to monitor the drainage network,reducing human intervention and improving detection efficiency.In addition,the monitoring method does not require upgrading the existing drainage network,but deeply exploits the data information provided by the existing equipment,avoiding excessive requirements for some old urban drainage networks that have not been systematically rectified.The main elements of this study are as follows:(1)Collect the data sets provided by the online monitoring system of urban chemical enterprises,visualize and process the monitoring data from the monitoring point map separately,and analyze the correlation between the data.Pre-process the dataset to conform to the subsequent algorithm specification format.(2)Based on the existing monitoring data set of urban drainage network which is not classified and lacks unified classification standard,the unsupervised clustering algorithm Mini Batch K-means was used to classify the data into four categories: "leakage,rain and sewage mixing,inflow and infiltration,and normal",and labeled accordingly.The data were classified into four categories,namely,"drainage leakage,rainwater mixing,inflow and infiltration,and normal",and labeled as "0,1,2,3".(3)Using XGBoost to model these four categories of labeled data with multiple classifications,and improving the performance of the model by adjusting the parameters,we finally realized an XGBoost-based classification model for identifying emission anomalies in urban chemical enterprises.The experimental results show that the classification accuracy of the model is higher than 80%,which can effectively monitor the discharge of chemical enterprises,improve the protection level of urban water environment,and reduce the environmental and safety hazards caused by the production of urban chemical enterprises.(4)The model is encapsulated into a Web API to enable users to use the online monitoring system to monitor and warn the discharge situation of chemical enterprises and to deal with abnormal situations in a timely manner,so as to prevent environmental pollution and ecological damage properly and effectively.In summary,a chemical enterprise discharge anomaly identification model based on XGBoost algorithm model is established,which shows high classification accuracy and good performance in accurately identifying four drainage situations.The model realizes the real-time monitoring system of chemical enterprise drainage embedded in the Web side,which can monitor and warn the discharge of chemical enterprises,and provides a feasible and effective solution for monitoring the drainage network of urban chemical enterprises,with certain theoretical and practical significance. |