Retrieving music information is indispensable and divided into multiple genres. Music genres can be attributed to set categories, which are the indispensable functions of intelligent music recommendation systems. To improve the effect of music genre classification and model construction, combined with the music genre classification algorithm, this paper combines the multihead attention mechanism to study the music genre classification algorithm model, and it analyzes the key technology of music beamforming. Moreover, this paper has made a detailed description and derivation of the array antenna model, the principle of music beamforming, and the performance evaluation criteria of music adaptive beamforming. In the second half, the nonblind classical LMS algorithm, RLS algorithm, and variable step size LMS algorithm of adaptive beamforming are studied in detail. A music genre classification algorithm model based on the multihead attention mechanism is constructed. It can be seen from the experimental research that the music genre classification algorithm based on the multihead attention mechanism proposed in this paper has obvious advantages compared with the traditional algorithm, and it has a certain role in music genre classification.