Numerous optimization variables cause the optimization of large-scale field development challenging, which can be overcome by constraining wells to be within patterns and optimizing the parameters relevant to the pattern type and geometry. In this study, a new method incorporating well pattern optimization and production optimization for unconventional reservoirs is presented. By defining a quantitative well pattern description approach, we develop the geometric transformation parameters to quantify well pattern operations (e.g., rotation, shear, especially translation) to change the geometric shape of well patterns including five-spot, inverse seven-spot and inverse nine-spot well pattern. In contrast, a variety of optimization algorithms can be applied to accomplish the optimization of well pattern problems but the computational cost is large for many algorithms. Therefore, we also propose a general upscaling stochastic approximation algorithm (GUSA), which is an improved approximate perturbation gradient algorithm, to realize the combination of well pattern optimization and production optimization simultaneously. It is proved that both the gradient formulation of SPSA algorithm and EnOpt algorithm are the special form of the general approximate perturbation gradient. Afterwards, the synthetic cases (homogeneous and heterogeneous models) and actual unconventional field cases are discussed based on the three mentioned well pattern types. The detailed optimization results show that the presented coupling method can achieve the optimization by transforming well pattern geometry, reducing the total number of wells and adjusting the field injection rate, which is proved to be effective. In sum, this coupling method provides an efficient optimization procedure combing the well pattern optimization and production optimization for practical field development.