In order to find the optimal solution of task partitioning for data flow graph of cryptography algorithm based on reconfigurable logical array, a task partition algorithm ACP based on ant colony algorithm is proposed.The algorithm first improves the cluster partition algorithm according to the hardware structure of reconfigurable array. On the basis of the ant colony algorithm, many ants in the ant colony algorithm are used to traverse the nodes in the data flow graph, and the number of divided blocks and the cost of inter-cluster communication are used as cost functions to continuously optimize the initialized pheromone concentration matrix and improve the algorithm. The experimental results show that the algorithm has the ability to obtain the optimal solution more quickly and stably than the CBP algorithm and the LSCBP algorithm.