Publish/subscribe auto-discovery mechanism is the core technology of data distribution service (DDS), which has become a hot research topic in recent years. This existing auto-discovery algorithm, which is based on simple discovery protocol (SDP), has the problems of the participant DATA information artificially limited by the number of retransmissions, retransmission time randomness and higher network data transmission amount. This paper designs a process of automatic discovery of publish/subscribe state machine model and proposes an improved automatic discovery algorithm. The experimental results show that the algorithm can effectively eliminate the limitation and randomness of the resending DATA information packets, as well as reduce the amount of network data transmission.