We present a general algebraic framework to define the design criteria of linear functions for linear physical layer network coding (LPNC) over a new network topology, called the dense cooperative wireless cloud network. This network topology employs massively interacting distributed nodes to assist data transmission, which naturally forms a multi-source, multi-hop and multi-relay network structure. We prove two theorems and address the design criteria, which are considered to be the key theoretical basis for real implementation. The proposed work is applicable to a general multihop wireless network, and suitable for linear operations over a commutative ring. We also compare and discuss the simulation results based on the design criteria.