To realize reasonable allocation and scheduling of mobile user task requests under cloud and fog collaboration, a task assignment algorithm based on cloud-fog collaboration model, named IGA (Improved Genetic Algorithm), was proposed. Firstly, individuals were coded in the way of mixed coding, and initial population was generated randomly. Secondly, the objective function was set as the cost of service providers. Then select, cross, and mutate were used to produce new qualified individuals. Finally, the request type in a chromosome was assigned to the corresponding resource node and iteration counter was updated until the iteration was completed. The simulation results show that compared with traditional cloud model, cloud-frog collaboration model reduces the time delay by nearly 30 seconds, reduces Service Level Objective (SLO) violation rate by nearly 10%, and reduces the cost of service providers.