Aiming at the shortcomings of the sparrow search algorithm, such as it is easy to fall into local optimum and unable to solve discrete optimization problems, an improved discrete sparrow search algorithm is proposed. Firstly, the position update formula of the original sparrow search algorithm is abstracted, a new discrete heuristic position update strategy is designed according to the different identities of individuals, and the encoding and decoding methods are designed for the hybrid flow shop scheduling problem; Secondly, the rough data-deduction theory is introduced, and the feasibility and rationality of the above theory are explained by mathematical proofs, which provides theoretical support for the algorithm and improves the interpretability; Then, the nature of upper approximation is adopted to expand the search space, improve the population diversity, avoid prematurity of the algorithm, combine division and rough data-deduction to propose three strategies to promote information sharing among populations, regulate the exploitation ability and exploration ability of populations, and reduce the probability of the algorithm falling into local optimum; Finally, the improved discrete sparrow search algorithm is used to solve the hybrid flow shop scheduling problem. Simulation experiments are carried out on three small-scale practical examples and Liao's classic test set to verify the feasibility of the improved discrete sparrow search algorithm to solve the hybrid flow shop scheduling problem, and to prove the superiority of the proposed algorithm and the effectiveness of the improved strategy through comparison experiments with other algorithms.