The goal of this article is to provide a novel and creative performance experience by developing a music structure and beat recognition model, designing a social entertainment robot music performance system, and achieving collaborative music performance between robots and humans. Research on using edge detection algorithms to partition music structures and determine the beat and rhythm changes of music. Using machine learning algorithms to recognize and classify music beats to adapt to different music styles and rhythms. By utilizing Generative Adversarial Networks (GANs), dance segments that conform to musical beats and rhythms were generated and combined with musical performances. In order to ensure the accuracy and smoothness of music performance, various sensors were integrated to monitor the robot's posture and motion status in real-time. After experimental verification, by integrating technologies such as music recognition, dance generation, and sensor data control, collaborative performance between robots and humans can be achieved. Research has shown that close collaboration between robots and performers can be achieved, resulting in collaborative performance. This not only improves the quality and effectiveness of music performance, but also increases entertainment and interactivity, bringing users a richer and more interesting music entertainment experience.