4 g-Based Specialty Vehicles Real-Time Monitoring System Design and Implementation

In the future development of natural gas transportation industry, emerging ITS technology will be applied more and more, aiming at integrating precise positioning technology, geographic information system technology, database technology, multimedia technology and modern communication technology, sensor network technology and video capture technology, so as to achieve the transport steam (oil) vehicles in real time monitoring and management. The main research content of this paper is to design and research the monitoring and locating system of luck (oil) vehicle based on 4G on Android System. Real-time monitoring and alarming by sensor module, real-time video recording and uploading through camera module, real-time position recording and uploading through GPS module, vehicle navigation module and quick alarm module, which is composed of five parts. The system is the application of new intelligent transport technology in the field of special vehicle transport. It apply electronic information technology and internet of things technology to the vehicle system, so we can monitor natural gas and other special dangerous goods anytime, anywhere.


Introduction
With the development of natural gas transportation industry in the future, the emerging of the ITS (intelligent transportation system) technology will get more and more application, intended to reach the goal of monitoring and managing the steam (oil) transportation vehicles no matter where and how the weather is. The technology integrate many technologies, including precise positioning technology, geographic information system technology, database technology, multimedia technology and modern communication technology, sensor network technology, video technology, etc.
After investigation, the new generation of GPS vehicle monitor system should realize the collection and transmission of information of video, GPS, sensor, etc. The system plans to use 4G, for the system requires higher bandwidth of Internet access and the traditional GPRS data transmission cannot meet demand. In addition, the system plans to use advanced hardware platform and operating system for accommodating the trends and being competitive in the market of monitoring system. We have select Android as the operating system platform of this project, for Android system has advantages including strong portability, high openness, easy interaction, comprehensive functions, easy to be cut down, etc. Therefore, our system will be competitive at all aspects.

The System Overal Design
The main content of this paper is to realize the luck (oil) vehicle monitoring and locating system based on 4G network on the Android operating system. It mainly includes five parts: real-time monitoring and alarming through the sensor module, real-time video recording and uploading through the camera module, through the GPS module for real-time location recording and uploading, vehicle navigation module and alarm module.
The system is the application of the new intelligent transportation technology in the special transportation. It aims at applying the advanced electronic information technology to the vehicle system to realize the monitoring of the dangerous goods such as natural gas anywhere and anytime during the transportation. In this paper, we design a new real-time monitoring system, which should have the characteristics of the traditional vehicle monitoring system. Traditional monitoring system mainly consists of two parts: vehicle monitoring terminal and remote network server, that is, C/S architecture. Our system is still used in this design similar to the C/S architecture. The main tasks of the monitoring client include: collecting vehicle geographical location information and speed information, collecting the sensor information carried by the vehicle, locally processing and uploading the collected data in real time. The main tasks of the server include receiving the data sent by the client through the network and presenting it to the manager after processing. In the monitoring client design, we aim at special vehicles for the special design: In the information collection, in addition to carrying the usual GPS module we also added other sensors, including temperature sensors, air pressure sensors, concentration sensors, acceleration sensors; Network transmission using 4G and WIFI hybrid network alternative to the traditional GPRS; the system deployed four cameras to a more comprehensive and intuitive monitoring of the driver status, compartment conditions, road conditions; In addition, the client also integrated smart phone features (including SMS, telephone), in order to achieve the driver and the dispatch center in real-time communication. Due to the client equipped with a variety of sensors, including video sensors, the platform's data processing capabilities have higher requirements. So we chose Android operating system, designed specifically for embedded devices. In the serverside design, the work needs to be done include efficient and reliable real-time communication with multiple terminals; use of the database to store vehicle data; design UI; design automatic alarm rules based on vehicle sensor data; design based on real-time traffic Information optimization scheduling algorithm; vehicle driving information correction, preservation and display.
The overall design diagram as shown in Figure 1.

The System Hardware Design
The vehicle terminal is mainly composed of 6 modules, main control module with Android, communication module, GPS module, sensor module, power module, video modules. The design diagram of the terminal as shown in Figure 2.

The System Software Design
The vehicle terminal of this system uses Android, which is based Linux and not only free but also open source, as operating system. The Android is mainly used in portable devices, such as smart phones and tablets, for its high efficiency and openness, rich in interfaces and applications, easiness in human-computer interaction design, etc. Like other operating systems, Android utilizes layered architecture and is divided into 4 layers, which are Applications, Application Framework, Android Runtime and Linux Kernel from upper to lower. According to the functional requirements of the monitoring system, the vehicle terminal has 4 modules, including sensor and alarm module, video recording and uploading module, GPS real-time location and navigation module, quick alarm and communication module.

Server Client
Access server API

Response data
Push data to client

4.1Sensor Monitoring Module
According to the literature survey and the actual site survey, we can see that the system needs to ensure the safety of the goods in the first place, so as to realize the real-time and Omni-directional monitoring of the goods and the vehicle itself to become an effective and reliable vehicle monitoring system. The main monitoring object of the monitoring system is natural gas or other dangerous goods the vehicles contained. Commonly used monitoring methods is using a variety of sensors to monitor. For liquefied natural gas, often use temperature sensors, gas concentration sensors, pressure sensors and level sensors to monitor. For other types of dangerous goods, although the monitoring indicators or parameters are different, the difference for our monitoring system design is only in the type and number of sensors. Sensor integration work also includes software integration, if we chose the direct connection program, we need to write the Android client sensor driver and sensor software control module. Therefore, the module's primary task is enabling multiple sensor devices to communicate with the Android operating system. Secondly, after Android client obtained the data collected by multiple sensors, client needs to parse, process and save data in the local SQLite database, and upload data within a certain time interval to the server, in order to achieve realtime monitoring of vehicles. At the same time, the client will real-time detection of the data indicators, abnormal data in the case of alarm alerts, and upload alarm signals to the server, notify the management.

4.2Video Monitoring Module
Compared with the traditional vehicle monitoring system, our system can monitor more comprehensive. Because there are more than kinds of sensors. The system has joined video monitor to meet the development of electronic information technology and the needs of social development. Through layout multiple cameras and access Android terminal, the system can realize monitoring the vehicle in real time and at the same time monitoring video signal, saving in local and uploading. Although cameras are being considered as a kind of sensors, they are different in using and effect and the primary cause is the large amount of information they collect. Compared with general sensor's data which is far less than 1 KBPS, camera data is still likely to reach 1 MBPS per second after compression. As a result, cameras are not being considered as general sensors during design systems. We plan to use the camera of built-in encoding chip, because it could reduce resource which system cost in video transmission greatly. We plan to use standard H.264, which belongs to the highly compressed digital video codec standards. H.264 is an advanced technology on the video resolution and compression bit rate. For the vehicle terminal using Android, the library files and API for video decoding and displaying should have been integrated in the Android.
In addition to basic monitoring and controlling system with local monitoring, recording and alarming as previously described, the system has wireless Internet access to make special items could be monitored and record by the management system on the server during the transportation. The system and manager on the server could get all kinds of technical indices of dangerous goods or valuables during transportation, even monitor through the video. So as to achieve the goal of real "always" monitor.

4.3GPS And Navigation Module
According to the project requirements and relevant research, the information vehicle client upload should also contain the vehicle location information, so the system can also cooperate with the GIS system for real-time scheduling of special materials, or provide advanced services to other users. Android client powered by GPS chips, through the 4G module and WIFI network for secondary positioning, can quickly get to the vehicle's geographic location information and speed information. The obtained location information will be saved to the local SQLite database, and upload location information according to a certain strategy. The server side needs to correct the deviation of the uploaded data, save and show it in the right way. Managers can easily monitor and schedule each vehicle.
As a vehicle intelligent terminal, the system need to provide intelligent transportation services for local users, that is, drivers. The driver can obtain the navigation service or other POI search service through the system. The system is intended to integrate Amap Android navigation SDK, so we can quickly achieve vehicle navigation. At the same time the module integrates the voice synthesis function, we can achieve real-time voice broadcast to meet the driver's navigation needs.

4.4Alarm And Communication Module
The system uses 4G network, can be convenient for telephone calls, send and receive text messages, access to the Internet and other functions. The system will store management center phone number, through the Android system Intent mechanism, to achieve quick alarm function, allowing users to quickly request assistance in case of emergency. At the same time, Android client can set the white list number. When managers call the client for emergency notification or emergency scheduling, no manual answer, we can connect the phone. In this way, save the emergency communication time, to protect the timely transmission of information and personnel safety.
This system adopts the common mode of vehicle monitoring system, namely "C/S" mode, which has the advantages of simple topology, easy expansion and low cost. Specifically, the system should be composed of a plurality of onboard clients and at least one server having a fixed IP. Android application will be developed in MVP mode, which separates the interface layer, Model layer and presenter of the whole system through reasonable layering, and realizes the whole client system by low coupling and high aggregation. Each module in the system will be separated from each other and work independently. Sensor module and video module will call the Android operating system API to achieve. Some sensor modules may need to write their own interfaces. The framework of the local network is to be implemented in the framework of OkHttp + Retrofit, which can quickly encapsulate the network framework and parse the data at the same time. GPS module will use Amap Location SDK to achieve high geographic location, the SDK in the traditional positioning interface on the packaging and optimization, faster and more accurate access to location information. Navigation module will use Amap Navigation SDK, we can achieve free integration and use of navigation. Quick alarm module will use the Android operating system API to achieve, while listening to incoming calls, emergency dispatching telephone free calls.