ILLEGAL MUNICIPAL SOLID WASTE MONITORING SYSTEM BASED ON ANDROID APP

Illegal municipal solid wastes are tiny in scale and various in type, thus, it is difficult to be found by remote sensing image. To solve the problem, this paper designs and implements an illegal solid waste monitoring system based on Android App, which is composed of mobile-side and web-side. The mobile-side adopts the C/S structure, and realizes illegal solid waste location based on Gaode mobile map API on Android platform. Users can use the mobile App to report the type, scale, address and on-site photos of illegal solid waste in real time. The web-side adopts the B/S structure and develops based on the SSM framework. The web-side deploys the Tomcat server and MySQL database on the cloud server provided by Alibaba Cloud to realize the data cloud management and visual display based on Gaode Web map. The system has well-designed interfaces and convenient operations, which can effectively improve the management level and law enforcement efficiency of municipal solid waste. * Corresponding author


INTRODUCTION
Municipal solid waste (MSW) refers to the solid waste generated by urban residents or activities that provide services in urban dwellers' daily lives, mainly including household waste and commercial waste sometimes. Municipal solid waste management is a major issue that affects Chinese environmental quality and sustainable urban development (Cheng, 2010). In the last two decades, the production of urban domestic waste in China has increased rapidly. There are about 660 cities in China, which produces about 190 million tons of solid waste each year, accounting for 29% of the world's urban solid waste. In 2004, China surpassed the United States as the world's largest waste generator (Zhang, 2010) and (Wang, 2001). Municipal solid waste increases the pollution to the environment, affects human health, and causes the waste of urban land resources (Xiao, 2007). Therefore, solid waste must be effectively monitored in order to maintain the urban ecological environment, ensure the health of citizens, and improve the efficiency of urban land resource management. At the end of 2018, the General Office of the State Council issued the "Work Plan for Pilot Construction of" Waste-Free Cities "", and effective monitoring of municipal solid waste is imminent.
Traditional manual and field surveys are the most commonly used methods of municipal solid waste monitoring, but the distribution and range of municipal solid waste is random and wide. The method is labor-intensive and inefficient. Automatic identification and manual interpretation of municipal solid waste using remote sensing images can greatly improve the efficiency of municipal solid waste monitoring. Back in the 1980s Bagheri et al. used aerial imagery to identify hazardous waste locations in New Jersey (Bagheri, 1988). Xu Yunchuan and Wang Xin studied the application of satellite remote sensing in the identification and evaluation of municipal solid waste (Xu,1993) and (Wang, 1997), exploring a new way for solid waste management. Biotto et al. used IKONOS satellite imagery data to identify municipal solid waste in Italy (Biotto, 2009 It is not applicable to use these low-resolution and mediumresolution remote sensing images for identifying and monitoring large-scale municipal solid waste in small-area municipal solid waste that is widely present. The composition of municipal solid waste is complex, and it exhibits strong heterogeneity in high-resolution remote sensing images. It is difficult to achieve automatic computer extraction for both pixel-based and objectoriented classification methods (Zhang, 2013). Especially the illegal municipal solid waste is usually small and concealed, which cannot be effectively monitored using remote sensing images.
In recent years, with the rapid development of wireless communication technology and smart terminals, mobile GIS has been widely used in all aspects of social life, such as Google map, Uber and GrubHub for public services, E-government system for government departments (Chen, 2018), (Shu, 2019) and (Lei, 2019), and professional system for data collection and illegal supervision for special industries (Tian, 2014) and (Xiao, 2019) etc. In 2019, the number of smartphone users in China has reached 354 million. The high penetration rate of smartphones and the high coverage of mobile communication networks can turn every resident's mobile phone into a movable sensor, which can timely detect illegal municipal solid waste and upload the type, scale and location of illegal waste in real time. Therefore, monitoring of illegal municipal solid waste based on App is feasible both in technology and implementation.
The following parts of this paper are arranged as follows: the overall architecture of the system is presented in section 2. The key technologies of the system development are discussed in section 3. The main functional modules of the system are described in section 4. The last section gives some conclusions.

SYSTEM ARCHITECTURE
According to the requirements of illegal solid waste monitoring business, the system architecture is shown in Figure 1, mainly divided into application layer, service layer, data layer and support layer.
Application layer: Provides data collection and data management services for inspectors and managers through a visual user interface. The web-side adopts the B/S structure to realize the visual management of the cloud database. The client is based on the Android platform, adopts the C/S structure, interacts with the mobile-side through a wireless communication network, and implements data collection through the mobile-side.
Service layer: The service layer is the core of illegal solid waste monitoring. It is used to process and execute the instructions and data requests of the application layer. It consists of the GIS service part and the web application service part. GIS service part is used to process client requests for maps and geographic data. The web server uses Tomcat as a server, which is mainly used for solid waste management.
Data layer: The data layer is the material basis of the solid waste monitoring system. The data layer is used to store solid waste data and user data. Using MySQL as the back-end database, it is based on the compatibility and portability of SQL, and it also has scalability. Through the instructions of the service layer, the database is accessed according to different permissions. Support layer: The support layer is the essential environment and foundation for the construction of an illegal solid waste monitoring system. In order to make the entire system run stably, a good supporting environment needs to be guaranteed.

Android App development
Android is an open-source operating system based on Linux, and mainly used in mobile devices such as smartphones and tablets. The architecture of the Android operating system is divided into 4 layers. They are Application Layer, Application Framework Layer, Libraries Layer and Linux Kernel Layer from top to bottom. Most of the Android App are written using Java, and the mobile-side of the illegal municipal solid waste monitoring system developed in this paper is on the application layer.
The Android APP consists of a series of components, which are independent of each other, can be instantiated separately, and run in their own processes. The four major components of the Android App are Activity, Service, Broadcast Receiver and Content Provider. Activity is the most basic and commonly used type of component, which is responsible for direct interaction with users. Usually an Activity is a separate screen on the mobile phone. For example, each interface such as the login interface and registration interface of the mobile-side in the illegal solid waste monitoring system corresponds to an Activity. The Service runs in the back-end and cannot be directly seen by the users. For example, the GPS location in the illegal solid waste monitoring system is obtained through the GPS service program. Broadcast Receiver is a mechanism for transferring information between Apps. Broadcast Receiver will respond to broadcast messages sent from other Apps or systems. Content Provider is a third-party application data access solution provided by Android, processing data requests between Apps and solving data and database management problems.
In the development of Android Apps, the components used in the program, the functions of the components and the required permissions need to be declared in the configuration file of Android mainfest.xml first. In the illegal municipal solid waste monitoring system, not only Activities such as LoginActivity and RegisterActivity need to be declared in the configuration file, but also the permission of camera shooting and GPS location need to be declared.

SSM framework
The SSM framework is a collection of open source frameworks including Spring, SpringMVC and MyBatis. It divides the entire system into four layers: presentation layer, controller layer, service layer, and DAO layer.
Spring is an open source framework for the business layer, and the IoC container is its core module. It uses the getBean() method to create and manage object instances to achieve loose coupling between codes. SpringMVC is a module in the Spring framework, which provides a Web layer framework. The Web layer is decoupled with the help of the MVC (Model View Controller) architectural idea. Dispatcher Servlet is the core module of the SpringMVC framework. It completes the interception of user requests, passes the commands issued by users through HandlerMapping to match the Controller, and completes the corresponding specific requests. MyBatis is a persistence layer open source framework that supports customized SQL, stored procedures, and advanced mapping. By encapsulating JDBC, the underlying operations of the database are transparent. MyBatis uses simple XML or annotations to configure and map native information, maps the interface and Java's Plan Ordinary Java Object into records in the database, and is a persistence engine for data objects.
The basic process of the SSM framework is: Controller receives the request from View calls the business layer to complete the specific business logic, the logic layer sends a request to the persistence layer, the persistence layer completes the interaction with the database returns the results back to the business layer, the business layer sends back the processing logic to the controller, and the controller calls the view to present the data.

Gaode Map API
Gaode Map API is a set of map App program interfaces for developers, providing functions such as map display, location, navigation, and location search.
When the illegal solid waste site can be approached and the GPS signal is stable, Android App calls GPS service for location in the illegal solid waste monitoring system. The AMapLocation class provided by Gaode map API can be used to obtain the current location. Declare the AMapLocationClient class object in the main thread and use getApplicationContext() method to get the effective context of the whole process to initialize the location. The location mode can be chosen by creating AMapLocationClientOption object. Gaode location services include GPS and network location. This system uses Hight_Accuracy Mode, which will use network positioning and GPS location at the same time, giving priority to return the highest accuracy location results and corresponding address description information. Use the startLocation () method to start the positioning function, use the onLocationChanged () method to implement the AMapLocationListener listener to receive the positioning result returned asynchronously, and parse the callback parameter AMapLocation in the callback method of the listener to obtain the positioning result.
When the site of illegal solid waste cannot be approached or the GPS signal is unstable, the Android App will call the auxiliary H5 page location function of Gaode map API, by which users can move the locating point to the correct position of the illegal solid waste on the map. Gaode map API provides startAssistantLocation () interface for H5 assisted location. By loading WebView control, calling H5 assisted location and setting WebView property, WebView can execute JavaScript provided by Gaode to achieve location. Since Gaode Map uses the GCJ-02 coordinate system instead of the internationallyavailable WGS84 coordinate system, it is not applicable in some occasions, so this system will call the coordinate conversion class to transfer it to the WGS84 coordinate system before transmitting the data acquired by the mobile-side to the web-side, and then perform the data transmission.

SYSTEM IMPLEMENTATION
The illegal municipal solid waste monitoring system is divided into mobile-side and web-side. The server uses cloud computing platform services to store and process data, and provides data interfaces for server and clients to transmit data through Web Service technology. The overall framework of the system is shown in Figure 2.

Mobile-side implementation
The mobile-side adopts the C/S structure and is developed with Java on the Android Studio development platform. The main functions include user registration, user login, illegal and solid waste information upload, GPS location and map location. Figure 3 shows the illegal solid waste information reporting interface. The reporting information includes the illegal solid waste type, scale, address, and on-site photos. To the convenience of users, the illegal solid waste type and scale are selected using the drop-down menu. The illegal solid waste address is automatically obtained through the address matching function of Gaode Map. The on-site photos can be selected from the existing photos in the album, or directly called the camera to take pictures. In addition, information such as the reporter information, the reporting time, and the latitude and longitude of the illegal solid waste are also uploaded to the back-end database. Figure 4 is Gaode mobile map location interface. The blue marker in the center of the purple circle is the positioning point, which can come from GPS positioning or user positioning. The addresses covered by the purple circle are listed in lower part, which is convenient for user to choose. The address and the latitude and longitude of the positioning point are all uploaded to background database.

Web-side implementation
The Web-side is based on the B/S structure, Tomcat is chosen as Web server, MySQL is used as the back-end database, and SSM framework is adopted to develop the system. The web server is deployed on Alibaba Cloud, which is convenient for data interaction and testing with mobile-side. The main functions of the Web-side are the management, query and visual display of illegal solid waste data. Figure 5 is the database interface on the web-side. The administrator can modify the type and scale of the solid waste according to the on-site photos, and delete the repetitive records or invalid records. If an illegal solid waste report record has not been solved, it will be marked with '', otherwise mark it with ''. Illegal solid waste records can be queried by reporting time, solid waste type, district and so on. The spatial distribution of the illegal solid waste sites can also be viewed on the map by zooming in, zooming out, panning etc. Figure 6 is the Gaode map interface on the webside. When the administrator clicks an interest point on the map, the detailed information of the illegal solid waste site will be displayed on the map window as shown in Figure 7.

CONCLUSIONS
An illegal solid waste monitoring system based on Android App is designed and implemented in this paper. The system is composed of mobile-side and web-side. The mobile-side adopts the C/S structure, and realizes illegal solid waste location based on Gaode mobile map API on Android platform. Users can use the mobile App to report the type, scale, address and on-site photos of illegal solid waste in real time. The web-side adopts the B/S structure and develops based on the SSM framework. The web-side deploys the Tomcat server and MySQL database on the cloud server provided by Alibaba Cloud to realize the data cloud management and visual display based on Gaode Web map. The system has well-designed interfaces and convenient operations, which can effectively improve the management level and law enforcement efficiency of municipal solid waste. Moreover, the solid waste images stored in the database can be used as sample dataset to training solid waste classification model in the future.