There has been a lot of terrorist attacks on airports and airplanes in the world. To keep all passengers safe during their travel, airport security is known as a time consuming process. Spending a lot of time on security checks makes airline travel expensive both in time and in money. Therefore, it is very beneficial for passengers and airlines to optimize the security process under the premise of ensuring safety. In this paper, we focus on the resource allocation in security scan lane. We build a security flow model by using generalized stochastic Petri nets(GSPN). Then, we expend GSPN by queuing theory to describe the passengers flow in the airport security process. On this basis, we can well simulate the airport passenger flow during the security process. Under the condition of ensuring the security check item unchanged, according to the simulation results, we put forward some suggestions about the optimization of airport security process. On the whole, we put forward the point of combining queuing theory and Petri nets to study work flow, and successfully solved the optimization problem of airport security process.