Surgical robots have significant research value and clinical significance in the field of percutaneous punctures. There have been numerous studies on ultrasound-guided percutaneous surgical robots; however, addressing the respiratory compensation problem of deep punctures remains a significant obstacle. Herein we propose a robotic system for percutaneous puncture with respiratory compensation. We proposed an online advance respiratory prediction model based on Bidirectional Gate Recurrent Unit (Bi-GRU) for the respiratory prediction requirements of surgical robot systems. By analyzing the main factors governing the accuracy of the respiratory motion prediction models, various parameters of the online advance prediction model were optimized. Subsequently, we integrated and developed ultrasound-guided percutaneous puncture robot software and a hardware platform to implement respiratory compensation, thus verifying the effectiveness and reliability of various key technologies in the system. The proposed respiratory prediction model has a significantly reduced update time, with an average root mean square error (RMSE) of less than 0.4mm. This represents a reduction of ~ 20% compared to the online training long short-term memory(LSTM). By conducting puncture experiments based on a respiratory phantom, the average puncture error was 2.71 ± 0.65mm and the average single-round puncture time was 65.00 ± 6.67s. Herein we proposed and optimized an online training respiratory prediction network model based on Bi-GRU. The stability and reliability of this system are verified by conducting puncture experiments on a respiratory phantom.