| Grain is the material basis for human’s survival. The safekeeping of grain is a very important issue related to not only the sustainable development of our country economy but also social harmony and stability. Because of unsafe and unreliable grain storage and other reasons, the annual grain loss accounts for a large proportion of the total grain yield. In this circumstance, it is very necessary to improve grain storage environment and improve grain storage capacity. The position of the traditional grain situation monitoring equipment is usually fixed, and the lack of flexibility and mobility leads to the result that users can not obtain the granary information in any time and any place. In order to solve the problem, the portable monitoring terminal emerges as the times require. However, at present the portable handhold terminal has the problems which include the limited storage capacity, poor visualization, and it needs specific hardware support and so on, the research and development costs is higher, and it is very difficult to spread.With the 4G high-speed communication network will gradually cover, Android intelligent mobile phone and application software is gradually becoming widespread, it also provides a new way for the development of handhold monitoring terminal. In view of these shortcomings of the existing portable monitoring terminal in grain situation monitoring system, so this thesis is based on cloud platform server of grain situation monitoring system framework, and uses Netty network communication Application Programming Interface (API) development technology, Google Protocol Buffer data format conversion technology, multi-thread communication technology and so on, so it designs an Android grain situation monitoring client. The main research work of this thesis is as follows:(1)It is based on the network communication framework of Netty, uses Netty network communication API development technology and designs the communication mechanism between Android client and the cloud platform server, it uses Transmission Control Protocol(TCP) network data transmission mode and realizes the reliable data transmission between the Android client and the cloud platform server.(2)Because the language used in the cloud platform server software development is different from language used in Android development, so this will lead to the instability of data transmission. In order to solve the problem, according to the advantage of Protocol Buffer Google data format conversion technology, in the Netty framework, six interactive messages are defined for communication with the cloud platform server. This message structure has the advantage of smaller occupying space, faster memory rate and higher efficiency.(3)Function design of modulation is conducive to the stability of software operation. It adopts Model View Controller(MVC) design pattern and separates data processing function from interface function. The method can reduce the degree of coupling between the application, improve the development efficiency and is easy to maintain and upgrade software between applications.The Android grain situation monitoring client which this thesis designs has basic functions of grain situation monitoring system which includes the user login function module, the warehouse selection function module, real-time temperature measurement function module, data display function module, historical data query function module. The Android client’s interface is friendly and humanization, the operation is simple and efficient and the function is rich and full. So users can monitor the grain situation by carrying it with themselves at any moment and everywhere. Through the practical application, the effect is very good. |