To address the problems of transmission delay, transmission conflicts and low throughput in Wireless sensor networks, this paper proposes a channel allocation and routing strategy in Multi-Radio Multi-Channel Networks. The strategy is to dynamically establish a k-ary n-cube topology. It not only uses the optimal static channel allocation algorithm to improve the throughput of nodes but also employs the dimension order routing algorithm to reduce transmission conflicts. This method is suitable for the network of density nodes with many communication conflicts. It can also be used in both single hop and multi hop network environment. The experiment results show that compared with traditional methods, the channel allocation and routing strategy based on the k-ary n-cube topology can effectively reduce end to end delay, network conflicts and energy consumption, prolong the network lifetime and increase the throughput of network.