Aiming at the problem of the imbalance between the exploration and development capabilities of the Harris hawk optimization algorithm(HHO), a multi-subgroup square neighborhood topology is set up to guide individuals in each subgroup to forage randomly in both directions. In order to avoid local optima, a fixed replacement probability is set to strengthen the information exchange of each subgroup individual, so that the individuals in the subgroup can be replaced with the corresponding individuals of other subgroups according to the random array. Within the subgroup, the operator selection in the HHO algorithm is performed based on historical evolution information to make better use of the information in the existing problem domain. Cross-document comparisons are made using variable-dimensional benchmark functions with various intelligent optimization algorithms and their improved methods. The results show that the improved method is significantly higher than the original algorithm and comparative literature in terms of convergence accuracy and optimization capability, and has better robustness, which is suitable for generalization to actual optimization problems.