Deep packet inspection (DPI) is a key technology in software defined network (SDN) which can centralize network policy control and accelerate packet transmission. In this paper, we propose a new SDN architecture with DPI module. Base on the centralization idea of SDN, we deploying a parallel DPI to the control layer. We present DPI interface in the SDN controller and discuss OpenFlow protocol extension. Paralleling the DPI algorithm effectively reduces the time of detecting packets and sending flow tables. We also describe an Adaptive Highest Random Weight with an additional feedback corresponding to queue length and string length matching at each processor. The original Highest Random Weight (HRW) hash ensures the connection locality. Treating all tasks as the same weight just balances the workload over the number of different task. By adding the adjustment multiplier and combined with the characteristics of the fixed hash function, the system can allocate resource dynamically and achieve connection-level parallelism in consideration of the processing time for per packet.