We should optimize the location of nucleic acid testing institutions, consider the actual situation, and carry out differentiated management for high-risk and low-risk nucleic acid testing according to the needs of epidemic prevention and control. Based on the coverage model, the optimization model of nucleic acid detection and location of nucleic acid collection points is established with the objective of minimizing the social cost of emergency, and lingo and CPLEX tools are used to optimize the solution. The feasibility of the model is verified by an example.