Foreign Trade, FDI and the Upgrading of Regional Industrial Structure in China: Based on Spatial Econometric Model

: The upgrading of industrial structure is the core means of coordinating economic development and environment protection. Its spatial agglomeration can also reduce environmental pollution partly. The upgrading of China’s industrial structure has become an important issue concerned by the whole society. To better understand this issue, based on the provincial data of China (1997–2017), this paper strives to explore the spatial e ﬀ ects of foreign trade and foreign direct investment (FDI) on the upgrading of China’s regional industrial structure by constructing the weight matrix of economic distance, and by introducing the spatial autocorrelation analysis method and spatial panel econometric model. The results show that: 1. The Moran’s I index of China’s import, export, FDI, and industrial structure upgrading has passed the 5% signiﬁcance level test, displaying remarkable spatial agglomeration characteristics. 2. Foreign trade and FDI are important driving factors to upgrade China’s industrial structure. 3. Foreign trade has a signiﬁcant spatial spillover e ﬀ ect. Imports and exports can not only promote the upgrading of local industrial structure, but also radiate to other regions, promote or inhibit the development of its industry, and further a ﬀ ect the national data. 4. The spatial spillover e ﬀ ect of FDI is not signiﬁcant. Finally, some policy suggestions are put forward.


Introduction
Basically, the development of a regional economy is the development of industry. Although the development of traditional industries contributes a lot to economic growth, its negative effects such as high energy consumption, high pollution, and low output are seriously hindering the upgrading of industrial structure of traditional industries, which brings a dilemma and needs to get out urgently. Maintaining the momentum and sustainability of traditional industries after they reach the mature stage is a serious problem faced by all countries in the world. The optimization of industrial structure and the advanced level of industrial development can accelerate the speed of economic development. Scholars in the world have also studied the upgrading and transformation of traditional industries from a strategic perspective. Many countries, such as the USA, the United Kingdom, Germany, and Japan, have experienced a decline in economic growth due to the limitations of traditional industries. These countries have promoted the upgrading or transformation of traditional industries and maintained stable economic development by adjusting their traditional industrial structures.
The growth of the global economy and economic interdependency among countries has gradually transformed the global market into an integrated world-wide market of commodity, service, and capital.
Opening up trade has become an important way for economic development in many countries and a major driver for economic globalization. From the outbreak of the global financial crisis in 2008 to the gradual recovery of the economy in 2017, the global foreign direct investment (FDI) has gradually achieved a strong recovery. The total inflow of FDI amounts to 14.30 trillion US dollars, of which cross-border mergers and acquisitions play a major role in the strong growth of global FDI.
From the beginning of the 21st century, China has become a major player in the international economy by vigorously developing resource-intensive and labor-intensive industries. However, behind the rapid growth of the economy are huge energy consumption and pollutant emissions. Industrial structure is an important factor of ecological environment. The adjustment and upgrading of industrial structure has become the core tool to coordinate economy and environment. Since China is in the middle and late stages of industrialization, industrial growth is still the major driver for economic development. Therefore, the focus of China's industrial transformation is industry, especially the manufacturing industry. Since China's reform and opening up in 1978, China has adopted an economic mode that relies heavily on the extraction of natural resources. China has hence been given the nickname of "World Factory" thanks to its industrial development, which, on the other hand, has also brought serious environmental pollution. China has become the world's largest carbon emitter since 2006, and the world's largest energy consumer since 2009. The paradox between economic development and environmental protection has become increasingly prominent, greatly affecting people's life and attracting significant attention from the government and academia. A series of policies have been introduced from the central government to the local government in China to promote the upgrading of industrial structure in order to alleviate the negative ecological environment impact brought by industrial development.
Although the structure of China's industrial development has been significantly improved in recent years, the imbalanced and unsustainable nature of China's economic development in various industries remains acute. Both of these features will become an essential obstacle in realizing the transformation of China's economic growth model. Foreign trade and FDI are an indispensable part of China's economy, driving the flow of capital, technology, and human resources among different sectors. Considering the significance of foreign trade and FDI, how does the expansion of the scale of foreign trade and the inflow of FDI drive the optimization and upgrading of China's industrial structure? How do positive spillover effects form across regions? The analysis of the above problems has important theoretical and practical significance for effectively identifying the influencing factors and laws, exploring the path of industrial adjustment, and for promoting the dynamic mechanism of sustainable development.
To better understand this issue, based on the provincial data of China (1997-2017), this paper strives to explore the spatial effects of foreign trade and foreign direct investment (FDI) on the upgrading of China's regional industrial structure by constructing the weight matrix of economic distance, and by introducing the spatial autocorrelation analysis method and spatial panel econometric model.
The rest of this paper is organized as follows: Chapter 2 lays out the literature review and hypothesis. Chapter 3 introduces variables and models. The fourth part is empirical results and analysis. Finally, the fifth part puts forward research conclusions and policy recommendations.

Literature Review
As one of the most important channels through which capital flows in and accelerates investment, FDI has significant impact on the economic development of a region (or a country). FDI benefits developing countries and emerging markets the most, even in the long run [1]. Japan and Korea are the two most famous cases for this correlation as the FDI promoted GDP and capital accumulation from 1968 to 1997 [2]. More importantly, FDI not only promotes international trading, but also facilitates capital flow [3], and some might even argue that FDI helps improve inclusive development [4].
China also benefits from FDI, which brings more than economic development. FDI in China even suppresses carbon emission [5] and optimizes ecological footprint [6]. Thus, this paper is focused on the problem relating to FDI in China.
According to the current literature, the degree of foreign capital entry will have an important impact on industrial upgrading of the host country [7]. For example, according to the international investment theory, Kojima's marginal industry expansion theory (1977), Akamatsu's flying geese model (1932), and Ozawa's growth stage model theory (1993) explain the mechanism and effect of foreign direct investment (FDI) on industrial upgrading in the home country in different degrees. But the theories on its impact mechanism and direction has not been unified. On the one hand, after the entry of foreign capital, the domestic industry is incorporated into the global value chain dominated by transnational corporations. Owing to the motivation of monopoly and competition of multinational corporations, combined with the weakness of technology and talent of the developing countries, the international division of labor dominated by multinational corporations is easily locked in the low-end of the value chain [8,9]. On the other hand, according to the literature of FDI spillover effect, FDI entry may also lead to positive upgrading effect or negative crowding-out effect through technology spillover effect [10]. Lipsey (2000) [11] believed that the development of international trade will promote the allocation of domestic resources and the adjustment of industrial structure, which will affect economic growth and fluctuation through the adjustment of domestic resource price. Blomstrom et al. (2000) [12] and Advncula (2000) [13] respectively verified the role of FDI in promoting the economic structure change and industrial structure adjustment of Japan and South Korea. Also, the extension of FDI means the high-end technology brought by multinational enterprises, which will contribute to the imitation of technological innovation for the developing countries (Balaine, 2009) [14]. On the other hand, some scholars argue that FDI brings bad effects on the national economy, such as the decrease of employment and wages (Davis and Huston, 1992) [15], international trade deficit and the decrease of employment rate (Barrell & Pain, 1997) [16], and the increase of unemployment rate (Blomstrom & Kokko, 1997) [17].
Domestic researches in China mainly focus on the impact and regional differences, most of which affirm the positive impact of foreign trade and FDI on industrial structure. Huang Qingbo (2010) and Chen Jianhua (2009) [18,19] believed that there is a long-term and stable co-integration and one-way causal relationship between foreign trade and industrial structure. Zhao Hong (2006) [20] also agreed on the role of FDI in the optimization of China's industrial structure, but believed that there was no long-term stable relationship between the two. Xu Dong (2013) [21] proposed that foreign trade drives the development of secondary industry, and that FDI promotes the upgrading of industrial structure. Wang Fei (2011) [22] presented that the optimization of export trade structure plays a more important role in the optimization of industrial structure than that of import trade structure. Others argued that the imbalance of regional development determines the difference in the influence mechanism of regional development on the optimization of industrial institutions [23]. Zhang Jie (2013) [24] and others elaborated on the inverted "U" effect of foreign trade on the evolution of industrial structure, and proposed that China's export-oriented development model is conducive to accelerating the process of industrialization, but may inhibit the evolution of industrial structure to service. Jia Nisha and Han Yonghui (2018) [25] used the non-parametric panel model to test and study, showing that the two-way FDI has a "U" and "J"-shaped non-linear adjustment effect on industrial structure upgrading, respectively. Yang Liping and Yang Lihua (2016) [26] believed that with the expansion of foreign trade, the level of industrial structure first declines and then raises. Sun Xiaohua (2013) [27] carried out an empirical test based on the semi-logarithmic model and structural effect, and found that the positive impact of import and export structural effect on industrial structure has a certain time lag.
Since the end of the 20th century, global warming has become one of the most acute problems in the international community, and carbon emissions related to human activities have been considered as the main cause of global warming [28][29][30]. The upgrading of industrial structure is the core means of coordinating economic development and environment protection. In recent years, China has become the world's second largest economy with rapid economic growth, but at the same time, China also consumes more energy and produces more carbon emissions [31]. China is striving to achieve steady economic growth and adjust its industrial structure. The evolution of industrial structure reflects the change of China's economic growth mode and has an important impact on China's ecological environment [32]. It is found that there is a close correlation between carbon emissions and industrial structure, energy structure, and energy intensity [33][34][35]. The upgrading of industrial structure plays an important role in improving the efficiency of carbon emissions and reducing carbon emissions [36]. According to optimistic estimates by scholars, more than 70% of carbon intensity target was attributed to the upgrading of industrial structure [37].
FDI has two effects on industry. On the one hand, FDI can bring advanced technology and management, which in turn improves the technology and quality level of domestic enterprises through knowledge and technology spillover. On the other hand, foreign strict environmental regulation policies may encourage enterprises with high energy consumption and high pollution emissions to transfer to China, without contributing to China's low-carbon development. The spatial agglomeration of industrial structure upgrading can reduce environmental pollution to a certain extent [38][39][40]. Firstly, with the continuous development and expansion of industrial upgrading agglomeration areas, the scale effect is conducive to the centralized management of pollutants, and improves the efficiency of pollutants and waste disposal, thus realizing the scale economy of pollution control. Secondly, spatial agglomeration can bring specialization of industrial division and cooperation between upstream and downstream enterprises in the industrial chain, contributing to the recovery of pollutants and the formation of circular economy. Thirdly, spatial agglomeration is conducive to knowledge spillover and technological innovation, encouraging enterprises to improve production technology, adopt green production technology, and to reduce pollutant emissions, thereby reducing environmental pollution in agglomeration areas [41].
Spatiality is too important to be ignored. The spillover effect of region is also due to spatiality. Some economic behaviors in a region may be influenced by neighboring regions, so they tend to show spatial dependence or spatial correlation (Anselin, 1988) [42]. Spatiality influences FDI [43]. What's more, spatiality affects industrial structure as well [44]. From ancient times, geographic spatiality determines the population density considerably [45], and still determines the transporting cost even with the rapidly improving technologies [46]. For example, the regional labor market depends somewhat on geographic factors, which affects the cost of industrial corporations and thus influences the spatial gathering [47]. Once a metropolitan has formed, labor and enterprises would gather, because of the compensating productivity and bigger market [48]. This relationship can be found between the wage and consumption of American counties [49]. The agglomeration effect of industrial structure upgrading refers to the influence of regional industrial structure upgrading on surrounding areas. Zhou et al. (2019) [50] studied the role of industrial structure in the evolution of ecological efficiency, focusing on the spillover effect of industrial structure upgrading. Spatial interactions warrant the acceleration of economic integration between ASEAN countries to continuously attract FDI [51]. Ni et al. (2017) [52] used firm-level data to study FDI spillover effects in Vietnam, controlling for the origin of foreign investors.
Based on the domestic and foreign researches, there are plenty of literatures on the impact of foreign trade and FDI on industrial structure. The upgrading of industrial structure can effectively coordinate the relationship between economic development and environment protection, paving the way for this study. However, there is the absence of attention on the spatial spillover and radiation effect of foreign trade and FDI, ignoring the spatial linkages and correlations among domain units. Based on this, through the spatial panel econometric model, an empirical analysis will be made in this paper on the spatial effects of foreign trade and FDI on the upgrading of China's industrial structure. From this perspective, in addition to studying these issues, there are three aspects of significance: First, China's total volume of goods trade has ranked first in the world for more than ten consecutive years, and its FDI has also ranked first or second in the world for many years. Therefore, the analysis of the relationship among foreign trade, FDI, and the upgrading of the industrial structure of the countries that play the leading role in Global trade and FDI can provide some reference for other countries to promote economic development and industrial structure upgrading through foreign trade and FDI. Second, even if foreign trade and FDI have a general rule in most of industrial structure upgrading, it does not mean that each country has the same content, variables, and mechanisms. This paper is written to find the characteristics of China in these specific details. Third, after China's reform and opening up, the unbalanced development strategy is adopted for economic development. There are great differences among different regions, and the competition of economic development is very fierce. This research has certain practical significance for the development of various regions in China.
The following contents are mainly divided into several parts: Research hypotheses, variables and models, empirical analysis, and conclusions.

Research Hypotheses
In summary, most literatures of industrial research still examine foreign trade, FDI, and industrial structure as individual factors, assuming that there is no link between adjacent regions, which is obviously inconsistent with the facts. As Anselin (1988) [42] pointed out, "Almost all spatial data have the characteristics of spatial dependence or spatial autocorrelation", it is necessary to fully consider the spatial effects between regions in industrial research. In this study, the following hypotheses will be introduced into the spatial econometric model to explore the spatial effects.

Hypothesis 1. There are spatial effects of foreign trade and FDI on the upgrading of industrial structure in all provinces of China.
Hypothesis 2. The development of foreign trade and FDI is conducive to the upgrading of regional industrial structure, thus promoting long-term sustainable economic development.

Hypothesis 3.
Foreign trade and FDI have spatial spillover effects on Provincial Industrial structure, the changes of which not only affect the industrial structure of the region, but also radiate to the surrounding areas through spatial transmission mechanism.

Dependent Variables
The proportion of the added value of the first, second, and third industries in the GDP of a country (or region) is the most important indicator to describe the three types of industrial structure. Industrial upgrading is a kind of gradual change from the first industry, the second industry to the third industry, which is mainly manifested as the transfer from the first industry to the second and the third industry [53]. In 2018, the added value of China's tertiary industry accounted for 52.2% of GDP, which is far lower than that of developed countries (for example, Germany accounted for 68% in 2017) and many developing countries (for example, Brazil accounted for 72.8% in 2017). Therefore, using the third industry alone to measure China's industrial upgrading is not very consistent with China's actual situation. Based on this, in this paper, the proportion of the sum of secondary and tertiary industry output values to GDP (IS) will be used as an indicator to measure the upgrading of industrial structure. Meanwhile, it is necessary to divide the industry into three sectors and consider the characteristics of the industrial structure, which is of great significance for exploring the links between departments and promoting supply-side reforms [54].

Independent Variables
Foreign trade includes import trade and export trade, characterized by the proportion of total imports to GDP (EP) and total exports to GDP (EX), respectively. FDI is reflected by the proportion of total FDIs to GDP in different regions. The data of imports, exports, and FDI are converted into RMB at the average exchange rate of the year.

Control Variables
Based on the research results of Jiang Zehua (2006) [55] and Liu Xiaolu (2014) [53], the control variables affecting the upgrading of industrial structure are divided into consumption demand, investment supply, technological progress, and urbanization. 1. Consumption demand: Including resident demand and government demand, which are characterized by per capita resident consumption level (RC) and government expenditure as a percentage of GDP (GE). 2. Investment supply: The direction and level of social investment will directly affect the development level of industrial structure, mainly including material and human investment. According to the research results of Zhang Cuiju [56], energy investment is included in the model, which is characterized by per capita capital stock (SK), per capita years of education (SH), and per capita energy consumption (EC). Among them, the algorithm of capital stock refers to the perpetual inventory method of Shan Haojie (2008) [57]. 3. Technological progress: Characterized by the proportion of internal expenditure on research and experimental development to GDP (RD). 4. Urbanization: The urbanization level of the region is characterized by the proportion of urban population to the total population (UR).

Sample Data
This paper analyzes the data of 30 provinces, autonomous regions, and municipalities in China from 1997 to 2017. Due to the serious lack of Tibet's economic data, which is generally excluded when studying China's economic problems. Taiwan Province, Hong Kong, and Macao are special economies which keep separate accounts in China, so the four regions are not included. In addition, since Chongqing was independent from Sichuan Province as a municipality directly under the central government in 1997, the number of provincial units in China increased from 30 to 31. Therefore, most analysis of China's economic data are divided into two stages: Before and after 1997. Based on the above, this paper focuses on the situation after 1997.
In this paper, for nominal variables expressed in current price, the corresponding price index is used to reduce them to the actual value based on 1997. The data of foreign direct investment is converted into RMB using the average exchange rate of the year. All data are logarithmic, and each data set includes 630 data values. Data are from China Statistical Yearbook, China Foreign Trade Statistics Yearbook, China Energy Statistics Yearbook, and China Labor Statistics Yearbook.
From the data collection, we can find that the highest level of industrial structure upgrading is in Beijing at 99.57%, and the lowest is in Hainan at 62.61%. China's industrial structure shows a continuous upward trend in the sample range, from 0.79 in 1997 to 0.92 in 2017. Taking data in 2017 as an example, the industrial structure level of China's province is divided into three levels. The first is that the provinces with industrial structure above 0.95 are: Shanghai, Beijing, Tianjin, Shanxi, Zhejiang, Guangdong, and Jiangsu. The second category is between 0.9-0.95, including Ningxia, Qinghai, Shaanxi, Chongqing, Hunan, Hubei, Henan, Shandong, Fujian, Anhui, Liaoning, Jilin, and Hebei. The third category is below 0.9, including Inner Mongolia, Heilongjiang, Guangxi, Gansu, Yunnan, Guizhou, Sichuan, Xinjiang, and Hainan. It can be found that the first category of China's industrial structure is basically concentrated in coastal provinces, while the second and third categories are mainly distributed in inland provinces. More details are shown in Table 1.

Spatial Econometric Model
In 1997, Paelinck, an econometric economist in the Netherlands, first proposed "Spatial Econometrics", which has been continuously studied and developed by Anselin [42] and other scholars, and has been widely used in regional economic development and other issues. Spatial Lag Model (SLM), Spatial Error Model (SEM), and Spatial Durbin Model (SDM) are the main spatial econometric models included in this paper, representing different spatial interaction mechanisms [58,59]. Among them, the spatial interaction effect in SLM comes from the substantive relationship of spatial units, which is reflected by introducing the spatial lag term of dependent variables; SEM considers the spatial interaction effect of error items that may be omitted in the process of model construction; SDM covers the above two spatial effect mechanisms, that is, the spatial effect mechanism comes from endogeny, exogenous explanatory variables, and spatial errors. Three spatial models are defined as: Spatial Lag Model (SLM): Spatial Error Model (SEM): Spatial Durbin Model (SDM): where, Y-variables being explained; X-exogenous explanatory variable matrix; ρ-spatial correlation coefficient of the explained variable, representing the spatial autoregressive coefficient to reflect the degree of interaction between the explained variable and the adjacent region; β-regression coefficient of explanatory variable; φ-spatial correlation coefficient of explanatory variables; Λ-spatial correlation coefficient of the error term; ε-random error term. Anselin (1988) [42] proposed a spatial econometric model to investigate the spatial spillover effect. Lesage and Page proposed using partial differential to measure the spatial spillover effect of explanatory variables [60]. Specifically, the inverse Tiff matrix is incorporated into the SDM and the Formula (3) is transformed into: In practice, the average indirect effect of the k-th explanatory variable is obtained by D-times extraction, and the partial differential matrix formula (5) is formed. The diagonal line of the matrix corresponds to the direct effect of the explanatory variable, while the non-diagonal line represents the indirect effect. The existence of spatial spillover effect is determined by observing the significant degree of the indirect effect.

Selection of Weight Matrix
Before spatial econometric analysis, the suitable spatial weight matrix should be constructed. In practical research, the weight elements in the matrix represent the dependent relationship and degree among spatial units, and the selection method with great influence. At present, the common weight matrices are: 1. 0-1 matrix, which is set according to whether the regional units are adjacent or not. It has the advantages of simplicity and practicability, and has been widely used, but its overly harsh assumptions are only applicable to research problems with obvious boundary. 2. Geographic weight matrix, which considers distance as the key factor of regional connection, mainly includes finite distance matrix and distance attenuation matrix. The former considers that the connection of spatial units will only occur at a certain distance, beyond which the spatial connection will disappear; the latter puts forward the hypothesis that the spatial connection between regions will decrease with the expansion of spatial distance. 3. Economic weight matrix, which is set mainly according to the degree and level of economic development, holds that the spatial relationship between units is non-reciprocal, and the radiation level of developed areas to backward areas is generally higher than that of the latter [61][62][63].
In empirical research, the spatial weight is usually chosen according to the spatial dependence of the research object. Industrial economic development has the overall characteristics for the whole system. Regional economic development policies will be observed and affected by other regions. The distance between regions makes the level of impact different. Therefore, the weight matrix of economic distance was constructed according to the level of regional economic development and the distance between regions, and the spatial effects of urban and rural residents' consumption structure on regional industrial structure and economic development level were investigated. G value is the absolute value of the difference between two regional economic variables, which is generally set by the absolute value of GDP difference in practical research. The greater the G value is, the greater the regional economic difference is, and vice versa. The rules for constructing the matrix are as follows: where, G-absolute value of average GDP difference between two regions in the observation period; d i,j -distance between regions, calculated according to the large arc distances of provincial capitals and cities (the shortest distance calculated by latitude and longitude on the earth's surface). Data come from the National Geographic Foundation Information Center website; W i,j -normalized matrices.

Spatial Correlation Test
The premise of using spatial econometric model is that the object of study has spatial correlation. At present, Moran's I index method is generally used to examine the spatial correlation degree of regional economic problems. When Moran's I > 0, it means that there is a positive spatial correlation, that is, the horizontal values of adjacent elements are similar, and when Moran's I < 0, it means that there is a negative spatial correlation, that is, the horizontal values of adjacent elements are different, and the greater the absolute value of Moran's I, the higher the spatial correlation degree is. The formula is as follows: In this paper, MATLAB software was used to calculate the spatial correlation of China's foreign trade, FDI, and industrial structure upgrading from 1997 to 2015 (see Table 2). The global Moran's I index of industrial structure upgrading is positive, and the spatial agglomeration hypothesis of industrial structure upgrading is verified by the significance test of more than 5%, that is, the regions with similar industrial structure level tend to be distributed adjacently. At the same time, the global spatial correlation analysis of import trade, export trade, and FDI also shows that there is significant spatial dependence of each variable in geographic space, which indicates that it is feasible and necessary to use spatial econometric model to study.

Model Selection Strategies
In practical research, the selection of spatial econometric models is generally based on the order of OLS-SLM or SEM-SDM. The methods of model selection are as follows: Firstly, the LR test is carried out to determine which fixed effect model is included according to the general panel mixed model. The SLM and SEM are compared by using two Lagrange Multiplier forms LMlag, LMerror and Robust R-LMlag, LMerror. Then, the applicability of SDM is determined by Wald test, based on the hypothesis of H0: θ = 0 and H1: θ + ρβ = 0. The first hypothesis verifies whether SDM can be simplified to SLM model, and the second hypothesis verifies whether SDM can simplify SEM. If the test results reject two hypotheses at the same time, it shows that SDM is more reasonable. Spatial lag terms of both explained variables and explanatory variables should be included in the model. On this basis, fixed effects and random effects should be included according to Hanusman test values. Finally, if the applicability of SDM is proved, the spatial spillover effect of explanatory variables on dependent variables should be further discussed based on partial differential equations [64,65].

Result Analysis: Model Specification and Testing
According to the selection strategy of spatial econometric models, the traditional hybrid models were tested and the results were obtained (see Table 3). 1. The majority of LM tests on the existence of spatial lag and spatial error rejected the original hypothesis, thus confirming the existence of residual spatial autocorrelation estimated by the model. 2. The LR test with zero hypothesis as spatial effect and significant combination rejected the original hypothesis, and the results were (901.7933, 0.0000) and (736.1765, 0.0000), respectively, i.e., the model had bilateral fixed effects. 3. Both LMlag and R-LMlag passed the significance test at 5% level, while LMerror and R-LMerror did not pass the significance test, which showed that the spatial lag model was superior to the spatial error model. According to the model selection strategy, the spatial lag model with bilateral fixed effects is more in line with the model settings. Next, it is necessary to test the spatial Durbin model to further determine the optimal model. According to the structure of spatial Durbin model test in Table 4, the Wald and LR tests satisfy the 1% significance test, which proves that the spatial Durbin model cannot be simplified as a spatial lag model or a spatial error model. In addition, Hausman's test cannot reject the original hypothesis, that is, the random effect model should be adopted for analysis. Therefore, the spatial Durbin model is determined to be available for analyzing the spatial impact of foreign trade and FDI on the upgrading of regional industrial structure in China. The conclusion of the model shows that the coefficients of W*lnEP, W*lnEX, W*RC, W*lnGE, W*lnEC, and W*lnUR have passed the significance test of above 0.1 level, indicating that the spatial lag term of dependent variable and the spatial interaction term of independent variable have spatial spillover effect. Therefore, the related driving factors have spatial impact on the upgrading of industrial structure in other regions, which further shows that if the spatial effect is not taken into account, it may lead to errors in empirical conclusions. In the spatial panel model, the regression coefficients of independent variables cannot reflect the marginal effects of dependent variables. The spatial effects should be decomposed into direct effects, indirect effects, and total effects by partial differential equation (Formula 4), so as to test the impact of each variable on the upgrading of industrial structure in the region, other regions, and all regions of the country. The results of spatial decomposition are shown in Table 5.   The decomposition of the spatial effects of foreign trade and FDI on the upgrading of industrial structure shows that: 1. The direct, indirect and total effects of lnEP are significantly positive, indicating that import trade can increase consumption by increasing market supply, and has a significant stimulating effect on the upgrading of industrial structure in the region and other regions. 2. The direct and total effects of lnEX are significantly positive, while the indirect effects are significantly negative. Export trade is conducive to the upgrading of regional industrial structure, but because of the existence of industrial isomorphism among regions and the weak ability of unified dispatch, the competition among regions is fierce, which leads to the increase of export trade in one region that may "deprive" the consumption market of other regions. At the same time, the upgrading of industrial structure caused by the increase of export trade in other regions has led to the outflow of relevant economic factors in other regions, thus affecting their industrial development. 3. The direct and total effects of lnFDI are significantly positive, while the indirect effects are not significant. Foreign investment can directly affect the industrial development of the region through supply and technology spillover, and then promote the upgrading of regional industrial structure, but it has no significant impact on other regions.
In terms of control variables: 1. The direct effects of LnRC are significantly positive, indicating that the improvement of regional residents' consumption level can increase market demand, thus effectively promoting the upgrading of industrial structure in the region. The indirect effects of LnRC are significantly negative, that is, the consumption of residents has a significant negative spatial spillover effect on the upgrading of regional industrial structure, and the competition among regions makes the consumption of one region form a strong "crowding-out effect" on the markets of other regions. 2. The direct, indirect, and total effects of lnGE are significantly negative. At present, government intervention in economic behavior is not standardized, which not only fails to effectively promote the optimization of industrial structure, but also affects the allocation of market resources, which makes the industrial structure deviate from the direction of market adjustment and has a significant inhibitory effect on the region and other regions. 3. The direct, indirect, and total effects of lnEC are significantly positive, that is, energy investment has a significant stimulating effect on the upgrading of industrial structure in this region or other regions. 4. lnSK, lnSH, lnRD, and lnUR show significant positive direct effects, but not significant indirect effects, indicating that the local physical capital stock, human capital investment, technological progress, and urbanization have prominent effects on the upgrading of industrial structure, while no effective spillover effect has been formed in other regions.

Conclusions and Recommendations
In this paper, 30 provinces and regions in China from 1997 to 2015 were selected to construct the weight matrix of economic distance based on per capita GDP and the distance between regions, and the spatial Durbin model was introduced to conduct empirical research. Strictly following the empirical results, the following conclusions can be drawn: 1. The global Moran's I index of foreign trade, FDI, and industrial structure upgrading in the sample interval has passed the significance test of 5%, indicating that regional import trade, export trade, FDI, and industrial structure upgrading in China are not randomly distributed in space, but meet certain spatial agglomeration. 2. Imports are positively correlated with the upgrading of industrial structure, and show significant spatial spillover effects. The increase in imports will help to increase consumption, and achieve regional technological progress through the "technology diffusion" approach, ultimately achieving the upgrading of the entire industry. 3. Export trade has a positive effect on the industrial development of the region by participating in international demand. However, due to the competition among regions, the industrial development has become crowded out, thus inhibiting the industrial development of other regions. 4. FDI can improve the domestic supply and demand, solving the problems of insufficient capital and low technology. It is an essential means to upgrade China's industrial structure, but it has not yet formed an effective spatial spillover effect.
Strictly based on the above conclusions, the following policy recommendations are put forward: 1. When formulating industry-related policies, the government should fully understand the spatial interaction effect of foreign trade and FDI on the development of regional industrial economy, consider the development path of other regions in an all-round way, guarantee the coordination and cooperation among regions, and ultimately achieve the goal of industrial development in China. 2. The optimization of interregional product structure should be strengthened. According to the endowment of regional factors, different product demand areas and objects should be sought to avoid excessive competition. Interregional industrial linkages should be realized by means of information sharing and market exchange, so as to ensure cooperation among regions and achieve win-win situation. 3. There are still some problems in China's foreign investment, such as industrial bias and unbalanced geographical distribution. China needs to improve the mechanism of foreign investment introduction; formulate differential preferential policies; optimize the direction and structure of foreign investment; encourage foreign investors to invest in underdeveloped regions such as the west, and further play the role of foreign investment in promoting China's industrial development.
According to the conclusions, we can also put forward five recommendations which should be empirically studied in further research: 1. Make relevant policies to promote industrial upgrading, focusing on controlling and rectifying traditional industries with excess carbon emissions, and promote the transformation and upgrading of resource-based industries to high-efficiency and low-carbon industries. 2. Encourage interregional cooperation to improve the efficiency of carbon emissions. Strengthen cooperation and exchanges between regions through cooperation across regions and surrounding regions. The government can establish a joint governance system with surrounding regions to reduce the impact of external carbon emissions on the region; 3. Further improve the level of capital, and encourage capital to invest in high-tech industries, energy-saving and environmental protection industries, strategic emerging industries, and in other relevant fields. We should not only gradually establish a promotion system with process, technology, energy consumption, environmental protection, quality, and safety constraints, but also strengthen industry regulation and entry management. Eliminate backward production capacity, actively and steadily resolve excess production capacity; 4. Further strengthen the screening and management of foreign direct investment and restrict foreign direct investment in energy-consuming and highly polluting industries. Encourage foreign direct investment in R&D centers, high-tech industries, advanced manufacturing industries, energy-saving and environmental protection industries. Foreign-funded enterprises are encouraged to carry out technological transformation and upgrading of traditional industries, and foreign-funded enterprises are encouraged to introduce core technologies to expand the technology spillover effect. 5. Strengthen the research and development of industrial low-carbon technology; encourage enterprises to improve production technology; upgrade processing equipment; improve energy efficiency, and strive to meet international environmental standards.

Conflicts of Interest:
The authors declare no conflict of interest.