For problem of complex configuration, needing to change firewall or net brake setting existing in OPC data integration mode based on DCOM configuration, a data interaction middleware based on OPC UA was designed, and structure and function of the middleware were introduced. The middleware realizes plug and play, and can achieve security data interaction with OPC server across firewall/net brake by simple configuration, which can be applied to data integration of OPC server of most coal mine automation subsystems.