{'fraction_non_alphanumeric': 0.027234159025591897, 'fraction_numerical': 0.006112859814789471, 'mean_word_length': 5.187411797911374, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 1, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Intelligent Guardrail Context-Awareness System Based on Acceleration Sensors in Ubiquitous Sensor Networks

A ubiquitous city (u-City) is a next-generation information-based city that combines state-of-the-art IT (information technology) infrastructures and ubiquitous information services. In general, the urban facilities of a u-City can be categorized into ground and underground facilities. This paper proposes a guardrail context-awareness system based on the analysis of acceleration sensors to manage guardrails systematically. Guardrails are one of the major ground facilities in a u-City. The suggested system generates alarms when acceleration sensors on guardrails recognize a certain level of physical shock. General information on the size and direction from the acceleration sensors is transmitted to the context-awareness system. The context-awareness system analyzes the scalar magnitude of the impacted shock, acceleration values to the x, y, and z directions, gravity direction of the sensors, and threshold values. It then determines if there is pronounced physical activity on the guardrail. Experimental results show that the suggested guardrail context-awareness approach accurately recognizes guardrail shock events that occur in various environments.


Introduction
Network technology, computer hardware, mobile, and other information and telecommunication technologies have dramatically advanced; this has emphasized the need to manage the numerous urban facilities including bridges, tunnels, roads, guardrails, underground facilities, and streetlights more effectively and systematically.
A u-City (ubiquitous city), which is a next-generation information-based city, combines state-of-the-art IT (information technology) infrastructures and ubiquitous information services into the city space for more convenient, high quality life as well as security and welfare of the citizens through systematic urban management. Furthermore, it enhances the fundamental functions of a city by creating new industry sectors. As this new concept of a city expands nationwide, the necessity of managing urban facilities in a more systematic manner also increases [1,2]. Among the various fundamental facility management technologies, context-awareness technology is in the spotlight.
Using multiple sensors and devices, the future ubiquitous computing environment will provide users with substantially improved services without distracting them from their environments [3][4][5][6][7][8]. The core technology to establish this type of pervasive computing environment is called contextawareness computing. Context-awareness computing technology collects context information from sensors installed in different locations. It processes the data according to the objectives of the services to determine the most appropriate service for the user's current context and then reconstructs this dynamically before providing the service to the user [9][10][11][12]. In the future, it is expected that, as the ubiquitous environment advances, the scale of context-awareness computing will increase geometrically.
The existing literature presents cases where this contextawareness method was adopted to actual problems. For instance, [13] applies the concept of context awareness to mobile and ad hoc network broadcasting environments. The performance was compared from various viewpoints. Reference [14] suggests a method to test a home network system in a cost-effective manner by establishing a virtual testbed 2 International Journal of Distributed Sensor Networks for intelligent context-aware home automation. However, [14] has limitations because it tested the existing middleware and one home gateway only. Reference [15] designs an intelligent context-awareness system for the effective management and operation of underground facilities, water and sewage systems, in a ubiquitous environment. This system consists primarily of three steps: information acquisition, analysis and inference, and information provision. Reference [16] develops a universal learning environment for context awareness. This system consists of three basic subsystems: content access nonadjustment system, personalized annotation management system, and multimedia real-time group discussion system. As shown in the examples above, there are many cases where the concept of context awareness is applied to actual applications in the literature related to ubiquitous computing environments. There are few examples, however, that practically apply the context-awareness technology to the systematic management of urban facilities. Most facility context-awareness systems are limited to services focusing on information acquisition. In particular, there are very few cases of the development and application of an intelligent contextawareness system for major ground facilities in a u-City such as guardrails.
Consequently, this paper proposes a guardrail contextawareness system based on the analysis of acceleration sensors to manage guardrails systematically. Guardrails are one of the major ground facilities in a ubiquitous city. The suggested context-awareness system is activated when the acceleration sensors attached on a guardrail recognize abnormal signals and generate alarms. The context-awareness system determines the cause of the alarm and transmits the results to the related modules. The guardrail contextawareness system suggested in this study is expected to be implemented as part of an integrated platform for urban information [17] that will comprehensively control the ubiquitous city and manage the urban ground and underground facilities effectively and intelligently.
This paper is composed of the following. Section 1 presents the motivation, background, and a general overview of this study. Section 2 presents the details of the general system configuration including the suggested guardrail contextawareness system. The sensor data collected from the acceleration sensors on the guardrails is analyzed in Section 3. Section 4 explains the principal algorithm of the suggested guardrail context-awareness system. The onsite experiment results are presented in Section 5, and the conclusions and directions for future study are included in Section 6.

System Configuration
The proposed context-awareness system functions as one module of an urban space information-integration platform [17]. As shown in Figure 1, the integration platform is a basic system for the management and operation of a functionalized city that includes elements such as interaction, UOID (unique object identification) management, context awareness, 3-dimensional (3D) UI (user interface), and general management module. In Figure 1, the dotted line in red represents the suggested context-awareness system. In addition to the module described above, the related literature may be referenced regarding specific functions of the urban information integration platform. Figure 2 shows the overall flow of the guardrail contextawareness system suggested in this paper. As shown in this figure, the suggested context-awareness system generates alarms when acceleration sensors on guardrails recognize a certain level of physical shock. When an alarm occurs, general information on the size and direction from the acceleration sensors is transmitted to the context-awareness system.
The context-awareness system recognizes the shock when the scalar value (‖Sh ‖) of the acceleration sensors that indicate the size of the shock applied to the guardrail is significantly greater than the existing physical threshold value th . When the extent of the shock is similar to the physical threshold value, factors including direction and scope of the shock and direction of the acceleration sensor installation are examined to infer the general context. Moreover, when the scope of the shock generation is broad, the information from the adjacent acceleration sensors is also analyzed to provide results that are more accurate. Figure 3 shows a scenario sequence diagram of the suggested context awareness system. Figure 4 shows a guardrail on which acceleration sensors are installed. Figure 5 shows the acceleration sensors and related devices installed on the guardrails. Figure 5(a) shows a GFSN (ground-facility sensor node), an acceleration sensor installed on guardrails that implements 2.4 GHz wireless communication and transmits data to the gateway. Figure 5(b) shows a GFDA (ground-facility data aggregator), an information collector that collects the sensing data and information from the acceleration sensor nodes in a wireless manner (transmission and receiving). It then coordinates the different types of networks that exchange related information with the GFMS (ground-facility management system) of the core network. Figure 5(c) shows the electronic circuit boards installed within the GFDA.

Analysis of Alarm and Sensor Data
The degree of danger may differ depending on where the guardrail is installed and the type of guardrail including concrete (reinforced production fence), common guardrail, and guard pipes [18,19]. In other words, regardless of the extent of the shock, the vibration level may be different depending on the type of guardrail, and thus the physical threshold value [20,21] must be set for each acceleration sensor. In this paper, we determine physical threshold values of acceleration sensors with repetitive and empirical experiments.
Acceleration sensors installed on guardrails do not collect sensor values under normal conditions. They generate alarms to the GFMS only when a level of shock equal to or greater than the threshold th , which is set in advance, is detected. That is, the data is transmitted on an event rather than  continuously. Hence, the context cannot be determined based only on the pattern of acceleration fluctuation. Rather, such factors as strength of the sensed data, orientation, and reaction of the adjacent sensors must be considered to predict future events.
Upon receiving alarms from the acceleration sensors, the GFMS transmits the data to the context-awareness engine through the urban information integration platform. The alarms contain such elements as scalar size of the shock, acceleration values in -, -, and -axes, values that indicate the direction of the sensors, and threshold values of each alarm.

Guardrail Context Awareness
Upon the receipt of a shock alarm, the proposed guardrail context-awareness engine determines the context of the involved guardrails in the following manner. First, sensor UOID that generated the alarms is analyzed as illustrated in Table 1 to determine the type of facility and sensor.
When the scalar value of the shock is significantly greater than the physical threshold value th ( × th ) as shown in (1)  shock generation are considered to determine the context. In (1), ‖Sh ‖ represents the scalar value of the shock at time . and indicate weighting factors [22][23][24] to adjust the size of the threshold value th . is larger than and the total of and is equal to one: THEN consider other conditions where ≻ , + = 1.
(1)  No context Lv2 Possibility of a context (need to check) Lv3 Context Lv4 Emergency context The direction of the shocks is analyzed in reference to the acceleration values in the -, -, and -axes and the direction of gravity. Shocks generated on the part of the footway, outside of the guardrail, are not counted as being caused by vehicles. The size of the shock compared to the physical threshold value, which is the basis for determination, is indicated by the service threshold value that is calculated empirically based on shock-related data.
In addition, information from adjacent sensors is analyzed. When the area of shock generation is broad, that is, when adjacent sensors also recognize shocks greater than the threshold value, it is interpreted as a context. First, the list of sensors in a certain radius of the sensor that generated the alarms is requested. For the radius inquiry, environment files defined for each sensor are referenced. These environment files can be edited by the user. There are two methods of selecting the inquiry radius. Fixed-radius searching involves only one inquiry of the adjacent sensors within the fixed radius. Escalating-radius searching increases the radius units when the target sensor is not found among the adjacent sensors within the minimum radius, repeatedly up to a maximum radius. In this stage, the requests for sensing data from the sensors, as well as the list of adjacent sensors, are received through the integrated platform. This acquires the list of adjacent sensors from the interaction servers and sensing data from the GFMS.
The final context-awareness result for the guardrail ground facilities is generated in the code format shown in Table 2.
The degrees of guardrail context are generated in the code format shown in Table 3. As shown in Table 3, the degrees of guardrail contexts are divided into four levels: Lv1, Lv2, Lv3, and Lv4. The guardrail context-awareness information is transmitted to the urban information integrated platform.

Onsite Experiment
This study employed an Intel Pentium Core 2 Duo 3. 16 GHz CPU and 4 GB memory to develop the guardrail context-awareness system based on the suggested acceleration sensor analysis. Microsoft Windows server 2008 was used as the operating system. Microsoft Visual C++ 2010 was used as the programming language for the algorithm   development. PostgreSQL was adopted for database access. HTTP (hypertext transfer protocol) was adopted as the communication protocol and the XML data format was used. Figure 6 illustrates the overall software configuration used in the suggested system. For the data management experiment, a test lab environment was established with all basic facilities including the GFMS to collect and transmit the sensor and facility data of guardrails on which the sensors were installed. Actual shocks were applied to the guardrails in the test lab experiment. The sensor data collected from the sensors was analyzed. Figure 7 shows the main screen of the suggested guardrail context-awareness system. The window at the top left of Figure 7 shows the list of log files in the log-searching window. The tree in the log-searching window includes the log files for the UOID and the alarm timing under each folder indicates the month, date, and year.
The window at the bottom left is the configuration window. Parameters for the operation of the guardrail contextawareness program are set in this panel. This window has a user-attribute interface window, and the information on each parameter is displayed at the bottom of the screen when the corresponding item is clicked. Parameters that could be configured include basic information of context awareness, platform server information, and database information. Each of these can be reset by selecting the combo box at the top of the attribute window.
The window at the top right displays the progress. For each receipt of an alarm, one record is added and items such as date of occurrence, alarm time, UOID, and progress are displayed.
The window at the bottom right is the log viewer window. This displays the log data for the progress of the contextawareness program. There are three types of observable logs: system log, summary log, and communication log. Each log is displayed when the corresponding tab at the bottom of the log view window is selected. The system log shows the process steps from receiving an alarm to transmitting the result in real time. The communication log is displayed in nonreal time when the corresponding tab is selected in the log explorer. All transmitted data related to the selected alarm can be referenced. The summary log is similar to the communication log. It summarizes the major data among the entire transmission data. Figure 8 shows the sensor-information setting window connected to the main screen of the proposed guardrail context-awareness system. In this window, the user can set up the sensing data collection period (beginning and ending of collecting per unit) as well as the searching method for adjacent sensors (fixed or escalating radius).
Algorithm 1 shows the result of recognizing the guardrail context in an XML format. This is transmitted to the urban information integrated platform and related modules.
To verify the guardrail context-awareness system developed in this study, multiple acceleration sensors were installed over the 1.82 km section of national road number 96 in Sejong-si, an administrative complex city located in Yeongi-gun, Chungcheongnam-do, Republic of Korea, as shown in Figure 9. Figure 10 shows the shock sensors installed on the guardrails of national road number 96. Figure 11 shows a graph of the result of comparatively analyzing the performance of the suggested guardrail contextawareness system ten times of national road number 96 in Sejong-si. The suggested method was performed with the four context-awareness grades identified in Table 3. The performance evaluation measure adopted is shown in (2), where -measure is defined using precision and recall rates in (3). In general, -measure represents the harmonic mean of precision and recall [25]: In a recognition or classification task, the precision for a class is the number of true positives (i.e., the number of items correctly labeled as belonging to the positive class) divided by the total number of elements labeled as belonging to the positive class (i.e., the sum of true positives and false positives, which are items incorrectly labeled as belonging to the class). Recall in this context is defined as the number of true positives divided by the total number of elements that actually belong to the positive class (i.e., the sum of true positives and false negatives, which are items which were not labeled as belonging to the positive class but should have been). However, neither precision nor recall alone can accurately assess the recognition quality. In particular, recall can easily be maximized at the expense of a poor precision by returning all possible correspondences. On the other side, a high precision can be achieved at the expense of a poor recall by returning only few (correct) correspondences. Hence, it is necessary to consider both precision and recall or a combined measure such as -measure or overall: Apparently, -measure is much more optimistic than overall. For the same precision and recall values, -measure is still much higher than overall. Unlike the other measures,     International Journal of Distributed Sensor Networks <?xml version="1.0" encoding="utf-8"?> <AlarmResponse> <master id> platform master ID </master id> <uoid> context sensor UOID </uoid> <fac uoid> ground facility UOID </fac uoid> <ca code>context awareness result code </ca code> <level> level </level> <msg> error message </msg> </AlarmResponse> Algorithm 1: Context-awareness XML format. by precision and recall, overall is smaller than both precision and recall.
The estimated precision, recall, and -measure values of the proposed guardrail context-awareness system are shown in Table 4. As seen in Table 4, our suggested algorithm can reliably recognize various guardrail shock events in various environments.
In Figure 11, the x-axis indicates the four grades of context awareness; the y-axis indicates the context-awareness precision, recall, and -measure ratios that are recognized for each grade. As shown in Figure 11, the suggested system showed 100 percent (%) recognition rates when there was no context (Lv1) or when an emergency context occurred (Lv4). Therefore, all their precision, recall, and -measure values become one. The false positive and negative error ranges were approximately 8-9% in the case of Lv2 or Lv3. In general, the suggested system recognized the context accurately when various types of physical shocks were applied to the guardrails, although it did include some minor errors. Most of the minor errors seem to be mainly caused by the inaccurate tuning of predefined and empirical threshold or parameter values that are used in determining the four grades of context awareness.

Conclusion
This study proposed a context-awareness system based on the analysis of acceleration sensors for the effective management of guardrails, one of the ground facilities of a u-City. Because the suggested system recognized a certain level of shocks greater than the physical threshold values, the acceleration sensors installed on the guardrails generated alarms. These were transmitted to the context-awareness engine. In the context-awareness engine, elements contained in the received alarms such as scalar size of the guardrail shock, acceleration values in the x, y, and z directions, context awareness in the direction of the sensor installation, and threshold values of each alarm were comprehensively analyzed to determine the guardrail context. Then, the results of the guardrail context awareness were transmitted to the urban information integrated platform that transmitted the context information to the three-dimensional GIS (geographical information system) and related adjacent modules. The guardrail context-awareness system based on acceleration sensors suggested in this study effectively recognized shocks on the guardrails under various circumstances and the results of the context awareness were promptly transmitted to the related division to provide a foundation for the intelligent management of the urban ground facilities.
In a future study, the proposed guardrail contextawareness system will be tested with different types of shocks applied to the guardrails used in the study. Furthermore, the ability to adjust flexibly to various threshold values used in the suggested system will be considered. In addition, we will attempt to apply other useful sensors other than acceleration sensors.