Design and Implementation of the Detection Software of Wireless Microseismic Acquisition Station Based on Android Platform

New energy acquisition devices are urgently required to address the increasing global energy consumption and 10 increasing difficulty of energy exploitation. Devices for seismic exploration appear to be small in size, wireless and rapidly becoming more intelligent; hence, a traditional operating platform can no longer satisfy the demand of portable exploration device usage. This study investigates and develops hardware for a wireless microseismic acquisition station, then uses this hardware as a platform to address the distribution of wireless microseismic acquisition stations and deliver monitoring software based on the Android platform, which is portable, popular and has a large number of users. In large-scale field constructions, 15 software can provide operators with visualised station layouts throughout the process, including positioning, ranging, angle measuring and network monitoring. It also offers a real-time network for monitoring smalland medium-sized microseismic acquisition station arrays under construction as well as other functions, such as intelligent control and real-time data monitoring of the status of the acquisition station. A drainage blast monitoring test is conducted on the system, showing positively monitored data and accurate results in the inverse operation. Moreover, the software and hardware are proven to be highly 20 stable and portable through a post-construction test, which can help enhance the field construction efficiency.

such as fractures in mines. A microseism is defined as the strain energy released in the form of elastic waves in the stress redistribution process caused by structural break and elongation (Mulargia, F et al.,2016;Kurzon I et al.,2018;Pavlova A et al.,2014). Locating the seismic source with the microseismic data is key to the geometric characteristic analysis of the underground primary and induced fractures, as well as techniques related to effective stimulated reservoir volume (ESRV) and prediction of trend for future production (Thorne P W et al.,2017). In 1912, Geiger (Germany) proposed a positioning 5 method within the actual domain based on the ideal Earth (Geiger L et al.,1912) , which was later applied to the study of  Meles et al.,2010). As the main source for seismic exploration, the seismic data acquisition stations play a critical role in resource exploration and energy acquisition (Mazza, S et al.,2012). Similarly, the microseismic data generation also relies 10 on the microseismic data acquisition stations. With the rapid development of science and technology, the evolution of seismic exploration sources tends to focus more on miniaturisation, intelligence and portability whilst maintaining high resolution, high precision, synchronous data acquisition and high-speed data transmission with low power consumption (Qisheng Zhang et al.,2013). From a broader perspective, in the future, seismic data will be collected by a network made up of many miniature seismic instruments in most areas (Willett K M et al.,2014). At a local scale, data will be acquired from a local area network 15 (LAN) consisting of small seismic instrument arrays in local construction areas. Nevertheless, the current development of seismic exploration sources has seen two bottlenecks in terms of the front-end sensor and the software management platform of a corresponding exploration device.
Computers are used as terminal devices in most of the existing software management platforms. Despite their high computing 20 speed and stable performance, computers are not suitable for many operators in terms of working in the field with a large area and a large distance, considering their poor portability, short life and complicated operations. In addition, most of the current Android software have been applied to seismic data display and rapid earthquake reporting(LIU Jun et al.,2014), whilst only a few have been directly used in the large-scale field construction sites.

25
Based on the research group has developed the hardware of the acquisition station. transmission. Furthermore, the position information of the Android device user can be quickly inputted to WLAN, thanks to its built-in GPS unit and the GSM/GPRS access module, providing more valid data for construction.
The Android software was designed for the hardware structure of the acquisition system, which monitored and controlled the operation and status of the acquisition system. Designed in the published article "Development of high-precision distributed wirelessmicroseismic acquisition stations", then a brief introduction to its structure.

Architecture of the acquisition system 5
The main tasks completed by the acquisition system included signal synchronisation, data acquisition, AD conversion and data storage. Fig. 1 shows that the vibrations generated from the operation, production and geological movements are firstly received by a geophone. Next, mechanical vibrations were converted into electrical signals, then inputted into the front-end processing circuit for front-end processing. After the analogue signals are processed by primary filtering and impedance matching in the front-end processing circuit, an amplifier will automatically adjust the amplification factor based on the input 10 signal amplitude. Amplified analogue signals will be further filtered by the filter circuit. Filtered single-ended signals are then converted into differential signals through a differential amplifier, which will then be inputted into an A/D (analogue-to-digital) circuit for conversion. Finally, analogue signals are converted into digital signals, and digital filtering is completed.
The main control unit of the acquisition system consisted of FPGA and CPU (integrated ARM and DSP dual-core processor). 15 FPGA is mainly used for completing multiple tasks that cannot be performed by general-purpose processors: firstly, it is used for allocating and executing any task related to time (e.g. generating the sampling clock, scheduling related strategies and realtime clock); and secondly, it collects the voltage, current, temperature and other information from sensors of the acquisition system and controls the data collection in the acquisition system and data buffering. Finally, it performs wired data communication, GPS information decoding and time synchronisation. The communication between the CPU core controller 20 and Wi-Fi is achieved through the extended USB of the system. The Android platform also uses that module to communicate with the acquisition system and control the upload and local storage backup (SD card) of data. Additionally, the interaction between the system and the external devices was also completed through core controllers, including LED indicators, on/off switch buttons and battery indications.

Construction of the operation network for the acquisition system 25
A poor outdoor environment together with remote station layouts in large areas can cause data transmitting problems.
Accordingly, constructing suitable supported wireless networks is vital in solving the problems and decreasing the difficulty and complexity of collecting field seismic data. Given that most of the construction sites for seismic acquisition are located in field areas with unstable networks, setting up a miniature WLAN in the array is more practical than applying the internet considering the actual construction. Setting up a miniature wireless WLAN in the array is a critical step. The WLAN should 30 have a high and stable transmission efficiency to minimise the negative influence of topography, and should be easily maintained and expanded. This study proposed the following WLAN construction plans based on the transmission layer interfaces provided by the existing distributed wireless microseismic acquisition stations as well as actual applications: The 2.4 GHz WLAN to provide access points and the 5.8 GHz WLAN for remote data transmission were adopted in this plan .
A single acquisition station was connected to a single 2.4 GHz omni-directional AP through the TCP/IP protocol by binding SSID, connecting the MAC address of the device and limiting the number of connected devices. The data were transmitted 5 from the network cable to the 5.8 GHz directional antenna, then to the hub station AP through directional transmission. Whilst the 2.4 GHz wireless signal was largely affected by atmospheric attenuation, the 5.8 GHz WLAN proved to have a higher data transmission rate and a greater signal radiation distance under the same transmitting power of the directional antenna. The WLAN constructed in this manner had a clear network topology, and can easily be maintained.

Android platform
Android is a free and open-source Linux-based operating system mainly used for mobile devices, such as smartphones and tablets. The Android system architecture has employed a layered architecture composed of four layers. The layers from top to bottom are the application layer, Android framework, Android runtime and Linux kernel. Android 9.0 is the latest version.

Software demand analysis 15
(1) The software should have visualised layouts (i.e. custom maps) to display the specific location of the arranged wireless microseismic acquisition stations on the map based on the field construction requirements. In addition, offline maps are required to ensure the normal use of the software when network connection is unavailable outdoors.
(2) During the station distribution, the relative distance and the angle between the acquisition and host stations as well as the communication status of the WLAN must be checked. 20 (3) The parameters and status of all acquisition stations in the current network should be configured and controlled through an Android mobile device upon the completion of the station distribution.
(4) After the acquisition stations start collecting data, the software should be able to monitor the status of the acquisition station, including the temperature, power, remaining storage space and the number of satellites connected to the GPS to help operators monitor the acquisition stations. 25 (5) The software should achieve real-time data collection from the acquisition stations, which can be displayed in multi-channel waveforms to observe the real-time acquisition.

Software architecture design
According to the demand analyses in Section 3.2, the Android software should be equipped with WLAN access and communication, control, monitoring, real-time position, waveform display, data storage and other functions of the multiple 30 distributed wireless microseismic acquisition stations in the WLAN. Additionally, it should be utilised to obtain the location and the network status of the Android mobile device where the software is installed. Fig.2 shows the designed software architecture interface.
The software design follows the MVP software design pattern, where MVP stands for model, view and presenter. The MVP 5 has evolved from the MVC pattern, which is short for model, view and controller. The presentation logic and the business logic are separated in the MVP to reduce coupling. In a traditional MVP architecture, the model layer is used for business logic and solid modelling. The view layer is an interface displaying an updated view to the user and receiving the data inputted by the user. The presenter layer is used to separate the model and view layers and reference through the interfaces of the view and the model. It also loads data and updates UI. Business logic is performed by the interfaces in the presenter layer. In the 10 traditional pattern, the system is packed with implementation classes and interfaces when processing simple requests. The view layer is rarely modified in the actual project. Many bugs of business logic must be fixed during programme upgrade and iteration. Therefore, in the MVP officially defined by ©Google, logic processing has been added to the presenter layer such that the model layer has less functions and only provides data models. In the MVP pattern, the implementation classes of the view layer, such as activity and fragment, are responsible for processing the life cycle of the presenter layer, avoiding the 15 storage leakage of activity. Activity does not process specific business logic. The interfaces in the presenter make it easier to conduct unit tests. The MVP pattern can generally offer a lower coupling in programming, a clearer software structure and improvement in code flexibility and maintainability.
A framework with a single activity and multiple fragments in the MVP pattern was adopted. Whilst the framework has a clear 20 logic with one activity on one page, the activity may put pressure on the loading of the mobile device. The system is also more likely to slow down and freeze because of frequent jumps, resulting in a poor immersive experience for users. On the contrary, the framework with a single activity and multiple fragments can reduce the amount of codes whilst ensuring a clear logic to decrease the difficulty in interacting among different interfaces. Moreover, the transition of pages when swiping smoothly can enhance the fluency of the software and immersive experience for users. 25 Fig. 3 shows the main process designed for the Android software. After connecting into the established WLAN, the connection and the communication of the Android mobile device will be conducted by accessing the static IP addresses of a single or multiple acquisition station(s) in the WLAN. Station-searching broadcast packets will be sent to the broadcast address in the WLAN through the UDP protocol in the software. Alternatively, the packets can be sent to a series of consecutive static IP 30 addresses in loops. In the defined protocol, the acquisition station(s) will send addresses to the broadcast packets to respond to the status packets and obtain the position and status of all acquisition stations in the WLAN. Finally, real-time data interaction and work status control will be completed by establishing the TCP/IP connections with all the acquisition stations.

Development environment for the Android programme
The Android software was written in Java with Android Studio. The API level for the Android SDK packages was 26, and the version strings in JDK 8 were 1.8.0. Meanwhile, BlackBerry Priv (Android 6.0) and Samsung S3 (Android 7.1) with a 3.0.1 base kernel were used for testing and running the software. 5 We solve these problems by replacing unsigned data types with high-precision data types and data types with the same 25 byte or shifting byte array in the process of converting the structure and the class. (4) Real-time data imaging technology: this software uses MPAndroidChart, which is a third-party open source charting library, to receive real-time imaging data. MPAndroidChart can display different types of images, such as polylines, scatter and histograms, with X-/Y-axis scaling and a customised outlook. The X-and Y-axis data sets will be generated once the real-5 time data are received from the blocking array. They will then be transferred to the line chart control unit in the MPAndroidChart to achieve data imaging in real time.

Specific functions of the Android software
The software can be installed on mobile phones with an Android 4.0 or above OS and can self-adapt to the screen size.
WIFIFragment will be loaded first and displayed on the first page. The main functions include online/offline custom maps, 10 layouts, control, status monitoring, data imaging and parameter settings of the acquisition stations. (4) Setting of the acquisition parameters: each channel gain of the target acquisition station must be set. The acquisition station will be controlled to start collecting data after setting the relevant parameters. The set parameters and command packet will be sent to the acquisition stations. Assuming that the acquisition parameters are set after the start of the data acquisition, 25 the setting will be dispatched before the next start of data acquisition.
(5) Real-time data imaging: the software can analyse the multi-channel data returned by real-time transmission from the target acquisition station and visualise the data in waveforms (Fig. 5). The channel can be selected on the waveform page. This test aimed to measure the blasting location and the range affected by the blasting in the previously designed acquisition stations. Sixteen microseismic acquisition systems were used in the test to conduct real-time data acquisition, data recording and post-monitoring analysis. The acquisition system was a 24-bit AD acquisition system with a sampling rate of 1 kHz and a dynamic range of 137 dB. After measurement and calculation, the acquisition accuracy of the acquisition station can reach 5 0.5μV.
According to the data collected by the collection station, the processor is used to process and detect the collected data, and the picked up vibration events are counted in a histogram. The horizontal axis of the microseismic time-frequency diagram is the monitoring time and the vertical axis is The number of micro earthquakes per unit time. As can be seen from the above figure, 10 in the time course, the microseismic distribution can be divided into three clusters. The frequency of microseismic rupture is low, indicating that there is a rupture process; the frequency of microseismic events during the process of fracture extension, sanding and shut-in Lower, fracturing construction is smooth. According to the data processing and calculation of the central station, the geophysical data can be used to invert the original 20 fracture trend map and three-dimensional fracture map of underground fractures (as shown in Fig. 9).
According to the experimental data analysis, the acquisition system can complete the exploration task very well under the Android software monitoring. The acquisition system can properly collect data and run stably. The positions of the seismic sources and the induced seisms were obtained through the experimental data inversion. Ultimately, the degree and the trend of 25 the fracture fission were calculated.

Conclusion
The distribution of stations and the status of data monitoring in the large-scale construction of field seismic data collection were studied herein. A microseismic acquisition system was designed for application to complex outdoor environments. Based on that, this study introduced software for the distribution and monitoring of distributed wireless microseismic acquisition 30 stations based on the Android platform. The software combined UDP and TCP/IP to achieve data communication and monitoring with the acquisition stations. This study also provided solutions to the incompatibility between different programming languages in the current communication protocol. Visualised station layout and real-time data imaging were accomplished using third-party libraries. All construction processes, including station layouts, data acquisition and monitoring of the acquisition stations, were precisely designed. After many outdoor experiments, the software was proven to be easy to use with a simple operation. It had a stable performance and exhibited smooth runs. The software can make the operators' lives easier and can also reduce the workload of data observers at the host station. Construction workers can collect construction 5 data in any area covered with WLAN by using only an Android mobile device, rather than monitoring the status of the acquisition station at a fixed position with a computer/laptop. In this way, the outdoor workload of an operator can be significantly reduced. These results indicate that the software has a great value for future applications and marketing promotions. The outdoor tests obtained positive data and accurate test results, as expected. This study has laid a foundation for the implementation of the acquisition system in future mining explorations. 10