Introduction

Energy is not only essential to human survival and development but also an important strategic factor in socioeconomic development and national security (Crompton and Wu 2005; Hao et al. 2021). While global energy consumption continues to increase, energy efficiency improvements have been declining since 2015. In 2020, this decline in energy efficiency became even more alarming because the COVID-19 pandemic added an extra layer of social stress (IEA 2020). Energy efficiency improvements play a significant role in global carbon neutrality. The International Energy Agency’s (IEA’s) Sustainable Development Scenario proposes that energy efficiency improvements should contribute 40% of the reduction in energy-related greenhouse gas emissions over the next 20 years (IEA 2020). China is the world’s largest energy consumer. In 2019, its total energy consumption reached 4.98 billion tons of standard coal. Although China has been making efforts to implement the 2015 Paris Agreement, there is still a huge gap in energy efficiency between China and developed countries (Lee and Lee 2022; Wang et al. 2022). Therefore, improving energy efficiency in China is vital to both China’s economic competitiveness and global carbon neutrality.

Digitalization, the Fourth Industrial Revolution, is a crucial driver of social and economic development at every level. The digital economy is now a new socioeconomic form following the agricultural and industrial economies (Wen et al. 2021), which improves resource allocation, integration, and synergy (Pan et al. 2022). For example, online shopping increases the demand for transportation and logistics, increases energy consumption, and greatly increases packaging waste. In addition, the digital economy promotes adjustments and upgrades to society’s industrial structure. With the rapid development of the digital economy, digital technologies permeate energy technologies, restructuring energy consumption and efficiency, and pollution emission. Kurniawan et al. (2022) investigated the facilitation of digital technologies for waste recycling, indicating that the digital transformation in the waster sector not only promotes the resource recovery of non-biodegradable waste for a circular economy, but also enables local community to do online transactions of recycled goods. However, the promotion of energy consumption by digital infrastructure cannot be ignored because the digital transformation of economic activities is always asset-light and energy-consuming (Li et al. 2021b; Wang et al. 2022). Digitalization also promotes the development of new energy industries and the consumption of power (Sadorsky 2012). New energy technologies are not mature; thus, the transformation of the energy structure after the introduction of these immature technologies may lead to a decline in energy efficiency (Wen et al. 2021, 2022), which shows the complex relationship between the digital economy and energy efficiency.

According to the “White Paper on Global Digital Economy Development Report” released by the China Academy of Information and Communications Technology in 2021, the number of Internet users in China reached 989 million, and Internet penetration reached 79.4%, ranking first in the world. By 2020, China’s digital economy was worth more than 60 trillion dollars, accounting for 38.6% of the country’s gross domestic product (GDP). In its 14th Five-Year Plan, the Chinese government attaches great importance to the development of the Internet, accelerates the development of the digital economy, and promotes the digital transformation of production modes and lifestyle to achieve green and sustainable economic development. Given the large scale of China’s digital economy and energy consumption, improving energy efficiency in China in the era of digitalization will be of great value to the sustainable development of energy worldwide.

With the growing relationship between the digital economy and energy system, scholars have increasingly focused on the impact of the digital economy on energy consumption, efficiency, and green total factor energy efficiency (GTFEE). Some studies argue that information and communication technologies (ICTs) improve energy efficiency through productivity improvements or technological innovations (Wu et al. 2021a), while other scholars have also found conflicting evidence. For example, Avom et al. (2020) reported that ICTs worsened environmental quality in sub-Saharan African countries, while Ren et al. (2021) found that Internet development in China increased the scale of energy consumption through economic growth. Salahuddin and Alam (2016) showed that ICTs stimulated electricity consumption in both the short and the long run. However, these studies’ conclusions are inconsistent; more evidence is needed to expose the relationship between the digital economy and energy efficiency. Therefore, it is very important to clarify the impact of the digital economy on GTFEE, especially in developing countries like China in the early stages of development of their digital economy.

This study empirically explores the impact of the digital economy on GTFEE in China. In contrast with most earlier studies (Sadorsky 2012; Li et al. 2018), this paper uses a comprehensive digital economy index from three dimensions of digital infrastructure, digital industrialization, and industry digitization and considers desired and undesired output in GTFEE, drawing on data from prefecture-level cities in China from 2003 to 2018. The comprehensive index and large data sample enhance the clarity of the study’s findings, enriching the literature on the theory of the digital economy and GTFEE. While Li et al. (2021b) studied the relationship between digital economy and GTFEE, their study was focused on panel and nonspatial models, and the relevant earlier studies have not analyzed the digital economy’s direct, indirect, and spatial spillover effects on GTFEE based on a dynamic panel model or a spatial Durbin model (SDM).

This study makes the following contributions to the literature. Firstly, this paper empirically not only estimates the direct impact of digital economy development on GTFEE using a dynamic panel model, but also explores the mechanisms between digital economy and GTFEE using a mediation effect model, which provide empirical evidence for a rule for energy efficiency changes in the digital economy era. Secondly, this paper takes environmental regulations and research and development (R&D) investment as threshold variables and finds a dynamic threshold effect of digital economy development on GTFEE, with a nonlinear relationship between the digital economy and GTFEE. Finally, this paper empirically evaluates the spatial spillover effect of digital economy development on GTFEE and decomposes its direct and indirect effects.

The rest of our study is organized as follows. A brief literature review and the research hypothesis are presented in “Literature review and research hypotheses.” “Methodology and data” explains the methodology and data used. “Empirical results and discussion” presents the empirical results and discusses the dynamic threshold panel model, mediation effect model, and spatial econometric model. “Estimation results for the heterogeneity analysis” outlines our heterogeneity analysis and the robustness analysis. The final section concludes the study.

Literature review and research hypotheses

Literature review

The origins of the digital economy can be traced back to socioeconomic models driven by computer and networking technologies (Tapscott 1996). Related studies have suggested that the digital economy comprises big data, artificial intelligence (AI), cloud computing, blockchain, the production of ICTs infrastructure, and the digitalization of traditional industries (e.g., Teece 2018). Hence, OECD countries and China are working to improve their frameworks for measuring the digital economy.

Digital technologies are not only a modern phenomenon with enormous potential to promote the growth of national GDP but are also an important driving force in promoting sustainable development through developing a high-quality digital economy. Using Levinsohn and Petrin’s semi-parametric method (Levinsohn and Petrin 2003), Tian and Liu (2021) found that digital infrastructure has a significantly positive impact on total factor productivity. In addition, Li et al. (2020) showed that the digital economy revamps business processes through technological innovation, government policies for economic growth, and digital entrepreneurship in Asian nations. Focusing on a new communication technology and broadband Internet, Destefano et al. (2018) studied the effects of heterogeneous types of ICTs on UK firm performance and found that ICTs use causally affected only firm size, not firm productivity. Zhang et al. (2021) measured digital economy development, including digital infrastructure, digital industry, and digital integration, and revealed that the positive effect of the digital economy on high-quality economic development was mediated by technological progress. Ding et al. (2021) found that the digital economy also promoted the domestic value-added rate of Chinese exports.

Since the digital economy includes important factors affecting energy consumption, structure, and efficiency, in recent years, scholars worldwide have studied the digital economy from different perspectives using different methods. First, some studies have focused on the digital economy on energy consumption and pollution emissions. For example, Cho et al. (2007) revealed that ICTs investment in the service sector and most manufacturing sectors increases electricity consumption by investigating the relationship between ICTs investment and electricity consumption. Usman et al. (2021) analyzed the effects of ICTs on some South Asian economies’ economic performance and energy consumption and found that India was the only country to achieve energy efficiency following increased use of ICTs. While some studies unraveled that the ICTs has a long-run positive effect on emission and can promote the development of green economies (Raheem et al. 2020; Wei and Ullah 2022), Salahuddin and Alam (2015) found no meaningful relationship between Internet usage and carbon dioxide (CO2) emissions in Australia in either the long or the short run using an autoregressive distributed lag model. Based on global panel data from 190 countries between 2005 and 2006, Li et al. (2021a) also found an inverted “U”-shaped relationship between the digital economy and CO2 emissions, which indicates that the digital economy promoted CO2 emissions at an early stage of its development. Second, some researches have investigated the effects of basic digital technologies on energy management and efficiency. For example, big data analytics can be used not only in next-generation green vehicles to control their CO2 emissions but also to measure carbon emissions (Seles et al. 2018). Ye et al. (2020) and Sarc et al. (2019) considered AI to be a very efficient way to tackle the digital economy’s complex and dynamic environmental problems, such as sorting different types of waste. Some studies have examined how the Internet of Things (IoT) can be used to measure and control air pollution. For example, Idrees and Zheng (2020) showed that an IoT sensor with real-time monitoring information and support was an effective tool to identify fine particulate matter with diameters generally 2.5 µm and smaller (PM2.5) and could be used to predict changes in dynamic trends (Kanabkaew et al. 2019). Zuo et al. (2018) found that a novel IoT and cloud-based approach could perform energy consumption evaluations and analyses of products. Furthermore, Lahouel et al. (2021) revealed that ICTs could affect the relationship between total factor productivity (TFP) and CO2 emissions. Pan et al. (2022) found that the digital economy acts as an innovation driver for the TFP. Previous studies have investigated the impact of digital economy on energy and pollution and have revealed the relationship between digital economy and total factor productivity, which indicate that it is likely to have a close relationship between digital economy and GTFEE. Therefore, more studies have focused on how the digital economy impacts GTFEE. Internet development significantly promotes energy saving and emission reduction efficiency through technological progress, energy structures, human capital, and openness (Wu et al. 2021b) and contributes significantly to green economic growth, mainly through enterprise innovation. These studies have generally used a composite model, the epsilon-based measure (EBM) (Wang et al. 2021a).

In summary, the literature has outlined the positive effect of the digital economy on socioeconomic and sustainability. However, the effect of the digital economy on economic development is still debatable, especially its effect on GTFEE based on the Solow paradox. Although the literature has provided a theoretical basis for analysis of the relationship between the digital economy and GTFEE, some limitations need to be addressed. First, few studies have investigated the nonlinear and spatial spillover effects. Second, few studies have focused on the prefecture-level cities. Third, few studies have investigated the transmission mechanism of negative effects. Therefore, this study first constructs a comprehensive digital economy development index based on Chinese prefecture-level cities using the latest methods to estimate the effect of the digital economy on GTFEE.

Research hypotheses

Following the literature on the digital economy and the relationship between the digital economy and GTFEE, the paper constructs comprehensive digital economy development index and calculates the GTFEE with full consideration of non-desirable output using the un-desirable SBM model, to explore the relationship between the digital economy and GTFEE based on prefecture-level cities in China. In general, our study considers three mechanisms. First, the digital economy can directly impact the energy system from energy demand, structure, and efficiency which is a key factor influencing GTFEE, and with improvements in digital economy development, technological progress, and higher intensity of environmental regulations, the digital economy has a nonlinear effect on GTFEE. Second, the digital economy can indirectly affect the GTFEE through economical system. Third, following the knowledge, resources, and technology spillovers, the digital economy has a spatial spillover effect on the spatial correlation of GTFEE. Figure 1 shows our analysis of these three mechanisms.

Fig. 1
figure 1

Mechanism analysis of digital economy and green total energy efficiency

The digital economy is an important driving force for socioeconomic development. It not only injects new momentum into traditional economies but also reshapes the whole life cycle of productions, business modes, individual lifestyles, industrial structures, and energy consumption and efficiency, among other areas (Ding et al. 2021). However, at the early stage, the digital economy also promotes pollution emissions and energy consumption through expanding investment in digital devices and infrastructure and digitizing traditional industries (Wang 2022). While with the further development of the digital economy, the digital economy can improve GTFEE through increasing the energy efficiency and reducing energy consumption by integrating digital technologies, optimizing the production process, increasing labor productivity, improving resource management and reasonable environmental regulations (Lange et al. 2020; Huang and Lei 2021). Based on these factors, we propose the following hypothesis:

  • Hypothesis 1: The digital economy has not only a significant impact on GTFEE but also a nonlinear relationship with GTFEE.

The digital economy can enhance energy efficiency and resource management to decrease the energy consumption, however, which would lead to various rebound effects (Ruzzenenti and Bertoldi 2017). First, the digital economy increases the demand for electricity and facilitates a shift in energy demand from traditional fossil fuels to new ones (Berkhout and Hertin 2001). Increased demand for electricity has led to a decline in energy efficiency, and immature new energy technologies have also reduced energy efficiency. Second, the digital industrialization is providing and updating a great many digital products. Digital servitization is providing a great diversity of services derived from digital technologies and is creating a great many new services supplied by platforms. Meanwhile, to meet different individualization requirements, digitalization is changing the production process, increasing new products bound with digital services, and reshaping the seller-buyer relationships through creating new business modes, which would bring out the hollowing out of industrial scale. Additionally, the services derived from digital economy are relatively energy intensive, compared to other services, which would increase energy consumption leading to reduce the GTFEE (Collard et al. 2005; Cho et al. 2007; Mulder et al. 2014). Third, digitalization has the potential to increase energy efficiency since labor productivity in manufacturing and service sectors has been improving by standardized labor and cognitive human labor; however, new jobs tend to necessitate high education levels and highly skilled labors, which leads to hollowing out of industrial efficiency through wage polarization and labor productivity imbalance (Lange et al. 2020; Staab 2017). In result, the energy efficiency would be counteracted by the loss of economy growth caused by hollowing out of industrial efficiency. Based on the above factors, we propose the following hypothesis:

  • Hypothesis 2: The digital economy can impact the GTFEE through the mechanisms of electrification, hollowing out of industrial scale and hollowing out of industrial efficiency.

Digital economy development not only accelerates the flow of information and reduces the cost of information transmission but also creates new business models to improve the efficiency of transactions and promote the sharing of knowledge and resources. Moreover, the digital economy has broken the time and space boundaries of traditional economy, which makes it easy for digital businesses to forge links to other regions and promote the spatial overflow of digital technologies. Therefore, the digital economy promotes the efficiency of labor, productivity, logistics, management, and energy consumption in local and neighboring regions. Based on the above analysis, we propose the following hypothesis:

  • Hypothesis 3: Digital economy development has a spatial spillover effect on GTFEE.

Methodology and data

Dynamic panel model

Considering that GTFEE is gradually improving and the GTFEE from the previous period may affect the GTFEE in the subsequent period, this paper would obtain a biased estimation if it were to use only static panel analysis (Mulder et al. 2014; Wu et al. 2021a; Gao et al. 2021). Instead, to capture the relationship between digital economy development and GTFEE (Che et al. 2013), this paper adopts the system generalized method of moments (SYS-GMM) system set out in Eq. (1):

$$GTFEE{}_{{{\text{it}}}} = \alpha + \varphi GTFEE_{i,t - 1} + \beta \ln Dig_{it} + \delta X_{it} + \mu_{i} + \varepsilon_{it}$$
(1)

where i and t represent prefectural-level cities and time, GTFEE is dependent variable, lnDig is the digital economy development index, X is a series of control variables, ui is an individual fixed effect, εit is a random perturbation term, and α, φ, β, and δ are the coefficients to be estimated. To control for the heteroscedasticity and multicollinearity of the model, this study uses the natural logarithmic form for all the explanatory variables.

There are moderating effects between digital economy development, environmental regulations, and R&D investment. Therefore, the interactions between digital economy development and environmental regulations and between digital economy development and R&D investment are the key factors affecting GTFEE. Considering the dynamic panel bias and potential endogeneity of regressors, this paper simultaneously uses SYS-GMM to estimate the effects of the interactions between environmental regulations, digital economy development, and R&D investment on GTFEE:

$$\begin{gathered} GTFEE_{{{\text{it}}}} = \alpha + \varphi GTFEE_{i,t - 1} + \beta \ln Dig_{it} + \delta X_{it} + \omega_{1} \ln Z_{it} \\ + \omega_{2} \ln Z_{it} \times Dig_{it} + \mu_{i} + \varepsilon_{it} \\ \end{gathered}$$
(2)

where Z represents environmental regulations (lnEnv) and R&D investment (lnRD), while ω1 is the coefficient. lnZit × Digit represents the interaction effect between digital economy development and environmental regulations (lnEnvit × lnDigit), the interaction effect between digital economy development and R&D investment (lnRDit × lnDigit), and ω2 is the coefficient of the interaction effect, respectively.

Mediation effect model

The digital economy may affect the GTFEE through electrification, hollowing out of industrial scale, and hollowing out of industrial efficiency. To study the potential indirect impacts of digital economy on GTFEE, this paper adopts mediation effect model to carry out further empirical investigation:

$$\begin{gathered} GTFEE_{{{\text{it}}}} = c_{0} + c\ln Dig_{it} + \delta_{m} \ln X_{it} + u_{i} + r_{t} + \varepsilon_{it} \hfill \\ \ln Mediation_{it} = a_{0} + a_{{}} \ln Dig_{it} + \psi_{m} \ln X_{it} + u_{i} + r_{t} + \varepsilon_{it} \hfill \\ GTFEE_{it} = b_{0} + c^{\prime}_{{}} \ln Dig_{it} + b_{{}} \ln Mediation_{it} + \varsigma_{m} \ln X_{it} + u_{i} + r_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(3)

where Mediation represents the mediation variables, including the electrification (lnElectrification), hollowing out of industrial scale (lnIndustry_up), and hollowing out of industrial efficiency (lnProduct_rate). c represents the effect of digital economy on GTEFF without mediation variables, and a represents the effect of digital economy on mediation variables. Adding mediation variables, \(c^{\prime}\) represents the direct effect of digital economy on GTFEE, and b represents the effect of mediation variables on GTFEE. \(a_{0} ,b_{0} ,c_{0}\) represent the coefficients of constant, and \(\delta_{m} ,\psi_{m} ,\varsigma_{m}\) represent the relevant control variables. ui is an individual fixed effect, and \(r_{t}\) is a time-fixed effect.

Dynamic threshold panel model

Based on the differences in economic development, environmental regulations, and R&D investment among prefecture-level cities in China, there may be a nonlinear relationship between digital economy development and GTFEE (Huang and Lei 2021). To evaluate the nonlinear relationship between digital economy development and GTFEE further, this paper uses the dynamic threshold panel model to empirically test this nonlinear mechanism. This model introduces the lag term of GTFEE into a static threshold model, which avoids the estimation error caused by endogeneity (Kremer et al. 2013; Seo and Shin 2016). The dynamic threshold panel model follows:

$$\begin{gathered} GTFEE_{{{\text{it}}}} = \alpha + \varphi GTFEE_{i,t - 1} + \beta_{1} \ln Dig_{it} \bullet I(q_{i} \le \gamma ) \\ + \beta_{2} \ln Dig_{it} \bullet I(q_{i} > \gamma ) + \delta X_{it} + \mu_{i} + \varepsilon_{it} \\ \end{gathered}$$
(4)

where \(q_{i}\) represents digital economy development (lnDig), environmental regulations (lnEnv), and regional R&D investment (lnRD) are the threshold variables. γ is the threshold value to be estimated, I(∙) is an instruction function, and β1 and β2 represent the influence coefficient of the digital economy development on GTFEE under different threshold variable intensities, respectively.

Spatial econometric models

Spatial correlation test

We select Moran’s I index to test the spatial autocorrelation before conducting our empirical analysis. The formula for Moran’s I is as follows:

$$M{\text{o}}ran^{\prime}sI = \frac{n}{{\sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{n} {W_{ij} } } }}*\frac{{\sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{n} {W_{ij} ({\text{y}}_{i} - \overline{Y})(y_{j} - \overline{Y})} } }}{{\sum\limits_{i = 1}^{n} {(y_{i} - \mathop Y\limits^{\_} )^{2} } }} = \frac{{{\text{n}}\sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{n} {W_{ij} ({\text{y}}_{i} - \overline{Y})(y_{j} - \overline{Y})} } }}{{S^{2} \sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{n} {W_{ij} } } }}$$
(5)

where \(S^{2} = \sum\limits_{{{\text{i}} = 1}}^{n} {({\text{y}}_{i} } - \overline{Y})^{2}\) and \(\overline{Y} = \frac{1}{n}\sum\limits_{i = 1}^{n} {{\text{y}}_{i} }\). We test the spatial correlation between cities using the local Moran’s I, and the formula is as follows: \(I_{i} = Z_{i} \times \sum\limits_{j = 1}^{n} {w_{ij} } z_{j}\), where \(z_{i} = {\text{y}}_{i} - \overline{Y}\) and \({\text{z}}_{j} = y_{j} - \overline{Y}\) are the deviation between the observed value and the mean, respectively.

Spatial Durbin model

The GTFEE has a spatial correlation characteristic (Wu et al. 2020). In addition, the digital economy in China also shows a spatial correlation characteristic (Li et al. 2021a). This paper uses a spatial econometric model to study the relationship between the digital economy and GTFEE. However, the objects applicable to the different main spatial econometric models are also quite different. The main spatial econometric models include a spatial autoregressive (SAR) model, a spatial error model (SEM), and an SDM, and their applicable objects also differ.

The SDM is a synthesis of a SAR model and SEM, with more general results in practical applications. The SDM includes endogenous and exogenous interaction effects, which can not only control the spatial effects of explanatory variables, but also make the parameter estimation results more robust. We construct the SDM as follows:

$$\begin{gathered} GTFEE_{{{\text{it}}}} = \alpha_{0} + \rho_{1} \sum\limits_{j \ne i}^{N} {W_{ijt} } GTFEE_{it} + \beta_{3} \ln Dig_{it} + \rho_{2} \sum\limits_{j \ne i}^{N} {W_{ijt} } \ln Dig_{it} \\ + \delta_{i} X_{it} + \rho_{i} \sum\limits_{j \ne i}^{N} {W_{ijt} } X_{it} + \mu_{i} + \varepsilon_{it} \\ \end{gathered}$$
(6)

where i and t represent prefecture-level cities and time, respectively; GTFEE is the dependent variable; lnDig represents the explanatory variable for digital economy development; X is a series of control variables; \(\rho\) is a series of the SAR coefficient; β and δ are series of coefficients; μi is an individual fixed effect; εit is a random perturbation term; and Wijt is an N × N order spatial weight matrix. Other variables are the same as explained above.

In this study, the rook spatial weight matrix and inverse distance geographic matrix are used to measure the spatial spillover effect. The 0–1 rook spatial weight matrix (W1) is defined as \(W_{ij} = \left\{ \begin{subarray}{l} 1,i \ne j \\ 0,i = {\text{j}} \end{subarray} \right.\), where prefecture-level city i has a common boundary with city j. Then Wij = 1; otherwise, Wij = 0. The inverse distance geographic matrix (W2) is defined as \(W_{ij} = \left\{ \begin{subarray}{l} \frac{1}{{d_{ij} }},i \ne j \\ 0,i = j \end{subarray} \right.\), where dij is the surface distance of the prefectural-level city as calculated by its latitude and longitude.

Explanation of the Variables

Green total factor energy efficiency

Following Tone (2001) and Wang et al. (2021b), this paper selects panel data from 281 prefecture-level cities in China between 2003 and 2018 and calculates GTFEE considering all undesired outputs using the undesirable SBM model. Specifically, this study assumes that there are N decision-making units (DMUs), each of which has m inputs, n1 expected outputs, and n2 unexpected outputs. For i DMU, the vector form of the inputs xi, expected output \(y_{i}^{g}\), and unexpected \(y_{i}^{b}\) are expressed as:

$$\begin{gathered} {\text{x}}_{i} = (x_{1i} ,x_{2i} ,x_{3i} ,...,x_{mi} ) \in R^{m \times n} \hfill \\ y_{i}^{g} = (y_{1i}^{g} ,y_{2i}^{g} ,y_{3i}^{g} ,...,y_{{n_{1} i}}^{g} ) \in R^{{n_{1} \times n}} \hfill \\ y_{i}^{b} = (y_{1i}^{b} ,y_{2i}^{b} ,y_{3i}^{b} ,...,y_{{n_{2} i}}^{b} ) \in R^{{n_{2} \times n}} \hfill \\ \end{gathered}$$
(7)

where X, \(Y^{g}\), and \(Y^{b}\) are matrixes, and \(X = [x_{1} ,x_{2} ,x_{3} ......x_{n} ] \in R^{m \times n}\), \(Y^{g} = [y_{1}^{g} ,y_{2}^{g} ,y_{3}^{g} ...y_{n}^{g} ] \in R^{{n_{1} \times n}}\), and \(Y^{b} = [y_{1}^{b} ,y_{2}^{b} ,y_{3}^{b} ...y_{n}^{b} ] \in R^{{n_{2} \times n}}\).

The DMU set TDMU is expressed as \(T_{DMU} = \left\{ {(x_{1} ,y_{1}^{g} ,y_{1}^{b} ),(x_{2} ,y_{2}^{g} ,y_{2}^{b} ),(x_{3} ,y_{3}^{g} ,y_{3}^{b} ),...(x_{n} ,y_{n}^{g} ,y_{n}^{b} )} \right\}\), then the possible set \(T = \left\{ {(x,y^{g} ,y^{b} )|x_{k} \ge X\lambda ,y_{k}^{g} \ge Y^{g} \lambda ,y_{k}^{b} \ge Y^{b} \lambda ,\lambda \ge 0} \right\}\), where \(\sum\nolimits_{k = 1}^{n} {\lambda_{k} } = 1\); this refers to variable returns of scale, and it is difficult to decompose the efficiency further. S, Sg, and Sb represent the slack of inputs, expected outputs, and unexpected outputs, respectively. λ is the weight vector, which is used to set up the undesirable SBM model as follows:

$$\begin{gathered} \min \rho^{*} = \frac{{1 - \frac{1}{m}\sum\limits_{i = 1}^{m} {\frac{{S_{i}^{ - } }}{{x_{ik} }}} }}{{1 + \frac{1}{{n_{1} + n_{2} }}(\sum\limits_{r = 1}^{{n_{1} }} {\frac{{S_{r}^{g} }}{{y_{rk}^{g} }} + \sum\limits_{r = 1}^{{n_{2} }} {\frac{{S_{r}^{b} }}{{y_{rk}^{b} }})} } }} \, \hfill \\ \, s.t.\left\{ \begin{gathered} x_{k} = X\lambda + S^{ - } \hfill \\ y_{k}^{g} = Y^{g} \lambda - S^{g} \hfill \\ y_{k}^{b} = Y^{b} \lambda + S^{b} \hfill \\ \lambda \ge 0, \, S^{ - } \ge 0, \, S^{g} \ge 0,{\text{ S}}^{b} \ge 0 \hfill \\ \end{gathered} \right. \hfill \\ \end{gathered}$$
(8)

In Eq. (8), the input variables S includes capital stock (K), labor force (L), and energy consumption (EU). First, to calculate capital stock (K), this paper defines the capital depreciation rate and base period capital, and then calculates the stock using the perpetual inventory method. Next, the number of employees in each city is used as the labor input. Finally, this paper decomposes the provincial energy data to prefecture-level cities based on the weight of each city’s GDP in its province, which provides the relative microdata for empirical research (Gao et al. 2021; Li et al. 2022). The desirable output \(Y^{g}\) is gross regional product (i.e., GDP), and the unexpected output indicators Yb are industrial water discharge, industrial sulfur dioxide (SO2), and industrial solid waste generation.

Comprehensive digital economy development

Digital economy development (lnDig) is a new, relatively complex, and systematic concept. Therefore, a single simple indicator cannot sufficiently reflect the development of China’s actual digital economy. Most recent studies have focused on Internet development or use a simple digital index (Choi and Yi 2009; Salahuddin et al. 2016). Hence, this paper constructs a comprehensive indicator system to reflect the current level of China’s digital economy development (see Table 1). An objective weighting method is used to accurately estimate objects based on the information entropy principle. Time variables are involved in our reasonable analysis of the digital economy index.

Table 1 Evaluation system of digital economy comprehensive index

Moderating and mediating variables

This paper selects R&D investment (lnRD) and government environmental regulation (lnEnv) as the moderating variables. R&D investment is logarithmically valued. R&D investment can improve resource utilization and regional energy efficiency, thus affecting GTFEE. This paper obtains government environmental regulations (lnEnv) by selecting the weights of the main vocabulary related to environmental regulations in all words used in local government work reports, such as “environmental protection,” “pollution,” “energy consumption,” “emission reductions,” “sewage,” “ecology,” “green,” “low carbon,” “air,” “chemical oxygen demand,” “SO2,” “CO2,” “PM10,” and “PM2.5,” using a web crawler (Python2.5). Such regulations can reduce air pollution and improve the economic development quality.

This study also adopts the electrification (lnElectrification); hollowing out of industrial scale (lnIndustry_up) and hollowing out of industrial efficiency (lnProduct_rate) are selected as mediation variables to test the mediation effect of digital economy on GTFEE. Electrification is measured by the logarithm of a city’s electricity consumption. The hollowing out of the industrial scale refers to an increasing proportion of services, and it is defined as follows, \(re\_industry = q_{1} \times 1 + q_{2} \times 2 + q_{3} \times 3\) (\(q_{i}\) represents the ratio of output value of different industry to the regional GDP, \(i = 1,2,3\)). The hollowing out of industrial efficiency refers to the decline of productivity in the industry, and it is measured by the ratio of labor productivity in the tertiary to secondary industries.

Control variables and data sources

Adding control variables

To minimize errors in the regression results from the omission of variables, the following control variables are selected to the models. Economic development (lnGDP) is expressed by the regional GDP, while foreign direct investment (lnFDI) can stimulate green innovation in local industries because foreign companies bring capital and advanced technologies (Gao et al. 2021; Lee et al. 2022). Using the weight of industrial added value in regional GDP, the industrial structure (lnIS) significantly improves energy efficiency (Long et al. 2016). The government intervention (lnGov) variable is used to measure the cities’ public finance budget expenditure, which will affect their local governments’ competitive behavior because they are inclined to financially invest in projects with a significant impact on the environment to meet their target of high-quality development. The total fixed assets investment (lnInv) can promote the rationalization of the industry structure, which then affects energy efficiency. Using the number of university students per 10,000 people in the region (Yao et al. 2021), human capital (lnHR) significantly improves the use of resource elements. By selecting the proportion of the urban population from the local permanent population, urbanization (lnUrb) can affect energy efficiency based on the heterogeneity of city features (Jiang et al. 2021).

Data sources and descriptive statistics

All data for these indicators are from the China Energy Statistical Yearbook, the China Environmental Statistical Yearbook, Statistical Report on China’s Internet Development Status, China Financial Statistics Yearbook, China Statistical Yearbook on Science and Technology, and the National Bureau of Statistics. The relevant missing data are filled in by interpolation. Table 2 presents the descriptive statistics for the variables in this study.

Table 2 Descriptive statistics

Empirical results and discussion

Estimation results for the dynamic panel model

To make our results more comparable, this paper reports the regression results for an ordinary least square model (OLS) with clustering robust standard deviation (SD) under time and individual dual fixed effects and for a dynamic panel model with system GMM to obtain more robust conclusions (Table 3). Due to heteroscedasticity and sequence correlation, we implement a (cluster) robust version of the Hausman specification test using a bootstrap procedure. Table 3 shows that the result of Hausman test results is positive at the 1% levels.

Table 3 The impact of digital economy development on GTFEE

This paper uses GMM estimators because the standard fixed effects estimator is inconsistent when T is small, and N is large for the dynamic panel data models. Specifically, the system GMM estimator is now a standard GMM estimator used in empirical studies (Hayakawa and Qi 2020). Because GMM is an instrumental variable method, the lagged terms of the dependent variable and some independent variables satisfy the exogeneity and correlation conditions, which are usually selected as instrumental variables in dynamic panel data (Weeks and Yudong Yao 2003). In this study, the first-order lag term of the dependent variable (GTFEE) is chosen as the instrumental variable. To prove that our instrumental variables are reasonable, this study also reports the results for the autoregressive 2 (AR(2)) model and Diff-in-Hansen test for the exogeneity and correlations and the Sargan and Hansen tests for overidentifying restrictions.

Table 3 reports the regression results of digital economy on GTFEE using the panel data model and dynamic panel data model. Column (1) and column (2) are listed as the estimation results using OLS, OLS_FE based on panel data model. Columns (3) ~ (5) are listed as the results using systematic GMM based on dynamic panel data model. In them, the AR (2) values (and the related P-values) are 1.42 (0.156), while the results of Dif-in-Hansen, Sargan, and Hansen tests all passed the significance test at 1% level, thereby all instrument variables are valid and credible. It can be seen from columns (1) ~ (2) that the coefficients of the digital economy on the GTFEE are − 0.059 and − 0.041, all of which pass the significance test. Those models prove that the coefficient for the effect of digital economy development on the GTFEE is significantly negative. There are two possible reasons for this finding. First, large-scale investment in prefecture-level cities’ construction of digital infrastructure, such as 5G stations, cloud computing data centers, and corresponding digital technologies, also stimulates investment in steel, optical fiber, and some traditional industries, which promotes the energy consumption. Second, the digitization of industries is at an early stage of development in prefecture-level cities and the IoT is under construction, which promotes power consumption (Zhou et al. 2019). Following the integration of the digital technology and energy revolutions, energy technologies and management systems can be reshaped (Litvinenko 2020); however, this is an arduous and long-term task. The potential efficiency of resourcing and energy is improving, but an optimization effect has not yet appeared; therefore, it is difficult to eliminate the increasing energy and power consumption of traditional industries during the digital investment stage, unless the development of the digital economy is faster than the related increase in energy consumption.

Finally, columns (4) and (5) show the results of digital economy on GTFEE, considering the moderating effects of R&D investment and environmental regulations based on dynamic panel data model. It can be seen from columns (4) and (5) that the coefficients for the interaction terms of digital economy development with R&D investment and environmental regulations are positive, although they are not significant. This finding indicates that strengthening environmental regulations restrains the increasing energy consumption caused by digital economy development. In addition, green technological innovations can partly moderate the negative effect of environmental regulations on haze pollution in dynamic situations (Feng et al. 2021; Zheng et al. 2021), and information can also improve energy efficiency (Henryson et al. 2000). Therefore, technical progress eliminates the negative effect of digital economy development on GTFEE. Considering the rebound effect (Farla and Blok 2000), however, the direct or indirect effects of technical progress on the energy system are complex. In the long term, digital economy development increases energy consumption, but digital infrastructure investment cannot significantly improve GTFEE.

Estimation results for the mediation effect model

Table 4 reports the estimation results of the mediation effect model using electrification (lnElectrification), hollowing out of industrial scale (lnIndustry_up), and hollowing out of industrial efficiency (lnProduct_rate) as the mediation variables. Column (1) and column (2) use electrification (lnElectrification) as mediation variable; columns (3) and (4) use hollowing out of industrial scale as mediation variable; columns (5) and (6) represent hollowing out of industrial efficiency. Columns (1), (3), and (5) show that the impact coefficient of digital economy on electrification, hollowing out of industrial scale, and hollowing out of industrial efficiency is significantly positive with 0.112, 0.023, and 0.448, indicating that digital economy can increase the electrification, promote the hollowing out of industrial scale, and expand the hollowing out of industrial efficiency. It can be seen from columns (2), (4), and (6) that the regression coefficients for the relationship between electrification, hollowing out of industrial scale, and hollowing out of industrial efficiency and GTFEE are all significantly negative with − 0.032, − 0.113, and − 0.005, all of which pass the Sobel test, indicating that digital economy can negatively impact GTFEE through promoting electrification, hollowing out of industrial scale, and hollowing out of industrial efficiency. As a result, GTFEE indirectly reduced by digital economy with − 0.004, − 0.003, and − 0.002, respectively.

Table 4 Estimation results of mediation effect

The possible reasons for above finding are as follows: first, the industry digitalization has promoted further electrification that increases the consumption of electricity, due to low ratio of electricity supplied by renewables in China, which increases the greenhouse gas emissions, and thereby the positive effect on the GTFEE caused by energy efficiency has been decreased. Second, compared to the industrial digitalization, digital services have been growing faster, which have been penetrated in Internet business, product service, and daily life service. More and more individual requirements have been recognized and been satisfied; therefore, the potential to save energy due to increases in energy efficiency is outbalanced by rise in the services derived from digital economy and hollowing out of industrial scale caused by rise in the special customization. As the traditional service industry and its facilities increase energy demand, the flow of factors of production to the tertiary industry does not reduce energy intensity (Luan et al. 2021). Third, the digitalization needs high education levels and highly skilled labors; however, the human capital improvement cannot meet the request in short time, which brings out wage polarized and inequality income; as a result, the digitalization lacks the ability to increase the labor productivity, which decreases the potentials to increase the industrial efficiency and the energy efficiency leading to impede the improvement in GTFEE. Therefore, digital economy can affect the GTFEE by affecting electrification, hollowing out of industrial scale, and hollowing out of industrial efficiency.

Estimation results for the dynamic threshold panel model

As noted in the “Methodology and data” section, this study uses dynamic threshold panel models to verify the threshold effect, where the threshold variable is digital economy development (lnDig), environmental regulations (lnEnv), or R&D investment (lnRD). Table 5 shows the threshold values and confidence intervals for lnDig, lnEnv, and lnRD. The Z statistics and P values show that all dynamic threshold panel models with different threshold variables reject the null hypothesis of no threshold effects at the 1% significance level, indicating an obvious threshold effect with digital economy development showing a nonlinear impact on GTFEE.

Table 5 The threshold value of different threshold variables and its confidence interval

This study takes lnDig, lnEnv, and lnRD as threshold variables. Table 6 shows the regression results for the dynamic threshold panel models, which indicates the nonlinear correlations between the digital economy and GTFEE with different threshold variables. First, when we use digital economy development (lnDig) as the threshold variable, the correlation of digital economy development on GTFEE is positive with 0.093 at the 1% significant level. With the development of the digital economy, the subsequent industry digitization and digital governance can improve the efficiency of production and total factor productivity and accelerate the decline in energy consumption intensity (Pan et al. 2022). Second, while the R&D investment is over the threshold value, the effect of the digital economy on GTFEE is positive with 0.128 at the 1% significance level. Technical efficiency is the main moderating effect for improving energy efficiency (Zhu et al. 2019; Chen et al. 2021). With the advancement of technologies, especially energy conservation technologies, as well as industrial structure upgrades and improvements to energy efficiency and information management, digital economy development will improve the local GTFEE significantly (Lv et al. 2020). Third, environmental regulations have an adaptability relationship with the evolution of energy consumption structures (Ekins et al. 2012). Currently, environmental regulations can improve GTFEE, but the impact will become negative when too much emphasis is placed on environmental regulations that do not match the level of development of digital technologies.

Table 6 Regression result of dynamic threshold panel models

Estimation results for the SDM

Spatial correlation test

Based on the geographic weight matrix, we use Moran’s I and Geary’s C indexes to evaluate the spatial correlation of GTFEE in various regions of China. Table 7 shows that the global Moran’s I and Geary’s C indexes values for GTFEE and digital economy development (lnDig) from 2003 to 2018 are significantly positive at the 1% level. The null hypothesis of no spatial autocorrelation is significantly rejected. Therefore, China’s GTFEE and digital economy development have significant spatial autocorrelation, and conducting spatial econometric analysis is appropriate. The Moran’s I scatterplots (see Fig. 2) show that most cities are distributed in the third quadrant, and the clusters indicate that GTFEE has significant local spatial agglomeration characteristics.

Table 7 The spatial correlation test results
Fig. 2
figure 2

The scatterplots map of Moran’s I in 2003 and 2018

Model selection test

Table 8 shows the diagnostic test results for the spatial econometric model. Under the 0–1 rook spatial weight matrix (W1), the value of the Lagrange multiplier (LM) test is positive at the 1% level, and the Wald test under W1 is also passed at the 1% level. However, the robust LM lag test was not passed; therefore, we report the results for the SAR model and SDM under W1. In addition, using the inverse distance geographic matrix (W2), we find that the values for the LM, robust LM, Wald, and LR tests are all positive at the 1% level; therefore, the choice of the SDM is reasonable. In summary, we choose to use the SDM with a fixed model under W1 and W2 to estimate the spatial spillover effect between digital economy development and GTFEE.

Table 8 Diagnostic test results for spatial model

Spatial effect estimation results

Table 9 reports the estimation results of spatial effects. It can be found that the regression coefficients for each variable in the estimation results from the SDM under different spatial weight matrixes and the SAR model under W1 are all negative at the 1% significance level, which are basically consistent with the estimated coefficients for the nonspatial models and show the robustness of our spatial econometric models to a certain extent.

Table 9 The impact of digital economy development on GTFEE

This paper focuses on analyzing the regression results from the SDM under different spatial weight matrixes (i.e., W1 and W2). Table 9 shows that the spatial correlation coefficient ρ is significantly positive, which indicates that the GTFEE has a significant spatial spillover effect. Considering the core explanatory variables, the coefficients for digital economy development are all negative and pass the significance test at the 1% level. The results based on the SDM show that digital economy development currently has a significantly negative impact on regional GTFEE. The investment in digitization in Chinese prefecture-level cities may promote increased energy consumption in traditional industries. In addition, Internet development increases the scale of energy consumption through economic growth (Ren et al. 2021), and the negative impact of ICTs on productivity is still existed in China (Chen and Xie 2015).

Finally, we discuss the influences of other control variables on GTFEE. The regional economy development level (lnGDP) improves GTFEE, while the FDI (lnFDI) has a positive effect on GTFEE (Pan et al. 2020). In meeting the target of high-quality development, local government public finance (lnGov) has a significantly improved effect on the GTFEE. The urbanization level (lnUrb) has a negative effect at the 5% confidence level under W2 (Li et al. 2018). The digital economy infrastructure promotes traditional industries’ investments during the early stage of its construction; therefore, investment (lnInv) has a negative effect on GTFEE.

Estimation results for the decomposition effects

To further analyze the effect of digital economy development on regional GTFEE, this paper decomposes the impact of the digital economy on GTFEE into direct and spillover effects under the SDM, using W1 and W2 (Table 10). Columns (1) ~ (3) report the estimation results under 0–1 rook spatial weight matrix (W1), and columns (4) ~ (6) report the results under the inverse distance geographic matrix (W2). Compared with using the different weight matrixes (W1 and W2), Table 10 shows that although the decomposition results are slightly different, the direct effects of the digital economy on GTFEE are all negative at the significance level of 1%. With rapid digitization, investment in traditional industries increases alongside investment in digital infrastructure, industrial digitization, and digital industrialization; however, improved technological efficiency cannot eliminate the related increase in energy consumption. Therefore, regional digital economy development has a negative effect on regional GTFEE (Chen et al. 2021).

Table 10 Estimation results of decomposition effects

However, the indirect effects of the digital economy on GTFEE under W1 and W2 are significantly positive at the 5% and 1% levels, respectively. Taking the results from columns (4) ~ (6) under W2 as an example, the spillover effect of digital economy development on regional GTFEE is 0.312 at the significance level of 1%, and the direct effect is − 0.056. Therefore, the total effect is positive with 0.256 at the significance level of 1%. The results show that digital economy development has a significant spatial spillover effect on regional GTFEE. Moreover, due to the nature of the SDM, the scope of this spatial overflow is global. That is, the spatial overflow does not occur only in local neighboring regions. This result shows that the greater the digital economy input and the more advanced the digital economy at the regional level, the higher the level of digital development in neighboring regions, which will likewise feed back into the original regions. The development of Internet technologies, which is the basis of the digital economy, accelerates the flow of information, reduces the cost of information transmission, and greatly shortens the spatiotemporal distance between regions. The increasing use of Internet technologies increases management efficiency, expands markets, and improves energy consumption structures. Thus, digital economy development promotes improvements in the GTFEE of neighboring regions by improving the quality of innovation and upgrading industrial structures (Su et al. 2021).

Estimation results for the heterogeneity analysis

Different analysis of linear regressions

We study the heterogeneity of the baseline results for the geographical location and digital economy development level. Because the economic and digital economy development levels differ across the vast territory of China, we divide our sample into smart and non-smart cities to analyze their different effects on GTFEE based on the demonstration sites for the Broadband China Strategy selected by the Ministry of Industry and Information Technology and the National Development and Reform Commission in three batches in 2014, 2015, and 2016 (Li et al. 2021b). The level of digital economy development is higher in smart cities than in non-smart cities; however, the demand for investment in digital infrastructure is higher in non-smart cities than in smart cities.

Table 11 shows the results of the regression. Columns (1) and (2) represent the basic dynamic panel model, columns (3) and (4) present the moderating effect of R&D investment (lnDig × RD), while columns (5) and (6) include the interaction of environmental regulations (lnDig × Env). From columns (1) and (2), the correlations between the digital economy and GTFEE are − 0.014 and − 0.016 in smart cities and non-smart cities, respectively. This result indicates that the negative effect on regional GTFEE in non-smart cities is more significant but becomes weaker with increasing digital economy development.

Table 11 Estimation results of heterogeneity analysis

In columns (3) and (4), considering the moderation of regional R&D investment, the values for the interaction effect are 0.001 and 0.003 at the significance level of 10% in smart and non-smart cities, respectively, which indicates the positive influence of digital technology development on regional GTFEE with higher R&D investment. The result shows that technological progress is an important way for the digital economy to improve GTFEE in regions with a developing digital economy (Li et al. 2021b). In addition, under environmental regulations, as shown in columns (5) and (6), the effect of digital economy development on regional GTFEE is negative in smart cities but positive in non-smart cities. However, these results are no longer significant, which may show that the digital economy has no positive effect on GTFEE in cities with higher levels of digitalization governance developed by regional governments.

Different analysis of the nonlinear regressions

Table 12 shows the different analysis of the nonlinear regressions in different city groups, where columns (1) and (2) report the results using the digital economy (lnDig) as the threshold value, columns (3) and (4) present the results using the R&D investment (lnRD) as the threshold value, while columns (5) and (6) show the results using the environmental regulations (lnEnv) as the threshold value.

Table 12 Heterogeneity analysis of non-linear regression

As shown in columns (1) and (2), the correlations of digital economy on GTFEE are − 0.199 and − 0.028 below the threshold value, while the correlations are 0.225 and 0.009 at the significance level above the threshold value, which indicates that digital economy development improves GTFEE while the development of digital economy is above the threshold variable. Considering R&D investment (lnRD) as the threshold variable, in column (3), it can be found that the impact of the digital economy on GTFEE in smart cities is negative with − 0.049, while it is positive with 0.077 at the 1% level when the R&D investment is over the threshold value of 1.0269. From column (4), however, the threshold values do not show clear changes and always show a negative impact on GTFEE in non-smart cities. These results indicate that the digital economy improves GTFEE when moderated by R&D investment in matching the development level of the digital economy; however, this will inhibit the improvement in GTFEE. Finally, considering environmental regulations (lnEnv) as the threshold variable, in columns (5) and (6), it can be seen that the correlations of digital economy on GTFEE are 0.159 and 0.026 at the significant level of 1% below the threshold value in smart cities or not, while the impacts of the digital economy on GTFEE are negative in different groups over the threshold value, which shows that environmental regulations should be matched with the development of the digital economy; otherwise, it will restrain the improvement in GTFEE.

Robustness test for the nonspatial econometric model

To verify the reliability of the regression results, we also conduct the following robustness tests shown as in Table 13. First, according to Yang et al. (2019), we adopt the gradient of each city as the instrument variable. Although urban gradient affects digital infrastructure construction, it does not change with the change of economic development, which meets the requirement of exclusion. In column (1), the result shows that the coefficient of digital economy on the GTFEE is significant and negative at the 1% level.

Table 13 Empirical results of robustness tests

Second, in order to avoid measurement deviation of digital economy indicators, we replace explanatory variables. The Broadband China strategy in China was officially launched in 2014, which represented the government’s support for information infrastructure and digital infrastructure. Regarding the piloted cities of Broadband China strategy as the exogenous policy shock of digital economy, we introduce a difference-in-differences (DID) to verify the relationship between digital economy and GTFEE. From column (2), it can be found that the coefficient of digital economy is negative and significant at the 5% level, reconfirming the reliability of our finding. Besides, we replace the comprehensive index of digital economy calculated by the main Internet Indicators and the digital financial inclusion index obtained from Peking University. In columns (3) and (4), the results of regression under OLS_FE and SYS-GMM are shown that it is significant the coefficient of digital economy with − 0.614 and − 0.377 at the 5% level.

Finally, we refer to Li et al. (2021a) in replacing the calculation method for GTFEE in our robustness test. This paper calculates the GTFEE values using an EBM model, which is a hybrid or composite model with both radial and non-radial distance functions. The EBM model can deal with cases where input and output variables have both radial and non-radial characteristics (Gao et al. 2021). We measure GTFEE by the EBM method as EBMEE, which is used as the explanatory variable. We conduct the empirical regressions again for each model above. Columns (5) and (6) in Tables 13 show that the coefficient for digital economy development is significantly negative at the 5% level under OLS_FE and SYS-GMM. The overall results of the robustness test based on linear regression are consistent with those in Table 3, showing the robustness of our conclusion. The results of the robustness test of the nonlinear regression in Table 14 also match the estimated results in Table 6, demonstrating the robustness of the nonlinear relationship between the digital economy and GTFEE.

Table 14 Robustness test of non-linear regression

Conclusion and policy implications

This study constructs a comprehensive measurement system for the digital economy and GTFEE based on the panel data from 281 prefectural-level cities in China from 2003 to 2018. This paper adopts OLS regression and system GMM estimations to empirically analyze the direct impact of digital economy development on GTFEE, the intermediary mechanisms of R&D investment and environmental regulations, and the mediation effect of electrification, hollowing out of industrial scale, and hollowing out of industrial efficiency. The dynamic threshold panel model is set up to reveal the nonlinear relationship between digital economy and GTFEE with digital economy development, R&D investment, and environmental regulations as threshold variables. Furthermore, this paper adopts the SDM to analyze the indirect impact of the digital economy on GTFEE under 0–1 rook spatial weight matrix (W1) and reverse distance geographic weight matrix (W2). Finally, this study divides the research samples into different regions (i.e., smart and non-smart cities) to study the regional heterogeneity of the effect of digital economy development on GTFEE.

Our main research conclusions are as follows. First, digital economy development has a negative direct effect on GTFEE, and the robustness test after replacing the calculation method for GTFEE is still valid. Second, the results for the transmission mechanism show that digital economy development can improve GTFEE through technological progress and environmental regulations, while it also can reduce GTFEE through the mechanisms of electrification, hollowing out of industrial scale, and hollowing out of industrial efficiency. Third, the regression results from our dynamic threshold panel model show that although much stricter environmental regulations will lead to a decline in GTFEE, the effect of increasing digital economy development on GTFEE significantly inverts from negative to positive. Fourth, when the SDM is used with different spatial matrixes (i.e., W1 and W2), the indirect effects of digital economy development on GTFEE are significantly positive. Finally, in terms of different regions, the negative effect of digital economy development on GTFEE in smart cities is weaker than that in non-smart cities. In addition, technological progress significantly promotes the positive effect of the digital economy on GTFEE when above the threshold for R&D investment. Regardless of whether in smart cities or in non-smart cities, however, the positive effect of the digital economy on GTFEE inverts from positive to negative when above the threshold for environmental regulations.

Based on our research conclusions, we propose the following two policy recommendations.

Considering the negative effect of the digital economy on GTFEE, to achieve the win–win outcome of fostering economic development while inhibiting haze pollution in China, local government departments should play an active role in promoting the development of green technologies. First, with the spread of digital networks, the energy costs and electrical requirements for telecommunication companies and Internet service providers’ infrastructure are continuously increasing. To achieve energy savings, government departments should promote advanced Internet technologies and projects and develop standard processes and related infrastructure to design and invest in green networks and data centers with energy-aware systems. Second, to mitigate the adverse effects of the digital economy on GTFEE, government departments should promote the use of renewable energy and provide support for improving the green competitiveness of industrial enterprises. Meanwhile, data ownership should be clarified and protected by the law system, which can promote sharing and exchanging the data, and can decline the repetitive storage and computing to reduce the electricity consumption and greenhouse gas emissions. Therefore, government departments should highlight the cost-effective utility of participating in the digital economy and changing energy consumption structures to achieve carbon intensity targets.

Taking the negative effect of digital economy on GTFEE by the mechanisms of electrification, hollowing out of industrial scale, and hollowing out of industrial efficiency, the following measures could be taken to reduce the negative effect and improve the GTFEE. First, industry 4.0 should be rapidly constructed to reshape the scenes of product process, management, marketing, and sales, which can improve the industry productivity giving rise to save energy and thereby enhance the GTFEE. Second, the policy system should be perfected to prevent the monopoly raised from the Internet business that would cause the loss of industry efficiency. Third, the digitalization because of digital technologies requests higher education level and highly skilled labors; to match the request, the government and corporations should provide more chances for the labors to further study; additionally, the labors can learn more through sharing knowledge.

The findings show that with greater digital economy development and technological progress, digital economy development can more significantly promote GTFEE. However, there is a spatial spillover effect of the digital economy on GTFEE. Therefore, government departments and enterprises should work to construct an “Environmental Observation Web” as an observation center based on cross-cluster systems to observe and present environmental data in a standardized way to understand environmental processes and their interdependencies. The Environmental Observation Web incorporates environmental data with the geospatial and scalable processing capabilities of Internet-based tools, such as cloud computing, IoT, and big data processing. An advanced, integrated environmental assessment system that incorporates the socioeconomic, energy, and digital technology systems, such as IoT and cloud-based novel approaches, should be built to achieve the dynamic, real-time collection of energy consumption–related data. Local governments should focus on spilling over their technological innovations across regional barriers, launching cooperative programs, and constructing decentralized infrastructure to strengthen the heterogeneous impact of the digital economy on GTFEE in different regions.