The present application relates to an execution method and electronic device of a meta-
heuristic algorithm based on GPU 
parallel computing, and belongs to the technical field of optimization algorithms. The execution method of the present application includes allocating an independent 
graphics card memory space for each 
ant and 
decoy in the 
algorithm, and initializing parameters  Pass it into the GPU; compare and evaluate the 
decoy position based on iterations in the GPU. When the number of iterations reaches the maximum number of iterations, copy the positional parameters of the 
decoy with the best position from the 
video memory of the 
graphics card to the memory, release the 
video memory space of the 
graphics card, and output the result  ; wherein, in each iteration of the 
comparative evaluation of the bait position, including: parallel calculation of the objective function value of each 
ant and each bait about the position parameter, according to the comparison of the objective function value, update the position of the bait, and compare and determine the position  The best bait; calculate the position of each 
ant parade after selecting the target bait in parallel, and update the position of the ant.  The technical solution of the present application is beneficial to meet the real-time requirements in applications.