## 5 Design of Semantic-Based Autonomous Computing Technology  
The structure of the semantic-based autonomous control system proposed in this paper is designed for the predictive maintenance of smart factories. The flow of this system is shown in Figure 10.  
The flow chart of the architecture proposed in this paper is shown in the figure below. The overall structure consists of four areas. The monitoring area collects various data generated from equipment, IoT, and sensors using MTConnect adapter/agent. The collected information is serialized in XML format in accordance with the semantic standard. Through this, a monitoring server is built. In the analysis area, various situations that can occur in the semantic factory are defined in semantic language in advance. The weights for these are defined in the target model through tools, such as decision trees. The problem is identified by analyzing it in the digital twin space implemented based on the data built from a monitoring server. In the planning area, the analyzed problem is planned for preventive maintenance using expert techniques or a set manual. In the execution area, based on the strategy established in the planning area, the situation in the factory is grasped, an execution plan is established, and actual equipment, IoT, and sensors are controlled. Figure 11 below is a schematic depiction of an actual motor factory in Gumi, Korea. If our proposal is applied to this factory, it can be implemented with the following model. As shown in Figure 11, there are five major processes: (1) a process of making a motor cap, (2) a process of making a housing, (3) a bonding process, (4) an assembly process, and (5) an inspection process. Each process is connected by an AGV equipped with a robotic arm. When explaining the factory inner grinding equipment modeled in Figure 8 as an example, first, the data generated from the equipment are collected using MTConnect. The MTConnect adapter converts the binary data generated in the facility into simple hierarchical data representation (SHDR) protocol. The agent stores the received agent. If there is an http request, it converts it into XML and provides the data. For example, if the rpm of the motor is 452 in the inner grinding process and if the SHDR of 2021-09-10T13:07:06.5862! rpm! 532 occurs,!DatalItem category =\"EVENT\", timestamp = \"2021-09-10T13:07:06.5862\" id = \"2000_Avail\", Type = \"motor_rpm\", Value = \"452\"> is saved by the agent. Meanwhile, the semantic model is composed as shown in Section 3. Figure 10: Semantic-based autonomous computing technology flow. The data of the lower stage along the semantic hierarchy are stored as the following Figure 12.  
A digital twin is constructed based on the semantic repository transformed into semantic data. The reason why a digital twin is needed is because it consumes a lot of resources in order to perform a simulation on an actual physical model and to find and operate the optimal result value. The digital twin model defines and solves problems using goal models and expert techniques. As shown in Figure 13, first, a problem is found through an error tree on a digital twin that is modeled on a virtual factory, and a solution and a plan are established using the semantic repository composed of manuals and coping methods made by experts. For example, if the normal operating value of the motor is 500-800, a low rpm is a warning sign. If this is defined as an error tree, it can be expressed in the following Figure 14.  
As shown in Figure 14, low voltage, high voltage, bearing, and vibration are defined as constraints that cause the malfunction of the motor. Certain conditions are input according to each constraint. Through this, the cause of the malfunction can be defined. The set manual and response method can be easily searched through a semantic search. By identifying the cause of an error or a danger and quickly knowing how to respond through the reference of the object in the manual linked list method, it can be used for prediction, maintenance, and accident response.