Impact of digital economy on ecological resilience of resource-based cities: spatial spillover and mechanism

Resource-based cities, which are widely distributed in China, contribute significantly to China’s sustainable development. The digital economy and the construction of ecological civilization are central issues in the sustainable development of resource-based cities, and it is necessary to analyze the impact of the digital economy on the ecological resilience of resource-based cities. Thus, this paper measures ecological resilience of 117 resource-based cities from 2011 to 2020 using the entropy weight TOPSIS (technique for order preference by similarity to ideal solution; see Table 1 for a list of acronyms) method and empirically investigates the impact and mechanism of digital economy on ecological resilience using the spatial Durbin model (SDM) and intermediary effect model. The results show that the ecological resilience of resource-based cities has a certain upward trend, with a stepwise distribution pattern from east to west. There is a significant positive correlation between ecological resilience of resource-based cities, showing the phenomenon of club convergence which is primarily dominated by high-high (H–H) and low-low (L-L). The digital economy has a significant spatial spillover effect, which promotes ecological resilience of resource-based cities in the local and adjacent regions. A mechanism analysis reveals that technological innovation and industrial structure are mediators between digital economy and ecological resilience of resource-based cities, with significant heterogeneity in region and growth cycle. Among them, the intermediary role of technological innovation is stronger. Following the above findings, this paper proposes policy suggestions related to digital economy evolution and ecological resilience enhancement. This paper further enriches the literature on the ecological resilience and provides a theoretical basis for government policy-making.


Introduction
Ecological resilience is gaining significance in today's rapidly changing world as a key pathway to adaptive capacity, as the biosphere and its components are increasingly exposed to a world exceeding the millennial historical range of variation (Falk et al. 2019). Ecological resilience is an important tool for cities in deal with environmental change and achieving sustainable development. The National People's Congress, 14th Five-Year Plan and long-term targets for 2035 of China released in March 2021, aims to strengthen ecological environmental awareness and promote new urban construction, all while aiming to build a digital China and accelerate digital development. In the face of environmental changes, cities need abilities to restore and protect their ecosystems and promote sustainable development (Davidson et al. 2019). Therefore, ecological resilience is a new entry point for the construction of new urbanization.
Cities consume 80% of resources and are important sources of pollution. Resource-based cities are cities dominated by the exploitation and processing of natural resources such as minerals and forests in the region (Martinez-Fernandez et al. 2012). In 2013, 262 resource-based cities were identified by the China's Sustainable Development Plan of National Resource-based Cities, 2013-2020 (CSDP) based on resource reserves and the exploitation and utilization Responsible Editor: by Baojing Gu conditions, and they were classified into four categories: mature, growing, declining, and regenerating (Ruan et al. 2020). The situation of those in prefecture-level cities accounts for nearly 45% of the total quantity of the same administrative-level cities in China (He et al. 2017); this percentage illustrates enhancing ecological resilience of these cities is vital to achieve or realize new urbanization and China's overall sustainable development. However, the rough development pattern of high energy consumption and high emissions has been utilized by resource-based cities for a long time, leading to excessive carbon emissions and a persistent economic downturn . Therefore, there is still much to be done in terms of building urbanism that is focused on ecological restoration.
Digital economy has a positive effect on optimizing the industrial structure, improving the utilization rate of resources, and promoting the evolution of ecological civilization (Yuan et al. 2022). Digital economy was first proposed by Tapscott who defined the digital economy as an economic system that widely uses information and communication technology (ICT) (Tapscott 1996). Bureau of Economic Analysis (BEA) believes that the digital economy includes the digital infrastructure, e-commerce and digital media required for the existence and operation of computer networks (Barefoot et al. 2018). In general, the digital economy is an economic activity based on modern information technologies such as the Internet. It can support high-quality urban development (Wu et al. 2020) and promote urban sustainability (Khan et al. 2021).
Resilience originates from physics, which describes the ability of a system to withstand, adapt to, and rapidly recover from external shocks (Rutter 1993). The study of resilience has expanded from ecology to social (Keck and Sakdapolrak 2013), economic (Simmie and Martin 2010), and other fields since Holling introduced it into ecology in 1973 (Holling 1973). It has also been applied to urban ecosystems (Ribeiro et al. 2019). The concept of ecological resilience has formed a preliminary consensus in academia, which refers to the ability of the urban environment to self-organize and coordinate, to adapt, and withstand stress in response to dangers (Dakos and Kéfi 2022), as well as to recover from disasters (Gunderson 2000). In terms of ecological resilience measurement and influencing factors, scholars evaluate ecological resilience of the Pearl River Delta region (Wang et al. 2022a, b, c, d), Nepal (Zhang et al. 2020a, b), Ecuador (Ruiz-Ballesteros 2011), and other regions, as well as its spatial-temporal evolution patterns, primarily using the extreme entropy weight method, landscape ecological pattern method, factor evaluation method, and principal component analysis method. Additionally, some scholars simulate the factors using SWMM and ENVI-met to ascertain the extent to which each factor affects ecological resilience. Ecological resilience is essentially the ability to adapt to and recover from shocks; it focuses on both the construction of new urbanization and ecological civilization (Mehryar et al. 2022).
There is no doubt that the digital economy is having a vital impact on resource-based cities. As the digital economy is in a short period of development, ecological resilience is still at an initial stage; there are few literatures on digital economy and ecological resilience. A robust economic structure is required for the development of ecological resilience. The digital economy, which is controlled by data resources, promotes the intensification of production mode and the online transformation of lifestyle, improves energy efficiency, and lowers SO 2 and PM2.5 emissions by releasing the driving force of innovation (Sui and Rejeski 2002). In terms of intensification of production mode, digital economy stimulates green development by optimizing the traditional financial structure and exerting the catfish effect (Li et al. 2021a, b, c). In terms of the online transformation of lifestyle, digital economy, which relies on the growth of smart devices, breaks through the constraints of physical distance, reduces service costs, and closes the ecological gap (Song et al. 2022). Overall, digital economy can improve the environment, whether digital economy can effectively enhance ecological resilience of resource-based cities, break the "resource curse" phenomenon, and achieve sustainable development deserves in-depth analysis. What causes this? Is there geographic and growthstage heterogeneity in this link? The theory of spatial economics shows that economic agglomeration can produce spillover effects, increase productivity, and improve living standards (Behrens and Robert-Nicoud 2014). Therefore, whether the sustainable development of resource-based cities driven by the digital economy can bring positive spatial spillover effects to other resource-based cities is the focus of this paper. Answering the above questions is helpful not only to expound on the evolution characteristics of ecological resilience but also to identify the internal relationship between digital economy and ecological resilience to provide policy basis for the sustainable development of resource-based cities.
Therefore, this paper uses the panel data of resource-based cities from 2011 to 2020 to measure ecological resilience with the entropy weight technique for order preference by similarity to ideal solution (TOPSIS) method, explores the direct effect and spatial spillover effect of digital economy on ecological resilience of resource-based cities, deconstructs the mechanism of the effect of digital economy on ecological resilience of resource-based cities from the perspective of technological innovation and industrial structure, and discusses the heterogeneity of mechanism in resource-based cities of different geography and growth cycles. The contributions of this paper lie in the following: First, the existing literature on ecological resilience mostly focuses on a certain area, and there will be errors in the data at the provincial level. There are few analyses based on prefecture-level cities and lack of inter-regional comparisons. Therefore, this paper measures the ecological resilience of resource-based cities and summarizes its temporal and spatial evolution characteristics. Second, the existing literature does not take into account the spatial impact, ignoring the spatial impact that will weaken the role of influencing factors. Therefore, based on the new economic geography theory, this paper introduces the spatial Durbin model (SDM) model to examine the influencing factors of ecological resilience and provide policy basis for sustainable development. Thirdly, few literatures consider the impact mechanism of digital economy on the ecological resilience of resource-based cities. Therefore, this paper incorporates technological innovation and industrial structure into the analysis framework and analyzes the impact mechanism of digital economy on the ecological resilience of resourcebased cities by promoting industrial structure and technological innovation to uncover the black box of these mechanisms.
The remainder of this paper is arranged as follows: The "Literature review and research hypotheses" section presents the related literature review and research hypotheses. The "Methods" section introduces methods. The "Results and discussion" discusses the empirical results. The last section concludes and offers policy suggestions.

Literature review and research hypotheses
At present, the theory of ecological environment mainly has the following points. The comprehensive effect theory holds that the impact of economy on the environment depends on the sum of structural effect, scale effect, and technical effect. The theory of environmental cost transfer (Liu et al. 2018) holds that developed countries can transfer pollutants to developing countries through free trade and ultimately improve the quality of their ecological environment. The theory of environmental demand elasticity (McConnell 1997) holds that with the increase of income level, people have higher and higher requirements for the environment and even sacrifice economic interests to improve environmental quality. The environmental Kuznets curve hypothesis (Kaika and Zervas 2013) holds that the impact of economy on the environment presents an inverted U-shaped relationship. Some scholars question the scientific nature of this hypothesis (Luzzati and Orsini 2009) and believe that the impact of economy on the environment is one-way positive, which we also believe.
In resource-based cities, continuous industry development is slow, the comprehensive resource utilization rate is poor, the problem of green deficiency is still serious, the contradiction between economic growth and environmental protection is still prominent, and ecological resilience is weakened. Digital economy is an economic model that uses digital information and knowledge to quickly optimize resource allocation and achieve superior economic development. Digital economy has gradually become the main driving force of China's national economic development and has played a positive role in enhancing ecological resilience. On the one hand, the development of the digital economy has made it easier to obtain and analyze ecologically relevant data of resource-based cities such as water resources, the atmosphere, and noise in real time, and easier to simulate the effects of ecological environment governance of resource-based cities, improving the level of ecological management and controlling and reducing haze pollution of resource-based cities (Li et al. 2021a, b, c). It is also convenient to take reasonable measures to improve ecological resilience of resource-based cities in the event of unfavorable environmental conditions. On the other hand, digital economy relied on the development of information technologies like "cloud computing" and "artificial intelligence," which uses wider and faster communication channels to achieve a more effective knowledge diffusion effect, which can significantly improve the efficiency of knowledge dissemination (Tan et al. 2017) of resource-based cities. And it further encourages the transformation of social development quality and efficiency by increasing the stock of knowledge in society (Pan et al. 2022), which constantly modifies the traditional production mode of resource-based cities and accelerates the intensive transformation of production mode of resource-based cities to improve ecological resilience of resource-based cities ultimately (Gay et al. 2005). Thus, this leads to the following hypothesis: Hypothesis 1: Digital economy improves ecological resilience of resource-based cities.
Scholars have conducted extensive research on the spatial spillover effects of pilot cities. The pilot policy of innovative cities in China has formed the agglomeration effect of factors, which has promoted the regional economic growth of innovative cities. The knowledge spillover and technological externality in the process of innovation in central cities also promote the economic growth of node cities around central cities (Hu et al. 2021). The traditional spatial weight matrix assumes that there are stronger spatial connections and spillover effects in areas with close spatial distance or geographical proximity, but the improvement of innovation infrastructure and the implementation of innovation policies can break through the geographical distance and release the innovation effect (Li and Wang 2020). And there are close industrial trade links in the same type of city, and there are similarities in system, culture, and values formed by longterm cooperation (Wen and Jia 2022), which facilitates the free flow of resources, such as talents, information, and funds between cities, and promotes the diffusion and spillover of resources within the resource-based cities. In addition, the basis of inter-city communication is the provincial level. Urban groups can weaken the restrictions of provincial administrative divisions, build a more realistic innovation spillover network, and reflect the spillover effects between cities. Resource-based cities cover 17 provinces in China and border each other, so there is a spatial impact between resource-based cities (Zhang et al. 2022a, b, c, d). High-tech industries can obtain cross-regional resource elements by virtue of their strong industrial support capabilities and innovative infrastructure, thus breaking through the traditional geographical distance restrictions (Zhang et al. 2022a, b, c, d). The digital economy is based on high-tech industries and has strong diffusivity, which is easy to affect surrounding resource-based cities (Su et al. 2021). The closer the geographical location, the higher the efficiency of factor mobility. Therefore, there is some correlation in the economic development of the neighboring resource-based cities. Thus, this leads to the following hypothesis: Hypothesis 2: Digital economy has spatial spillover effect on ecological resilience of resource-based cities.
The new growth theory believes that technological changes are internal forces and emphasizes knowledge spillover and human capital investment; it can affect economic development (Li and Liu 2021). Technological innovation not only is conducive to economic construction but also brings beneficial environmental effects (Danish and Ulucak 2021), resulting in energy saving and emission reduction of resource-based cities. First, while improving production efficiency, technological innovation promotes the use of clean energy and optimizes the input-output ratio, which means that there are fewer undesirable outputs under the same scale of energy input (Cheng et al. 2021), thereby it can reduce pollutant emissions and promote green and efficient management of resource-based cities. Second, technological innovation promotes green production and manufacturing through the agglomeration of talents and capital, improving systems in internal control, management, and technology (Carraro and Siniscaico 1994) and boosting quality and productivity of resource-based cities. Therefore, enterprises can achieve sustainable development and strengthen ecological resilience of resource-based cities. In addition, resource-based cities have lower resource utilization rates and more pollution-intensive enterprises. In the case of environmental policy uncertainty, pollution-intensive enterprises of resource-based cities will try to seize the opportunity to raise investment to promote technological innovation (Chen and Lei 2018), alleviate environmental pollution, and enhance ecological resilience of resource-based cities.
Digital technology can not only improve the efficiency of traditional industries, but also lead to the development of multi-industry interaction and integration (Kofi Adom et al. 2012), so it can drive the transformation of new industries in resource-based cities and promote the industrial transformation and upgrading of resource-based cities by accelerating the flow of production factors among industrial sectors. In addition, new structural economics thinks that digital economy is a new driving force for economic transformation (Lin et al. 2013), which can promote the transfer of industrial structure from labor-intensive and heavy industry to high-tech and environment-friendly industrial structure in resource-based cities. In the process of industrial structure evolution, due to the obvious changes in the proportion of output and employment between industries, the total output, output structure, and employment structure of each industry will change accordingly (Mi et al. 2015;Zhu et al. 2019), and these changes will directly or indirectly affect the energy consumption structure of resource-based cities and the generation or emission of various pollutants and affect the ecological environment quality of resourcebased cities. Accordingly, this paper's third hypothesis is proposed: Hypothesis 3: Digital economy strengthens ecological resilience of resource-based cities through technological innovation and industrial structure.
Resource-based cities are widely dispersed; the cities in different geographical locations have differences in economic growth and lifestyle. Economic development and lifestyle are closely related to ecological resilience ). In addition, the development of the digital economy is limited by infrastructure construction (Li and Liu 2021), and there are differences in infrastructure construction in resource-based cities in different regions. Therefore, resource-based cities in different regions have different abilities to accept the digital economy. Resource-based cities experience varied economic growth, technological innovation, environmental regulation, and policy guidelines at different stages of resource development, resulting in quite difference in the development stages and problems (Yan et al. 2019).Thus, this leads to the following hypothesis.

Hypothesis 4:
The mediating effect of technological innovation has geographic and growth-stage heterogeneities.
Based on the above theoretical analysis, we get the theoretical framework, shown in Fig. 1.

Spatial autocorrelation model
The spatial autocorrelation model is used to reflect the correlation of ecological resilience of resource-based cities, and the model is divided into global spatial autocorrelation (global Moran's I) and local spatial autocorrelation (local Moran's I). Global Moran's I reflects the overall situation of ecological resilience and judges whether it has spatial correlation characteristics. Local Moran's I reflects the spatial agglomeration of ecological resilience between adjacent areas.
Global Moran's I is shown as follows: Local Moran's I is shown as follows: From Eqs. 1 and 2, S 0 denotes the set of spatial weights; i and i ′ are ecological resilience of city i and city i ′ ; and w ii ′ denotes the geographical adjacent spatial weight matrix of i and i ′ . The value range of spatial correlation of Moran's I index is I ∈ [0, 1] ; the closer to 0, the less obvious the spatial correlation is, and the stronger the randomness of spatial distribution is. When I > 0 and Z[I] > 1.96 (or I < 0, Z[I] < 1.96), the spatial positive correlation (or negative correlation) is significant, and there is a certain agglomeration phenomenon (or diffusion phenomenon).

Spatial econometric model
Spatial econometric models can effectively analyze the spatial effects among elements, especially when there are spatial autocorrelations among the studied elements, and the estimation by spatial econometric models can make the research results more accurate. Considering that the digital economy and ecological resilience of resource-based cities may affect each other, this paper uses spatial econometric models to test the impact of digital economy on ecological resilience of resource-based cities. Spatial econometrics incorporates the spatial weight matrix to examine the spatial correlation between variables. Common spatial econometric models include the spatial error model (SEM), spatial lag model (SLM), and SDM. Hausman test is used to determine whether the model needs to control fixed effects, and the Lagrange multiplier (LM) test is used to select the spatial econometric model. The likelihood ratio (LR) test is used to assess whether to use the fixed effect model or random effect model. The Wald test is used to examine whether the SDM is degraded (Elhorst 2014). (Table 1). As reported in Table 2, LM (lag), robust LM (lag), LM (error), and robust LM (error) rejected the null hypothesis at the significance level of 1%; therefore, both the SEM and SLM can be used for the econometric analysis. Meanwhile, the results of LR-spatial (lag), LR-spatial (error), and Hausman test rejected the null hypothesis at the significance level of 1%, and the space-time fixed effect is finally selected. The Wald (SLM) and Wald (SEM) tests rejected the null hypothesis at the 1% significance level; hence, the two-way fixed SDM model should be established.
The SDM model is based on the spatial autocorrelation model, considering the correlation between the explanatory variable spatial lag term and the explained variable. The model is as follows: From Eq. 3, W denotes the spatial weight matrix, x it denotes the explanatory variables affecting ecological resilience, I it denotes the relevant influencing factors of ecological resilience of adjacent regions, and ′ it denotes random disturbance terms. Regarding the selection of the spatial weight matrix, since spatial dependence is related to the geographic location of resource-based cities, this paper selects the adjacent spatial weight matrix (You and Lv 2018) to indicate that the spatial correlation of ecological resilience between regions weakens as the distance increases.

Mediating effect model
To identify the mechanism of action of digital economy affecting ecological resilience of resource-based cities, a basic model is constructed as follows: (3) According to the above theoretical analysis, the impact of digital economy on ecological resilience of resource-based cities not only has a direct link but also has an indirect effect through technological innovation. In order to further analyze the internal mechanism of digital economy on ecological resilience of resource-based cities, this paper constructs the following mediating effect model: From Eqs. 5 and 6, STTA denotes technological innovation, and the other variables have the same meaning as above. Equation 4 examines the impact of digital economy on ecological resilience of resource-based cities, Eq. 5 examines the impact of digital economy on mediator variable, and Eq. 6 makes mediator variable as an explanatory variable to examine the effects of mediator variable in digital economy and ecological resilience of resource-based cities.

The index of ecological resilience
To build a resilient city is to create an ecologically and economically harmonious urban environment (Holling 1973), focusing on the interaction between human behavior and ecosystems. Ecological resilience has three important performance characteristics, namely defense, responsiveness, and learning capacity (Tao et al. 2022). Based on this, this paper constructs an ecological resilience evaluation system of resource-based cities under the three subsystems of economic development efficiency, inclusive compressive capacity, coordination ability, and recovery ability; the specific indicators are listed in Table 3. Compressive capacity depends on the conditions of the system, coordination ability emphasizes the ability to cope with interference, and recovery ability emphasizes the ability of the system to recover from interference. This paper selects indicators related to ecological resilience from ecological factors such as water resources, land resources, energy factors, and environmental factors (Fang et al. 2017); their numbers are ①-⑫. In addition, the ecosystem also emphasizes the ability of the economic system to resist shocks (Zeng 2020) (its number is ⑬) and the ability to learn (Wang and Niu 2022) (its number is ⑭). Therefore, this paper introduces GDP per capita and share of technology spending to reflect. By using the entropy weight TOP-SIS method (Chen 2019), this paper gauges ecological resilience of resource-based cities from 2011 to 2020.

Core explanatory variables
Based on the method of Li, a comprehensive index system of digital economy is constructed from the perspective of digital finance and digital industry . Among them, digital finance is measured by the Digital Financial Inclusion Index which is regarded as the most important carrier of the future digital economy and mainly measures the availability of digital financial services to all sectors and groups of society. It is calculated by analytic hierarchy process from 33 specific indicators in three dimensions: digital financial coverage breadth, digital financial use depth, and digital degree of inclusive finance. The other part of the indicators is obtained through the evaluation of the digital industry. This indicator is divided into digital industry infrastructure and digital industry economy. Based on the availability of data, the number of Internet users per 100 people, the proportion of computer service and software industry employees, and the number of mobile phone users per 100 people are used to measure the digital industry infrastructure, and the total amount of telecommunication services per capita is used to measure the digital industry economy. The weight of each index is determined by the entropy weight TOPSIS method. Digital economy (DIEC) is measured by the Digital Financial Inclusion Index jointly released by the Peking University Digital Finance Research Center and Ant Financial Group. The index is calculated from the three dimensions of the coverage breadth of digital finance, the depth of use of digital finance, and the degree level of digitalization of inclusive finance, which can accurately describe the development of digital economy.

Selection of control variables
To further measure the effect of digital economy on ecological resilience of resource-based cities, this paper draws on the relevant literature and based on the availability of data, introduces a series of control variables into the model (Heppt et al. 2022;Li et al. 2019;Seker et al. 2015;Wang et al. 2018): ① The proportion of employees in green industry (EMST) is expressed using the logarithm of the proportion of employees in the tertiary industry. ② Financial aggregation (FIAG) is measured by the proportion of non-agricultural output in GDP. ③ Consumption level (COLE) is measured by the total retail sales of social consumer goods. ④ The degree of opening to the outside world (DEOP) is measured by the proportion of foreign direct investment in GDP. ⑤ The urban cultural environment (EDSH) affects ecological resilience to a certain extent, and the logarithm of the number of books per 10,000 population is used to represent EDSH.

Selection of mediator variable
This paper selects technological innovation (STTA ) as mediator variable. The degree of technological innovation is used to measure technological innovation. The current methods for measuring technological innovation are the number of patent applications, the total number of patent grants (including invention patents, utility model patents and design patents) (Adebayo and Kirikkaleli 2021), and the proportion of scientific and technological expenditure in public financial expenditure (Chen and Lee 2020). However, the above data have the problems of lack of time and insufficient time dimension, so this paper uses the authorized number of invention patents per ten thousand persons to measure technological innovation (Jin et al. 2019). This paper selects industrial structure (INST) as mediator variable. The proportion of the tertiary industry reduces pollution and avoids environmental degradation by providing green jobs for the labor force of the secondary industry through pollution control and clean technology research and development. Therefore, INST is measured by the logarithm of the share of the added value of the tertiary sector to GDP (Li and Lin 2014). The main variables are described in Table 4.

Data sources
The data comes from the China Urban Statistical Yearbook, the China Urban Construction Statistical Yearbook, and Digital Financial Inclusion Index jointly released by the Peking University Digital Finance Research Center and Ant Financial Group. According to China's Sustainable Development Plan of National Resource-based Cities, 2013-2020 (CSDP), there are 126 prefecture-level administrative regions in resource-based cities, but the data of individual prefecturelevel cities are seriously missing, such as Aba Tibetan and Qiang Autonomous Prefecture and Liangshan Yi Autonomous Prefecture. Considering the consistency of statistical caliber and the availability of data, this paper selects the panel data of 117 resource-based cities from 2011 to 2020 for empirical analysis, and some missing values are collected and supplemented through statistical yearbooks of various provinces and cities. The individual missing values that still exist are filled using interpolation to provide them.

Evolution of ecological resilience of resource-based cities
According to the calculation results of ecological resilience of resource-based cities from 2011 to 2020, this paper uses the natural discontinuous point classification method to classify the data based on 2011 for spatial visualization, which can conduct a spatial-temporal analysis on ecological resilience. Figure 2 presents the spatial pattern of ecological resilience of resource-based cities in 2011, 2014, 2017, and 2020. According to the evolutionary characteristics of ecological resilience, it shows a certain upward trend during the research period. From the perspective of the time dimension, ecological resilience of 66 cities in the 117 resource-based cities is on the rise. The rate of increase in ecological resilience from 2011 to 2020 is 1.17%, indicating that the overall ecological resilience has improved. From the distribution of ecological resilience values, it in general has not reached the ideal state. More specifically, among the 117 resource-based cities, only 50 cities have a higher level of ecological resilience than the average, and the remaining 67 cities are in a state of inefficiency, indicating that ecological resilience of most resource-based cities still needed to be strengthened. From a regional perspective, ecological resilience of resource-based cities presents a stepped distribution pattern that decreases from east to west; ecological resilience in the southeastern region and the Bohai Rim region is relatively higher than that in the central region, southwest region, northwest region, and northeast region. The improvement of ecological resilience is mainly concentrated in the central region, southwest region, and northeast region, but the overall improvement is not obvious. To sum up, from the measurement of ecological resilience of resource-based cities, the vulnerability of cities to withstand and resist shocks cannot be ignored, and there is still much room for improvement in the construction of ecological resilience systems.

Autocorrelation analysis of ecological resilience of resource-based cities
To verify the spatial correlation, an autocorrelation test is carried out on ecological resilience of resource-based cities, and the results are shown in Table 5. The mean values of Moran's I are positive, and all pass the test at the level of 1% significance, which means that ecological resilience of resource-based cities has a significant positive spatial correlation, showing a spatial agglomeration characteristic and a stable spatial dependence. Therefore, using the spatial econometric model to analyze the influencing factors of ecological resilience of resource-based cities can reduce errors, and the model structure is scientific and reasonable. Specifically, the global Moran's index showed a certain fluctuation trend. From 2011 to 2016, it showed an upward trend. In 2017 and 2018, it showed a downward trend and then began to rise slowly. With the increase of economic development and environmental quality gap between the southern region and northern region, the corresponding spatial correlation and agglomeration effect have declined in recent years. In addition, ecological resilience is the ability of a system to reach either a pre-equilibrium state or a new one or more equilibrium states beyond a certain threshold, which may fluctuate over time before reaching a new equilibrium state.  This paper further uses Moran's I scatter plots to express the local spatial agglomeration law of ecological resilience. Due to space limitations, only Moran's I scatter plots in 2011 and 2020 are shown in Fig. 3.
In the figure, the first and fourth quadrants correspond to the H-H and the L-L agglomeration area, respectively, indicating that there is a strong positive spatial correlation between ecological resilience of the city, and the agglomeration effect is significant. However, the proportion of cities in L-L agglomeration areas is higher, indicating that cities with low ecological resilience are relatively concentrated in spatial distribution and need to improve their ecological resilience in the future. The second and fourth quadrants correspond to the low-high (L-H) differentiated area and the high-low (H-L) differentiated area, respectively, indicating that ecological resilience is differentiated due to its higher or lower development quality than that of the adjacent cities, and the agglomeration effect is not obvious, which is manifested as spatial segregation. For example, ecological resilience of cities such as Xianyang and Chengde is different from that of the adjacent cities. The trend of H-H and L-L agglomeration in 2020 was significantly higher than that in 2011, but the number of agglomerations did not change much. This may be because since the CSDP was released in 2013, the communication between resource-based cities has become more extensive and frequent, but the level of improvement is not high, so it still gathers in the L-L region. In the future, it is necessary to increase radiation and pay attention to coordinated development. The cities located in the H-H agglomeration area are mainly concentrated in the Bohai Rim region, the resource-based cities in the western region are hovering in the L-L agglomeration area and the H-L differentiation area, and the resource-based cities in the central area are hovering in the H-L and the L-H differentiation area. In the future, the central and western regions should make full use of China's western development strategy and the rising strategy of the central region to narrow the gap with the eastern region.

Spatial spillover effect decomposition
The SDM model explains the spatial correlation between cities, but its parameter estimation results cannot directly reflect the effects of direct effects and spatial spillover effects. Therefore, this paper further decomposes the effect of each variable on ecological resilience, and the results are shown in Table 6.
The results show that the direct effect, indirect effect, and total effect of digital economy are all significantly positive, and the direct effect is greater than the indirect effect, indicating that the improvement of ecological resilience depends not only on digital economy in local cities but also on digital economy in neighboring cities through spatial correlation. If the interactive impact of spatial factors is ignored, the effect of digital economy on ecological resilience will be underestimated, which once again proves  the rationality of the choice of the spatial econometric model. The direct effects of the control variables are greater than the indirect effects. The direct effect and total effect of EMST and FIAG are significantly negative, reflecting the trade-off between economic development and ecological resilience. It may be that the adjustment of industrial structure squeezes the rough development mode and leads to a negative impact on ecological resilience in the short term. It may also be that the industrial structure of resourcebased cities is not reasonable enough, and the process of path conversion will inevitably have a negative impact on ecological resilience of resource-based cities . The effects of the degree of DEOP are negative, which may be since, in the context of opening to the outside world, the imported garbage has seriously endangered China's ecological environment (Zhang et al. 2022a, b, c, d). EDSH has not passed the significance test, which may be because there are still unreasonable problems in China's cultural environment, residents have not fully integrated what they have learned into real life, and the benign interaction between urban cultural environment and ecological resilience has not yet been established. Hypotheses 1 and 2 are borne out.

Robustness test
To verify the reliability of the empirical test conclusions, a robustness test is carried out. After the adjacent spatial weight matrix is replaced by the geospatial weight matrix, the model is re-tested for regression after the LM, LR, Wald, and Hausman tests (Table 7), the two-way fixed SDM model should be established, and the regression results are shown in Table 8. It can be seen that the regression results have no significant difference, which proves that the results are relatively robust.

Total analysis of the mediating mechanism
The above analysis expounds the impact of digital economy on ecological resilience of resource-based cities. Then, how does digital economy promote ecological resilience of resource-based cities? This paper uses mediating effect model to test two mediating paths according to the mature theory (Wang et al. 2022a, b, c, d), namely scale effect (the value added by tertiary industry) and technical effect (technological innovation). Table 9 shows the results of the spatial econometric test of the mediating effect of digital economy on ecological resilience of resource-based cities, indicating that digital economy can improve ecological resilience of resource-based cities by driving technological innovation and industrial structure. Column (1) shows that in the regression where ecological resilience of resource-based cities is the explained variable, the estimated coefficient of DIEC is significantly positive, indicating that promoting of digital economy can improve ecological resilience of resource-based cities. This conclusion is consistent with the references . Compared to traditional smallscale transactions, the digital economy enables access to a wide range of resources in a geographically wide range of spaces (Aminova Niginabonu et al. 2021) and contributes to reducing resource consumption. In addition, consistent with the environmental Kuznets curve hypothesis, the impact of the digital economy on CO 2 emissions and low-carbon, inclusive growth  shows an inverted U-shaped relationship (Li et al. 2021a, b, c;Xiang et al. 2022). Column (2) replaces the explanatory variable with technological innovation, while the estimated coefficient of DIEC is significantly positive, reflecting that digital economy promotes technological innovation of resource-based cities. Digital foundation, digital input, digital literacy, digital economy, and digital application are conducive to enhancing green technology innovation (Wen-Chao et al. 2022), and the digital economy can indirectly affect green technology innovation through the mediating variable of environmental regulation (Wang et al. 2022a, b, c, d). Furthermore, column (3) indicates that taking ecological resilience of resource-based cities as the explained variable, and incorporating digital economy and technological innovation into the equation at the same time, it can be found that when technological innovation is significantly positive, digital economy is still significantly a positive, technological innovation which has become a crucial element in the promotion of energy conservation curbs CO 2 emissions (Chen and Lei 2018). So, it can be considered that digital economy can improve ecological resilience of resource-based cities through technological innovation.
Similarly, the coefficient of DIEC in column (4) is significantly positive, indicating that the digital economy can promote the upgrading of industrial structure in resource-based cities. The coefficient of DIEC in column (5) is significant, and the coefficient of INST is also significantly positive, indicating that the digital economy and industrial structure help to improve the ecological resilience of resource-based cities. These conclusions are consistent with the references (Chen and Zhao 2019; Yu and Wang 2021;Zhang et al. 2020a, b). The above results show that digital economy can enhance ecological resilience through industrial structure. In technological innovation and industrial structure, the former plays a stronger intermediary role. Hypothesis 3 is borne out.

Geographic heterogeneity analysis
The differences in climate and location characteristics in the northern region and the southern region may have different impacts on ecological resilience. Therefore, this paper divides the research samples into the northern region The standard deviations of the values are in parentheses * , **, and *** indicate significance at the 10%, 5%, and 1% levels, respectively

Variables
(1) and the southern region to explore the impact of digital economy on ecological resilience in different regions; the regression results are shown in Table 10. For resource-based cities in the northern region, digital economy improves ecological resilience of resourcebased cities through technological innovation and industrial structure. The upgrading of digital economy in the southern region has no significant impact on ecological resilience of resource-based cities, and the impact of digital economy on technological innovation is not significant. The impact is significantly positive when digital economy and technological innovation are included in the model at the same time; the intermediary effect is not established. The Bootstrap test is further carried out. In the test results, the confidence interval contains 0, indicating the mediating effect is not significant. The possible reasons are as follows. In the northern resource-based cities, collective heating is adopted in the winter, and there is little phenomenon of self-heating (Zhang and Gong 2018). The emergence of this phenomenon makes the energy structure in the northern resource-based cities tend to be similar. The use of collective heating is easier to change the use of clean energy for heating than self-heating in winter, and it also makes it easier for government departments to supervise, while the self-heating behavior in the southern resource-based cities is difficult to supervise, so the southern resource-based cities is more inclined to choose relatively cheap heating energy with more pollutants. Under the supervision, the northern resource-based cities will strive to develop digital level, technological innovation capability, and industrial structure to reduce pollutant emissions; the resistance to upgrading digital economy is smaller than in the southern resource-based cities . For its own development, the northern resource-based cities will take the initiative to develop the digital economy to enhance the level of ecological resilience, and the driving force in the southern resource-based cities is not so sufficient. Therefore, Hypothesis 4 is partially validated.

Growth-stage heterogeneity analysis
Resource-based cities are numerous and widely distributed with different resource development statuses and different problems. According to the ability of resource guarantee and sustainable development, CSDP divides resource-based cities into mature, growing, declining, and regenerating types, with the numbers of 31, 141, 67, and 23, respectively. The growth-stage heterogeneity analysis of resource-based cities is carried out, and the results are shown in Table 11 and  Table 12.
From the above tables, the digital economy can enhance ecological resilience of growing, declining, and regenerating resource-based cities through technological innovation and industrial structure; the promoting effect on mature resource-based cities is not significant. Hypothesis 4 is borne out. This is similar to the conclusion of the reference (Wang et al. 2022a, b, c, d;Zhang et al. 2022a, b, c, d), but there are differences. Specifically, the impact of digital economy and technological innovation on the ecological resilience of mature resource-based cities is not significant. Digital economy, technological innovation, and industrial structure have the strongest promotion effect on the ecological resilience of regenerating resource-based cities, followed by the impact on the ecological resilience of growing and declining resource-based cities. This may be because the impact of policies on resource-based cities in different growth cycles is different. Resource-based cities in transition may be "favored" by policies. They are more likely to receive more attention for their investment in technology, capital, and talents than mature resource-based cities. It may also be because mature resource-based cities already have relatively perfect transformation and development measures, so they only pay attention to the feedback of emissions reduction and other results, but ignore the cultivation of soft power such as technological innovation and human capital, and fall into the policy trap. As a result, technological innovation and industrial structure do not play their due role. The other three types of resource-based cities have just begun to enter the stage of benign development. They pay more attention to transforming the mode of economic development, improving the industrial structure, introducing talents, and encouraging new infrastructure.

Conclusions and policy implications
Based on the panel data of resource-based cities from 2011 to 2020, this paper uses the entropy weight TOP-SIS method to measure ecological resilience of resourcebased cities and analyzes its spatial and temporal evolution characteristics. At the same time, this paper conducts the mediating effect model and SDM model to investigate the impact and mechanism of digital economy on ecological resilience. Furthermore, this paper discusses the heterogeneous impact on different geography and growth cycles. The core conclusions are as follows.
(1) The overall ecological resilience of resource-based cities is on the rise. From a regional perspective, the enhancement of ecological resilience is mainly concentrated in the central region, southwest region, and northeast region There is a regional imbalance in ecological resilience of resource-based cities in China, showing a stepped distribution pattern that decreases from east to west.

Table 10
The impact of digital economy on ecological resilience in the northern and southern region The standard deviations of the values are in parentheses * , **, and *** indicate significance at the 10%, 5%, and 1% levels, respectively Variables

Table 12
Growth-stage heterogeneity analysis of the mediating role of industrial structure The standard deviations of the values are in parentheses * , **, and *** indicate significance at the 10%, 5%, and 1% levels, respectively Variables (2) From the perspective of spatial correlation, ecological resilience of resource-based cities has a significant positive correlation in the observation period, and the spatial dependence is relatively stable. In terms of local correlation, ecological resilience is dominated by the phenomenon of club convergence, and the eastern and central cities are in the majority. Among them, the proportion of cities in the L-L agglomeration area is higher, and the neighborhood effect is unstable.
(3) From the model testing, digital economy in the region and neighboring regions can jointly improve ecological resilience of resource-based cities. The mechanism test shows that digital economy strengthens ecological resilience by technological innovation and industrial structure, and the intermediary role of technological innovation is stronger. The geographic and growth-stage heterogeneity test shows that in the northern region, digital economy can improve ecological resilience of resource-based cities through technological innovation and industrial structure. The digital economy improves the ecological resilience of growing, declining, and regenerating resource-based cities through technological innovation and industrial structure.
Based on the above conclusions, this paper puts forward the following policy recommendations.
(1) Implement the CSDP, enhance the ecological resilience of resource-based cities, and explore the sustainable development path with its own characteristics; it is necessary to basically enhance the ecological resilience of resource-based cities, and cannot evaluate their development with a single index. (2) Improve ecological resilience of resource-based cities by enhancing their connections. The Chinese government should promote the integration and development of the digital economy and environment protection experience, encourage interregional cooperation, and promote the free flow of information among regions. (3) Strengthen ecological resilience of resource-based cities with digital economy. Enhance ecological resilience of resource-based cities by technological innovation, industrial structure classification guidance. Improve the regulatory system of digital inclusive finance in the south. Develop the order constraint mechanism of resource-based cities in the mature stage.
Although this study quantitatively studies the impact of digital economy on the ecological resilience of resourcebased cities, there are still some limitations that can stimulate further research. For example, this study empirically analyzes the spatial impact and transmission mechanism of the digital economy on resource-based cities, but the relationship between the digital economy and the ecological resilience of non-resource-based cities has not been explored. The next step can compare the heterogeneous impact of digital economy on ecological resilience between resource-based cities and non-resource-based cities. In addition, when selecting the ecological resilience indicators of resource-based cities, based on data availability, this paper selects indicators such as water resources, per capita GDP, and innovation investment. Using indicators with more resource-based city characteristics such as geological environment restoration and management rate may be more scientific and accurate.

Data availability
The data that support the findings of this study are available from the corresponding author upon reasonable request.

Declarations
Ethics approval and consent to participate Not applicable.

Competing interests
The authors declare no competing interests.