The invention provides a particle swarm algorithm based on an artificial intelligence semi-supervised clustering target, and the algorithm comprises the steps: S1, inputting a data set, and randomly selecting K elements as a clustering center; S2, updating the clustering center, calculating the self-adaptive quantity of the current K value, comparing the self-adaptive quantity with the previous self-adaptive quantity, and retaining the K value with higher self-adaptive quantity; S3, repeatedly executing the step S1S2 until the optimal K clustering centers are obtained; S4, encoding and initializing the particles according to the optimal K clustering centers to obtain individual optimal and global optimal solutions; S5, performing dynamic clustering on the particles, obtaining new positionsof the particles and judging whether updating is needed or not; S6, performing immune disturbance and chaotic disturbance processing on the particles; S7, calculating an individual optimal solution and a global optimal solution of the current particle, comparing with the last time, and judging whether to update the individual optimal solution and the global optimal solution or not; S8, repeatingthe step S5 and the step S7, and if the current number of iterations reaches a preset value, exiting the algorithm.