## 2 Safety Autonomous Platform for Data-Driven Risk Management
To handle the SMG status information, we exploited the ELK stack, comprising Elasticsearch, Logstash, and Kibana, which is a robust set of tools that collaboratively enable efficient data searching, analysis, and visualization [18]. As a data pipeline to extract, filter, transform, and load the BI data into the Hive, a distributed fault-tolerant data warehouse system [19], we exploited NiFi, which is an open-source data integration platform designed to automate the flow of data between different systems, leveraging the extract, transform, load (ETL) concept [20]. Hadoop User Experience (HUE) is an open-source, web-based, graphical user interface that enables users to interact with the Hive [21]. Hadoop consists of the Hadoop Distributed File System (HDFS) for distributed data storage and the Yet Another Resource Negotiator (YARN) for resource management [22; 23]. The BI data are not loaded directly into the Hadoop but are stacked in the Hive and loaded into Hadoop when the BI data are accumulated At multiple 128 megabyte (MB) blocks. This is because loading a small amount into Hadoop creates many files on a block-by-block basis even if one block does not exceed 128 MB, resulting in a decrease in the Hadoop speed. To handle the BI data, the Spark running on the YARN can accommodate various tasks such as batch processing, machine learning, SQL query processing, streaming data processing, and graph library processing [24]. Hadoop, Elasticsearch, Kafka, and NiFi in the safety data management component provide cluster functions that provide high-availability services to clients by grouping different servers into one and operating as one system. Even if a cluster-bound server has equipment or application problems, it may be controlled without affecting the overall service by removing the distribution of the server in which the problem occurred, and normal services continue to be performed. Figure 2 illustrates the data-driven risk management procedure among the SAP, SMGs, supervisors, and workers. For data-driven risk management, all video streams and BI data are processed through restful application programming interfaces (APIs) managed by an administrator who monitors all workplaces and workers through the GIS-based data visualization component. The RTSP server or streamer in the SMG transmits video streams on channels 1-3 to the agent in the SAP, where the RTSP stream unit and relational database management system (RDBMS), called RTSP/R, stores the information about video streams in the RDBMS and stores the video streams in the video storage. The stored video streams, namely RTSP streams, are converted into HTTP Live Streaming (HLS) streams so that they can be displayed on the web through the video management unit in the GIS-based data visualization component. In addition, through the RTSP streamer, the video streams are fed to an on-site AI engine in the SMG in order to detect the objects needed to inspect and identify workplace hazards for risk assessment. The BI data from LoRa sensors or workers' wristbands are stored in the LoRaWAN network server via the LoRa proxy shown as the sensor data in the SMG, and then they are loaded into Kafka via NiFi. They are also fed to an on-site AI engine to detect workers' anomalous conditions and behaviors for risk assessment.