In the era of digital economy, the optimization of resource allocation efficiency has become a key factor for high-quality economic development. Traditional resource allocation methods are difficult to meet the development needs of emerging industries, and data analysis algorithms provide new ideas for optimizing allocation. In this study, you use the data envelopment analysis method to measure the allocation efficiency of science and technology resources in China, and explore the development path of the integration of the digital economy and the real economy based on the fuzzy set qualitative comparative analysis. The study constructed an index system for measuring the efficiency of S&T resource allocation containing two primary indicators, four secondary indicators and six tertiary indicators, and used the DEA-BCC model and DEA-Malmquist model for empirical analysis. The results show that China’s S&T resource allocation efficiency as a whole shows an upward trend during 2016-2022, and the average value of the total factor productivity index is 1.074; among the eight economic zones, the Great Northwest Comprehensive Economic Zone has the highest S&T resource allocation efficiency, and the total factor productivity index reaches 1.14; among the 30 provinces, except for Yunnan, Tianjin, and Hainan, S&T resource allocation efficiency of the other 27 provinces is on an upward trend. Based on fsQCA method analysis, it is found that data factor marketization, digital human capital and financial support are necessary conditions for high level of digital-real integration development, and two high level digital-real integration development paths, digital environment-industry-driven under the domination of digital resources and two-way domination of digital manpowermarket demand, are identified. The conclusions of the study have important reference value for promoting the deep integration of China’s digital economy and real economy, optimizing the efficiency of S&T resource allocation, and providing scientific basis for the formulation of relevant policies.