## 5 Development of the Prototype System  
A BMS usually consists of some modules, and assisting bridge inspection is a function of a BMS [40]. This study aims to explore the improvement effect of the proposed IR method on bridge inspection using a BMS. Therefore, a simple system for bridge inspection is developed. Here, SPARQL query will be used for retrieving inspection-relevant information from the Blontology-based knowledge base in the prototype system. The prototype system was implemented as a web application. The architecture of the prototype system comprises a user interface layer, a business logic layer and a data storage layer, as shown in Figure 6. To implement the proposed IR method, the TDB database and a semantic retrieval middleware were applied to a conventional software architecture. The TDB database was introduced into the data storage layer to store the Blontology-based knowledge because OWL ontologies are principally exchanged as RDF documents [41] and TDB has high performance on RDF store [42]. SPARQL query in the middleware was correspondingly used to fetch inspection-relevant knowledge from the TDB database in the business logic layer. Figure 6: Architectural diagram of the prototype system. As shown in Figure 6, the user interface layer is a web browser-based graphical user interface (GUI), which is developed in three web development languages: HTML, CSS and JavaScript. A bridge inspector can expediently interact with the system via this layer. Specifically, the inspector can input a bridge element name as a keyword to search for the required result. He/she can also choose an element from predicted elements by the system, which is the expected effect. Subsequently, the inspector can input the exact location, type, extent, condition state, maintenance actions, etc. The business logic layer (BLL) in Figure 6 is served as a mediator between the user interface layer and the data storage layer. This layer consists of the TDB database and the MySQL database, which stored the Blontology-based knowledge and relational data related to bridge inspection, respectively. In the BLL, the Jena Fuseki in the semantic retrieval middleware can read inspection-relevant knowledge from the TDB database using SPARQL queries. The SPARQLWrapper can transmit the query results to the Python-based framework. The Python Django web framework in the BLL can be used to not only receive the user input and send the query results back to the user interface layer, but also write data (e.g., the inspection results) to and read (e.g., bridge elements) from the MySQL database. In addition, the introduction of the semantic retrieval middleware and the knowledge base make it possible to predict the target element to be inspected by using spatial relationships among elements. Figure 7 shows the prediction algorithm. The algorithm is based on the experiential knowledge that an inspector usually inspects elements one by one along a certain direction in a contiguous space. In other words, the target element has a close spatial relationship with the present element being inspected in most cases. This spatial relationship can be determined according to the last inspected element and the present element, and the direction of this relationship is from the last element to the present element. The element that has this spatial relationship with the present element is regarded as the top priority of candidate elements to be inspected. Moreover, elements that have other spatial relationships with the present element are also identified as candidate elements to avoid omitting a potential target element. The presented prediction algorithm does not require a predefined inspection sequence. Compared with the predefined sequence, this prediction algorithm is of great applicability because the actual inspection could be different from the predefined sequence due to traffic and lane-closure restrictions.