APP Design of Energy Monitoring in Smart Campus Based on Android System

Smart Campus is an intelligent and smart environment of teaching, learning and living, which is built based on the Internet of Things and application services. However, there are still some problems in the current construction and development process to build the smart campus, especially the energy and resource monitoring are still in the traditional mode of non-intelligent management, by human manual doing. The functions of terminal application are still simple, drop steps with the intelligent development of the campus. In order to achieve smart campus, we designed a database, smart campus mobile terminal APP to manage and monitoring the use of campus energy. The smart campus APP is based on Android system to monitor and control energy and other resources in the campus. The monitoring method is real-time, clear and efficient. In addition, smart dormitory, smart classroom and smart map function have also been designed to provide a more convenient and safe living environment for teachers and students. Keywords—Remote Wireless Meter Reading and Control (RWMRC), WiFi, 3G, Smart Campus, Android


Introduction
"Smart Campus" refers to an intelligent teaching, learning and living environment that integrates teaching, research, management and campus life based on the Internet of Things and various application service systems. With the improvement of the level of intelligence nowadays, safety campus has been a key part of building a smart campus. Using the advanced intelligent equipment, situational awareness technology and high-speed mobile Internet, monitoring the energy network in campus has been an important step to ensure the campus security [1]. The situation-aware technology obtains the current environment data through the sensors, and processes information through smart mobile devices, to provide users with reliable and efficient independent services [2][3].
At present, many universities and colleges have built digital campuses of different sizes, which have to some extent, realized the integration of information resources and the integration of various information management systems, and have brought many conveniences to teachers and students for their work, study and daily life [4]. Howev-er, there are some common problems in the development of campus, for example, low intelligence, little investment in the construction of digital resources, the overall level of popularization which needs to be further improved, and design flaws of Green Energy-saving campus infrastructure and top-level.
With the development of pervasive computing, some smart campus prototypes were developed to offer assistive services for users situated in an intelligent environment. Talal et al. presented a plan to integrate services in a campus with the smart card efficiently [5]. Michael et al. proposed the ETHOC system, which integrates virtual and physical elements in the campus [6]. The system supports to interact with virtual counterparts of printed document using a variety of devices. Dong et al. developed a location based service system to support the interaction between the 3D virtual world and the real world [7].
With the advent of the mobile Internet era, Android has become the most used smart phone operating system worldwide. It is precisely because of the rapid development of mobile intelligent terminals that provides the basis for the development of mobile campus informatization at this stage [8]. Zhejiang University's 2010 Information Plan understands smart campus as a high-speed Internet, thorough perception, more scientific decision, more real-time control, more convenient service, serviceoriented computing six aspects [9]. Fuzhou University signed a five-year cooperation agreement with telecom operators, pointing out that during the five-year cooperation period, Fuzhou University will carry out projects such as infrastructure construction, education network and intra-campus network interconnection and campus digital security management platform construction [10]. Birmingham Metropolitan College, using IBM-designed smarter educational architecture, has built a cloud-based classroom and Connections social software platform to create an interactive, quality learning environment for students. Tens of thousands students at the college can use this platform to establish their own social learning network, form a learning community, discuss issues and learn from each other, share ideas and create new knowledge [11]. Tulane University used sensor technology and advanced learning analytics to turn ancient campus buildings into models of schools and communities for sustainable development and energy efficiency [12]. Sushruth Chandrashekar developed an assistant software for the School of Art and Design of the University of San Diego to receive on-campus push information, schedule, faculty contacts, course details, student work and student organization [13].
The design of smart campus terminal APP is used for the energy. With the rapid development of mobile communication and APP development capabilities, mobile platform information services and powerful terminal APP control services will be popularized in all walks of life. Therefore, the design and development of smart campus APP will be imperative [14][15][16][17][18].
The rest of the paper is organized as follows. Section II describes the design of our APP system. Section III presents the design of function module. Section IV presents the design of database sever. Section V presents the design of high-fidelity prototype picture. Section VI concludes the paper.

2
The Overall Scheme Design of System

2.1
Overall schematic of the system The system design uses wireless smart devices as monitoring nodes to monitor and control the water networks, power grids, heating systems, lighting systems, video monitoring systems and parking space detection systems on campus, respectively, to achieve the node information such as temperature, water consumption, pressure, power consumption and other node status and data. The overall system schematic diagram is shown in Figure 1.

Design of APP structure
Design of software structure is a macroscopic process of transforming requirements of software into representation. The main work is to design the software module by layering. The software module would be organized into an excellent hierarchical system. Then, describe the relationship between the modules at all levels. The lower module is mainly responsible for supporting the upper module.
The hierarchical design of software is an often used software structure design method in the overall design stage. The APP also uses a hierarchical structure, which consists of the Linux kernel layer that the operating system layer, the system library and runtime library layer, the application framework layer, the user function layer and the user interface layer 5 layers. The software structure diagram is shown in Figure 2.
The framework optimizes the recall of various components skips the framework security protocol, and any application can choose to use a component without affecting other applications.
In the user function layer, we implement the mutual call relationship among the main modules in the middleware layer and the function of buttons in the user interface layer mainly through Main Activity .java files.
User interface layer, mainly sets up the layout of the interface, and add picture borders as well as some buttons, such as strings .xml, styles .xml, color .xml files.

Design of Function Module
We use Case Modeling Approach to analyze the functional requirements of the software, so as to determine the software functions preliminarily, and use the text to describe these functions in detail. The main users of the Smart Campus APP are students and school staffs. In addition to user management, software setting, software upgrade function, the functional use case diagram is shown in Figure 3. Depending on the different users, it is divided into three sub-graphs.
Monitoring and controlling energy system function: there are two options when we access to the energy system, one is Two-dimensional surface map as the basic interface, nodes distributed on the map, click the node to view the node information and to control the smart device. Another one is selecting building interface, after select the building, the ground floor plan serves as the ground floor for the operator interface, and the trigger node is calibrated on the floor plan, click the note to view the node information and control the device. On the map control interface and the floor control interface, there is an option to select the type of nodes that displayed on the map or floor plans. Monitoring and controlling light system function: campus map is a controllable interface. Trigger nodes is calibrated on the map's floor plan, click to get the node information, including node data, historical data, and the lighting system will increase the control bar, including setting automatic switching time, real-time control and history manipulation records, but the unit of outside building control is the whole street. Inside the building, floor plan as the basic interface, click node to get the node information and control the smart device. The software design process is the same with the energy system, but the required database data is different.

Fig. 3. Functional Use-case Diagram
Video surveillance: Functional and software designs are the same with the lighting system. However, due to the excessive number of nodes, video surveillance control interface based on real-time images, which is useful for safe activity.
Smart dormitory: Smart dormitory function set up three optional columns, dormitory information, equipments repaired notice and laundry system. The dorm information will display the data obtained from each device in the dormitory, as well as equipment control, such as switching water, electricity and lighting equipment. Students can fill in the information about the repaired equipment and check the acceptance status of the repaired equipment. The laundry system provides reservation and equipment scanning functions, users can view the state of the washing machine and make an appointment with the booking interface. Another way is scanning the QR code on the washing machine to jump to reservation interface for making an appointment, make a payment within 10 minutes of booking or the booking would be canceled. In addition to a few slightly different functions, the overall design of the wisdom dormitory software procedure is similar to the above.
Smart classroom: The function provides the information of building and classrooms to users. Classroom statuses are divided into 'using' and 'free'. In the 'using' state, the information about the classrooms in previous week and next week. In 'free' state, users can apply for the free classrooms to held any activity or study yourself. In using period, students can use the mobile phone positioning and fingerprint recognition function for attendance.
Smart map: The map show the campus traffic flow information, red for traffic jam, yellow for congestion, green for unobstructed. The system would help you find an optimal path to your destination in campus, or even show the user to the parking place in the parking lot. Smart appointment will match the nearest parking space in the parking lot and navigate. Timer starts after the car park into the parking space. Timer ends when the car leaves the parking space. Calculate the amount according to the parking time and provide payment function.

Design of Database Sever
According to user and functional requirements, the design uses Oracle database. To minimize the data redundancy and ensure database expansibility, efficiency and security, we create a datasheet reasonably. The datasheet is divided into user information  table, equipment information table, log data table, monitoring status table, dormitory  information table, washing machine equipment information table, building information table, course information table, attendance data table, classroom information  table, parking information table, and parking space data table. The information of teachers, students and managers are stored in the user information table, in addition to the basic information as well as student fingerprint information. Device information table is used for storing "relatively static" data information such as device ID number, location information, device category. Log data table is used for storing dynamic data, such as the equipment data and the control instructions on a daily basis. Monitoring status table only stores the video information of the monitoring equipment. The following Information tables are used to store static information, data tables are used to store dynamic information.
'Socket' is used to connect among wireless smart devices, APP and database server. And heartbeat packets are used to maintain Socket long connection. The JDBC (Java Data Base Connectivity) is connect with database to achieve access to the database and operation. JDBC is one type of Java API (Application Program Interface) with execute SQL (Structured Query Language) statement provide unity visit for multiple relationship database [14,15].

Design of High-Fidelity Prototype Picture
We used Axure to design a high-fidelity prototype of this smart campus APP. Designing a prototype is an essential stage when the app is being developed after the capabilities have been determined. It could view the user interface and its interaction of APP in advance. Figure 5 is the home page of the APP.  Figure 6 is the building list interface.
• Figure (c) is the interface after entered the node. Take the water meter note as an example. We can monitor the node's ambient temperature, water pressure, the height of the liquid level and current environment picture, and can control the node's valve switch. Click the map button we can clearly see the location of the node in the map. Below, we can choose a different date, and click on the device log to see the node data at different dates.

Conclusion
This paper introduces the current status of the construction of the smart campus and the method of the design of smart campus APP around the green campus and safe campus. We completed the overall system design through the establishment of TCP server, its service program and the design of Oracle database. Based on Android's platform architecture, the APP model is designed in a hierarchical manner. We have set up the use case model of the function module, and have determined the functional design of the energy system, lighting system, video monitoring system, smart dormitory, smart classroom and smart map. The APP can achieve campus data collection, environmental monitoring, provide more convenient and safe service for teachers and students working and living environment, and provide managers with more efficient and functional work mode. This article provides a comprehensive design methodology for the development of smart campus APP.