Identifying inter-well connectivity is crucial for optimizing reservoir development and facilitating informed adjustments. While current engineering methods are effective, they are often prohibitively expensive due to the complex nature of reservoir conditions. In contrast, methods that utilize historical production data to identify inter-well connectivity offer faster and more cost-effective alternatives. However, when faced with incomplete dynamic data—such as long-term shut-ins and data gaps—these methods may yield substantial errors in correlation results. To address this issue, we have developed an unsupervised machine learning algorithm that integrates sparse inverse covariance estimation with affinity propagation clustering to map and analyze dynamic oil field data. This methodology enables the extraction of inter-well topological structures, facilitating the automatic clustering of producers and the quantitative identification of connectivity between injectors and producers. To mitigate errors associated with sparse production data, our approach employs sparse inverse covariance estimation for preprocessing the production performance data of the wells. This preprocessing step enhances the robustness and accuracy of subsequent clustering and connectivity analyses. The algorithm’s stability and reliability were rigorously evaluated using long-term tracer test results from a test block in an actual reservoir, covering a span of over a decade. The results of the algorithm were compared with those of the tracer test to evaluate its accuracy, precision rate, recall rate, and correlation. The clustering results indicate that wells with similar characteristics and production systems are automatically grouped into distinct clusters, reflecting the underlying geological understanding. The algorithm successfully divided the test block into four macro-regions, consistent with geological interpretations. Furthermore, the algorithm effectively identified the inter-well connectivity between injectors and producers, with connectivity magnitudes aligning closely with actual tracer test data. Overall, the algorithm achieved a precision rate of 79.17%, a recall rate of 90.48%, and an accuracy of 91.07%. This congruence validates the algorithm’s effectiveness in the quantitative analysis of inter-well connectivity and demonstrates significant potential for enhancing the accuracy and efficiency of inter-well connectivity identification.