Implicit discourse relation recognition (IDRR) still faces challenges in achieving high accuracy compared to explicit discourse relation recognition. Many existing approaches attempt to combine explicit and implicit data. However, language differences and variations in category distribution make it challenging to use multitask learning to directly optimize IDRR task. This paper considers explicit data as out-of-domain data and implicit data as in-domain data, proposed a shared-private-based framework with dynamic dependency matching (SPDDM) for IDRR task. This framework explores the deep-level syntactic correlation between explicit and implicit data by encoding dependency grammar information through cross-attention mechanism and confuse it to shared-private framework through dynamic matching . Extensive experiments on the popular PDTB datasets show that our model achieves state-of-the-art performance, and a detailed analysis highlights the efficiency of our proposed framework.