在以安卓机顶盒为采集端的家庭视频监控系统中,分析了采集端与服务器的交互过程,针对安卓平台的特点,设计了安卓采集端的总体通信框架.运用Java反射和JNI等技术,构建了分工明确的多层通信结构体系,层间耦合度低,协调工作效率高,降低了开发和维护难度.同时,在C/C++层为采集端和服务器之间的通信帧设计了合理的组帧协议,使各种交互信息能够被快速传递和处理.%This paper begins with an analysis of the interactive processes between capture module and server in the home video surveillance system,in which Android set-top box is token as capture module.Then a communication framework according to the characteristics of the Android platform is presented.In this communication framework,multi-layer structures are designed by using Java reflection,JNI and other technologies.These layers are designed for low coupling,clear division of labor,coordination work to improve efficiency and reduce difficulties of development and maintenance.Meanwhile,the communication frame protocol between capture module and server is proposed to enable a variety of interactive information can be quickly transmitted and processed inC/C + + layer.
展开▼