A modified NK algorithm based on BP neural network and DEMATEL for evolution path optimization of urban innovation ecosystem

In the new era, the key measure to accelerate the construction of smart city, so as to promote the modernization of urban governance system and governance capacity, is to establish a good urban innovation ecosystem, and guide its continuous evolution to the direction of the highest efficiency and the best performance. Focusing on solving the practical problem of “how the urban innovation ecosystem evolves”, this paper develops a NK algorithm using BP neural network and DEMATEL method. First, through literature research, constructing the urban innovation ecosystem including five subsystems of innovation talents, innovation subjects, innovation resources, innovation environment and innovation network. Then, taking Beijing as an example, the weights and the number of epistatic relationships of each subsystem in its innovation ecosystem are calculated by BP neural network and DEMATEL method, and the NK model is modified; on this basis, the fitness values corresponding to different states of the system are calculated using MATLAB software, and the optimal evolution path of Beijing innovation ecosystem is determined through the comparison of 100,000 simulation results. The results show that the optimal evolution path of Beijing's innovation ecosystem is to create a favorable environment and culture for innovation first; then increase the input of innovation resources; and then promote the development of innovation network assets; on this basis, cultivate, attract and retain innovative talents; and finally strengthen the construction of innovation subjects.


Introduction
Over the past 40 years of reform and opening up, China's economy has grown by 9.5\% annually in real terms, and its share of world GDP has rapidly increased from 2.7\% to nearly 15\%, creating a "China miracle" in the world economic history. After the outbreak of the international financial crisis, the world economic structure has undergone tremendous adjustment, and the internal supporting conditions and external demand environment of China's economic development have undergone profound changes, which require the speed of economic growth to shift from highspeed growth to high-quality development [1]. Innovation is the first driving force of development and an important part of promoting economic transformation and upgrading. Many countries regard strengthening the national innovation system as a national strategy, and investment in scientific and technological innovation as a strategic investment. They deploy and develop high-tech and strategic industries in the forefront of scientific research in advance, and implement major national science and technology plans to enhance national innovation capacity and international competitiveness [2]. Schumpeter (1912) put forward that "economic development is the result of innovation" in his book The Theory of Economic Development. If there is no innovation, economic growth can only be an increase in quantity, which is difficult to achieve a qualitative breakthrough in social 1 3 and economic development. Therefore, it is of great strategic significance for China to accelerate the transformation of its economic development mode and form new advantages in international competition through accelerating the construction of an innovative country and promoting the transformation of development from over dependence on factor driven, investment driven to innovation driven.
Cities are the basic units supporting national and regional innovation, and the gathering places of various elements and resources. With the acceleration of a new round of industrial revolution and scientific and technological revolution, the spatial polarization and diffusion effect of cities are changing from the focus of resources and capital to the gathering of knowledge elements such as technology and innovation. The status and role of cities in the international competition pattern, innovation system and industrial chain have been improved day by day [3]. To make the city more intelligent is the necessary way to promote the modernization of urban governance system and governance capacity. The essence of smart city is reform and innovation, and its construction cannot be separated from the innovation of urban management means, management mode and management concept [4,5]. Urban innovation has experienced three stages of evolution: the first stage is factor innovation, which is the core source of urban competitiveness. The second stage is structural innovation. Freeman put forward the theory of innovation system when he inspected Japan's national innovation system. He pointed out that the increase in the number or quality of innovation elements cannot improve the competitiveness of the city, but more importantly, all kinds of innovation elements can be combined to form a system structure. The third stage is ecological innovation. In the complex and changeable environment, whether a city can always maintain the innovation competitiveness depends not only on the complete innovation system, but also on the function of the system to what extent. Therefore, the structured and reproducible innovation system is gradually replaced by the ecological and unique urban innovation ecosystem.
Cultivating a good urban innovation ecosystem is a key measure to accelerate the construction of smart city in the new era [6]. Since 2010, urban innovation ecosystem has received continuous attention from central and local decision-makers. In 2011, the Ministry of Science and Technology held the "innovation round table conference" to discuss the connotation, structure, function and policy implications of urban innovation ecosystem. In 2012, Shenzhen clearly put forward "building a dynamic innovation ecosystem and speeding up the construction of a national innovative city", which opened the prelude for major cities to accelerate the construction of innovation ecosystem. By the end of 2019, Beijing, Shanghai, Nanjing, Chengdu, Hangzhou and other cities have proposed to establish their own innovation ecosystem. However, most cities only focus on the establishment of innovation ecosystem and ignore the dynamic evolution of innovation ecosystem [7]. Urban innovation ecosystem has the characteristics of openness, growth and sustainability. A healthy urban innovation ecosystem is not unchangeable, but constantly realizes evolution and growth through the metabolism of innovation elements [8]. As a typical complex adaptive system, the evolution of urban innovation ecosystem is path dependent, and the evolution order and direction of innovation elements will affect the efficiency and performance of system evolution to a certain extent [9]. Scholars have carried out some explorations around the urban innovation ecosystem, mainly focusing on the connotation, structure, efficiency and evaluation of the urban innovation ecosystem; the research on the urban innovation ecosystem based on the perspective of system evolution has just started. At present, the research mainly stays at the level of theoretical elaboration and case analysis, and the research results are lack of universality. Based on this, this paper introduces NK model, uses BP neural network, DEMATLE and computer simulation to deduce the optimal path of urban innovation ecosystem evolution and development. Through this study, we hope to promote the development of innovation ecosystem theory, and provide scientific guidance and theoretical basis for the government to guide and regulate the evolution of urban innovation ecosystem.

Literature review
The innovation ecosystem originates from the innovation system, which is an innovation network formed by the interaction of various departments and institutions within a certain geographical scope. Innovation system mainly focuses on the static structural problems of the composition of innovation elements and resource allocation, while the innovation ecosystem emphasizes the dynamic evolution analysis of the interaction among the innovation actors [10]. The innovation ecosystem was first proposed by the President's Council of Advisors on Science and Technology (2003) in a report entitled "maintaining the national innovation ecosystem: information technology manufacturing and competitiveness". The report believes that the technological and innovative leadership of countries and cities depends on a dynamic innovation ecosystem [11]. Therefore, the research on urban innovation has shifted from urban innovation system and innovative city to urban innovation ecosystem. However, scholars have not reached a unified conclusion on what is the connotation of innovation ecosystem. Iansti and Levin proposed the concept of niche to elaborate the innovation ecosystem. They believed that the innovation ecosystem is composed of different but related niches. Once one niche changes, the other niche will change accordingly [12]. Basole and Rouse put forward that the urban innovation ecosystem is composed of a group of heterogeneous and constantly evolving components. These components are interconnected through a complex global network of relationships, creating value together, and interdependence for survival [13]. According to [14], innovation ecosystem is a system composed of multiple subsystems. Through the interaction of each subsystem, we can form an atmosphere conducive to innovation, catalyze and promote the output of innovation achievements, and promote the flow of information, talents and resources of each subsystem in the network system, so as to realize the continuous value creation. In addition, some scholars have defined the innovation ecosystem from the perspective of its role. For example, the Brookings Institution defines urban innovation ecosystem as a collaborative relationship among people, enterprises and places, which promotes the creation of ideas and accelerates commercialization [15].
The structure of urban innovation ecosystem can be divided into two types according to the difference of research methods. First, through the qualitative analysis of Silicon Valley, New York, Phoenix and other specific cities, the elements of the innovation ecosystem of specific cities are extracted. Pique et al. studied the innovation mechanism of Silicon Valley, and found that the innovation system in Silicon Valley, together with universities, research institutions, comprehensive service infrastructure, talent pool, entrepreneurship and gem market, constitutes the Silicon Valley innovation ecosystem with hightech enterprises as the core [16]. Based on an extensive study of New York City's innovation ecosystem, the World Bank has determined that the combination of human capital, urban infrastructure, and a strong regulatory environment for urban start-ups, deep economic assets and network assets can support a prosperous urban innovation ecosystem [17]. Foley and Wiek found that government funding and supporting agencies, industry and academic research institutions are the most frequently mentioned elements in Phoenix City of the United States, showing a triple helix structure. Moreover, investor is the fourth most frequently mentioned innovation ecosystem. In Phoenix, stakeholders who are not committed to commercialization or may limit innovation are isolated from the core network. Second, by analogizing with natural ecosystem and enterprise innovation ecosystem, some scholars put forward the elements of urban innovation ecosystem [18]. Hwang and Horowitt described an ecosystem as a rainforest, which includes cycles of birth, growth, death and regeneration, as well as homeostasis or dynamics [19]. Estrin believed that the composition of a sustainable innovation ecosystem should include two levels: the core level (composed of three communities of research, development and application) and the influence level (including culture, education, policy, capital, leadership and other factors), and proposed the innovation ecological model of three communities [20]. Based on the case studies of 12 cities in the Netherlands, Stam developed a model to measure the urban innovation ecosystem, which includes indicators such as formal institutions, entrepreneurial culture, physical infrastructure, demand, network, leadership, talent, finance, new knowledge and intermediary services [21]. Spigel pointed out that urban entrepreneurship ecosystem consists of 3 categories and 11 attributes, namely culture (supportive culture, entrepreneurial history), society (talent, investment capital, network, mentor and role model) and material (policy and governance, university, support services, physical infrastructure and open market) [22]. From the perspective of smart city, Appio et al. proposed that urban innovation ecosystem involves many participants in public and private consumption, production, education, research, entertainment and professional activities, and these participants form a cooperative network through smart city infrastructure, where they develop innovative products, services and solutions [23].
Scholars have carried out a series of studies on the connotation and structure of urban innovation ecosystem, but these studies mainly focus on the static characteristics of urban innovation ecosystem. As a complex adaptive system, the interactions between system elements are particularly important. The dynamic and evolutionary properties of the system cannot be ignored. The existing studies mainly focus on the evolution of innovation ecosystem at the national and enterprise level. Fukuda and Watanabe proposed the basic mechanisms and principles of national innovation ecosystem evolution, namely substitution, coevolution, organizational inertia and heterogeneous synergy through the comparison of innovation ecosystems in Japan and the United States [24]. At the enterprise level, scholars mainly focus on the specific core enterprises and summarize the evolution stages and influencing factors of the innovation ecosystem dominated by them. For example, Yin et al. studied the case of iPhone application innovation ecosystem, and pointed out that development opportunity, competition level and demand preference are important factors that cause different evolution process of innovation ecosystem [25]. However, there is little research on the evolution of urban innovation ecosystem [26]. Therefore, in the future research, we need to focus on the dynamic evolution of innovation ecosystem at the city level, and clarify the optimal path of the evolution of innovation elements in the system, so as to make the evolution of urban innovation ecosystem achieve the best efficiency and performance.

Analysis on the elements of urban innovation ecosystem
Urban innovation ecosystem is composed of many innovation elements. The change of these elements themselves or the relationships between them and other elements will lead to the dynamic evolution of urban innovation 1 3 ecosystem. Therefore, to study the evolution path of urban innovation ecosystem, it is necessary to determine what elements a complete urban innovation ecosystem should consist of. This paper analyzes the elements of urban innovation ecosystem by using the social network analysis method. With the help of Ucinet network analysis tool, this paper first combs the relevant literature of urban innovation ecosystem at home and abroad, selects the representative literature and forms the co-occurrence matrix; then uses the netdraw tool of Ucinet to visually analyze the data and gets the network relationship diagram among different elements. On this basis, the centrality of the data is analyzed, and the nodes in the network diagram are displayed according to the centrality; finally, according to the results of social network analysis, this paper constructs the index system of urban innovation ecosystem. The specific steps are as follows: Step 1. This paper takes "urban innovation ecosystem" as the theme, and conducts literature retrieval in Elsevier, Emerald, CNKI and other well-known databases at home and abroad. The results show that since 2004, scholars have explored the connotation and structure of urban innovation ecosystem. This paper selects 19 representative literatures for further analysis.
Step 2. This paper combs and integrates the elements of urban innovation ecosystem in 19 literatures, obtains 38 different elements, and constructs a relationship matrix composed of 19 literatures and 38 elements. When an element appears in the literature, it is indicated by the number 1; otherwise it is represented by the number 0. Finally, the relational matrix is imported into Ucinet (see Fig. 1).
Step 3. Using the netdraw tool of Ucinet to visually analyze the relationship matrix, this paper obtains the network relationship diagram among 38 elements (see Fig. 2).
Step 4. Use the centrality measures tool of Ucinet to analyze the centrality of the data, and display the nodes in the network diagram according to the centrality (see Fig. 3). Based on this, screening out the important elements in the urban innovation ecosystem.
Step 5. Based on the research conclusions of these scholars, this paper extracts the components of a complete urban innovation ecosystem. In this regard, we invited two postdoctors from the research team (both engaged in the research of innovation ecosystem for a long time, with rich research experience and solid research foundation) to participate in this stage of research. According to the results of Fig. 3, the research team continuously compares and analyzes the above elements, and finally constructs a five-dimensional urban innovation ecosystem, namely, the innovation talent subsystem, the innovation subject subsystem, the innovation resource subsystem, the innovation network subsystem and the innovation environment subsystem, including 19 indicators such as the number of R&D personnel, full-time equivalent of R&D personnel, and the number of undergraduates or above (see Table 1).
Innovation talent subsystem: innovative talents refer to those technical talents who directly participate in urban innovation activities and service-oriented talents who indirectly participate in innovation activities. They generally have innovative spirit, innovative knowledge and innovative ability. In the urban innovation ecosystem, it can be measured by the number of R&D personnel, full-time equivalent of R&D personnel, and the number of undergraduates or above.
Innovation subject subsystem: innovation subject refers to all kinds of behavior subjects of knowledge production, application and cultivation of innovative talents in urban innovation ecosystem, including science and technology   continuous stream of high-quality talents and scientific and technological achievements for urban scientific and technological innovation. Specifically, it can be measured by the number of enterprises with R&D activities, the number of higher educational institutions, and the number of R&D institutions.
Innovation resources subsystem: innovation resources are all kinds of inputs needed by urban innovation activities, and are the "soil" and "nutrients" of urban innovation, including innovation funds (such as government funding, financial institutions financing), knowledge resources (such as patents, scientific papers), innovation infrastructures (such as new generation information technology facilities, scientific research instruments and equipment), etc. These resources flow efficiently among innovation subjects, and continuously improve the overall innovation efficiency of urban innovation ecosystem. Specifically, it can be measured by internal expenditure of R&D funds, external expenditure of R&D funds, number of scientific papers published, amount of patent authorized and contract amount of foreign technology introduction.
Innovation environment subsystem: innovation environment is the support for the formation and development of innovation ecosystem, which constitutes the background conditions of innovation activities of the whole urban innovation ecosystem, including institutional environment and social environment. The institutional environment includes laws and regulations, local policies, etc., which reflects the policy support and promotion given by local governments to urban innovation activities. The social environment includes the innovation consciousness and innovation culture of residents in the region, which reflects the overall innovation atmosphere of the city. Specifically, it can be measured by the number of science and technology policies, the number of science popularization activities and the number of visitors to science and technology museums.
Innovation network subsystem: the first four subsystems provide the essential elements of urban innovation ecosystem, and the innovation network subsystem is the multiplier of these elements, which can promote the scale and growth rate of urban innovation ecosystem [17]. Generally speaking, innovation network includes entrepreneurship competition and training, maker organization, maker space, accelerator, incubator, angel investor, venture capital and tutor network. These network elements increase the possibility of "collision" among innovation elements, and bring new ideas, views and values to urban innovation and entrepreneurship through "collision" [27]. Specifically, it can be measured by the number of entrepreneurial mentors, the number of incubators, the amount of venture capital obtained, the number of maker space and the number of science and technology service institutions.

BP neural network
The structure of the neural network imitates from the biological neural network. Each neuron in the biological neural network is connected with other neurons. When it is "excited", it will send chemicals to the next connected neurons to change the potential of these neurons. If the potential of a neuron exceeds a threshold, it will be activated; otherwise, it will not be activated [28]. BP neural network is one of the most representative algorithms in neural network. It is a multilayer feedforward network trained by error back-propagation algorithm. BP algorithm consists of two processes: forward calculation of data stream (forward propagation) and back propagation of error signal. In forward propagation, the direction of propagation is input layer → hidden layer → output layer. The state of each layer of neurons only affects the next layer of neurons. If the desired output is not obtained at the output layer, it will convert to the back-propagation process of the error signal. Through the alternation of these two processes, the gradient descent strategy of error function is implemented in the weight vector space, and a group of weight vectors are searched dynamically to make the network error function reach the minimum value, thus completing the process of information extraction and memory. Take the three-layer perceptron (see Fig. 4) as an example to introduce the specific steps of BP algorithm. Suppose that there are n nodes in the input layer, v nodes in the hidden layer and m nodes in the output layer, The weight between the input layer and the hidden layer is w1 ki (i = 1, 2, … , n; k = 1, 2, … , v) , and the weight between the hidden layer and the output layer is w2 jk (j = 1, 2, … , m; k = 1, 2, … , v) . The activation function of hidden layer is f 1 ( * ). The activation function of the output layer is f 2 ( * ) . Thus, the input of the hidden layer node is hi k = ∑ n i=0 w1 ki x i , the output of the hidden layer node is ho k = f 1 hi k , the input of the output layer node is yi j = ∑ m k=0 w2 jk h k , the output of the output layer node is yo j = f 2 yi j , and d j is the expected output.
Step 1. Define the error function. Input S training samples represented by x s 1 , x s 2 , … , x s n . The output yo s j is obtained after the sample s is input into the network. The global error E and error e s of the sample s are obtained using the square error function.
Step 2. Calculate the weight change between hidden layer and output layer. The cumulative error BP algorithm is used to adjust w2 jk to reduce the global error E. The adjustment scale is Δw2 jk , where η is the learning rate.
The error signal is defined as: Among them, According to the chain theorem: Therefore, the weight value between the hidden layer and the output layer changes as follows: Accordingly, the weight between the hidden layer and the output layer is modified as follows: Step 3. Calculate the weight change between input layer and hidden layer.
The error signal is defined as: Among them: According to the chain theorem: Thus, According to the chain theorem: Therefore, the weight value between the hidden layer and the input layer changes as follows: Accordingly, the weight between the hidden layer and the input layer is modified as follows: Step 4: Calculate the weight matrix w between input layer and output layer.

DEMATEL
DEMATEL is an analytical structure model based on graph theory and matrix tools. It is a method to analyze the causality of various factors in a complex system and identify the key elements through expert scoring. The traditional DEMATEL method constructs the direct influence matrix according to the experts' scoring, which has the disadvantage of being too subjective. To reduce this shortcoming, this paper introduces BP neural network into the traditional DEMATEL. Using the weight matrix between input layer and output layer obtained by BP neural network to measure the influence degree of input index on output index, so as to obtain correlation matrix. The specific steps are as follows: Step 1. Calculate the direct influence matrix D of influencing factors according to the weight matrix of BP neural network.
Step 2. Normalize the direct influence matrix D to obtain the matrix G.
Step 3. Calculate the comprehensive influence matrix Z.
Step 5. Calculate the adjacency matrix P, transpose the comprehensive influence matrix Z, then compared with the threshold .
Step 6. Set p 11, p 22, … , p nn as 1 in the adjacency matrix, obtain the influence matrix Q showing the influence relationship of each element, the K value of each element is obtained according to the matrix Q.

NK model
NK model originated from biology and was first proposed by biologist Kauffman [29]. It is mainly used to study the evolution of biological organisms such as cell tissue and protein. NK model has three important parameters: N, K and A. N means that the complex system is composed of N elements, and the evolution of the system depends on the joint action of these elements. K is the number of elements that have a superior relationship with element i (i = 1,2,…,N), that is, the number of elements that have an impact on element i. The value range of K i is [0, N − 1], When K i = 0, it means that element i is not affected by any other elements; when K i = N − 1, it indicates that element i is affected by all other elements; A represents the number of alleles of element i (originally refers to the genes that control different forms of the same character on the same position of a pair of homologous chromosomes), and when the allele of element changes, the nature of element will also change. However, Kauffman pointed out in his study that the number of alleles has little to do with the overall fitness value of the system, so the allele is usually set to 0 and 1.
Therefore, when the allele of an element or the allele of an element with epistatic relationship changes, the whole system changes accordingly. To measure the advantages and disadvantages of system evolution, Kauffman introduced the fitness landscape theory. When the alleles of a certain element or elements with epistatic relationship change, the fitness of the element will change, and the fitness value of the whole system is the mean value of the fitness value of all elements. All kinds of allele combinations and corresponding fitness values of the system are mapped to three-dimensional coordinates, and the changes of system fitness values are reflected as the changes of landscape topography. Due to the different fitness values of different allele combinations, the peaks and troughs on the fitness landscape map are formed. The evolution process of the system can also be seen as a climbing process on the fitness landscape map. Using NK model, we can explore which climbing path can reach the peak with higher fitness value (see Fig. 5).

BP-DEMATEL-NK model
NK model can simplify and visualize the evolution of complex systems, so it is quickly applied in the fields of organizational structure [30], innovation search [31], supply chain management [32] and performance evaluation [33]. However, the traditional NK model has two obvious shortcomings: first, in the traditional NK model, the K values of all elements are equal to N − 1 by default, that is, any element will be affected by other elements. However, in practice, the epistatic level relationship of each element may not be the same, so the K i value may not be equal [34]; second, when calculating the system fitness value, the weights of all elements are the same by default, and taking the average fitness value of all elements as the overall fitness value of the system. However, in practice, the weight of different elements in the system may be different [35]. In order to modify the NK model, this paper introduces BP neural network and DEMATEL method to calculate the weight matrix of elements, and constructs the direct correlation matrix between different elements in the complex system, and then calculates the epistatic relationship of each element, so as to make the NK model more in line with the reality. The following is the modified NK model (see Fig. 6).
The first step is to normalize each index of urban innovation ecosystem [36], calculate the scores of each subsystem on the sample, and take it as the input index to construct the input matrix X = X ij m×n of BP neural network. This paper selects the number of new product development projects (Y1), new product sales revenue (Y2) and total turnover of technical contract (Y3) as the output indicators of urban innovation performance. After normalization, the output matrix Y = Y ih m×r is obtained, where m represents the number of samples, n represents the number of subsystems, and r represents the number of target factors, i = 1,2,3,…,m, j = 1,2,3,…,n, h = 1,2,3,…,r.
In the second step, establishing the BP neural network through Python (see Fig. 7), and calculating the weight matrix W 1 of input layer and hidden layer and the weight matrix W 2 of hidden layer and output layer, where v is the number of neuron nodes in hidden layer, u = 1, 2, 3, … , v.
In the third step, according to formula (3), calculating the whole weight vector δ, and the weight matrix is normalized to obtain the weight j , (j = 1, 2, … , n) of each element. In formula (3), ‖ represents take the absolute value of each element of the matrix, and the mean function represents take the average value of each row of | The fourth step is to calculate the direct influence matrix D of the subsystem according to formula (4).

3
The fifth step is to solve the normalized matrix. First, the sum of each row and column in the direct influence matrix D is calculated , and the maximum value f is selected. Each value in D is divided by f to obtain the normalized matrix G. See formula (5) and formula (6) for details.
The sixth step is to calculate the comprehensive influence matrix. According to formula (7), calculating the comprehensive influence matrix Z. I is the identity matrix. Then, the mean value of all elements in the comprehensive impact matrix Z as the threshold β is calculated, see formula (8) for details.
The seventh step is to calculate the influence relationship of each factor, that is, the value of parameter K. First, the comprehensive influence matrix Z is transposed to obtain matrix Z T , and then the matrix Z T is transformed into the adjacency matrix P according to the threshold β. The calculation process is shown in formula (9). Finally, the influence matrix Q of the modified NK model is obtained by setting p 11 , p 22, , … , p nn in the adjacency matrix P as 1, and the K value of each element is obtained according to the matrix Q.
The eighth step is to calculate the fitness value of the system. Using MATLAB software, based on the relationships between the elements determined in the seventh step, according to the following rules: when the state of a certain element and its epistatic-related elements changes, a random number is extracted from (0,1) uniformly distributed random variables as the new fitness value f j of the element( j = 1, 2, … , n ). Then, the fitness value of all elements is multiplied by the weight j , and the fitness value F of the system is obtained by summation. See formula (10).
This study assumes that only one element changes at a time. When a certain element state changes, if the system fitness value is greater than before, the change is effective; otherwise, the state change is abandoned.
The ninth step is to search the optimal path of system evolution. Through the eighth step, we calculate the fitness values corresponding to various states of the system, and then simulate the climbing path of the system searching for "global optimum" through computer simulation, which is the global optimal path of system evolution. To ensure the reliability of the results, we carry out 100,000 simulations, and the path with the highest probability of occurrence is the optimal path of the system.

Data collection
This paper takes Beijing as the research object. Based on the above indicators of urban innovation ecosystem and urban innovation performance, this paper collects data from Beijing Statistical Yearbook, China Science and Technology Statistical Yearbook and China Torch Statistical Yearbook from 2014 to 2018, and studies 110 sample data in five years (see Table 2). Calculate the parameter K and the weight ω Step 1. Normalize the indexes of innovation ecosystem and innovation performance of Beijing, and construct the input matrix and output matrix of BP neural network. The number of neurons in the input layer is n = 5 and that in the output layer is r = 3. The number of neurons in the hidden layer v is determined according to formula v = log 2 n and formula v = √ (n + r) + , where φ is a constant between 1 and 10. Through constant trial and error, it is found that when the number of hidden layer nodes is 10, the training effect is the best and the average error is the smallest. Therefore, the hidden layer neuron is set as 10.
Step 2. Establish BP neural network using Python and obtain the weight matrix W 1 of input layer and hidden layer and weight matrix W 2 of hidden layer and output layer.
Step. 3 Obtain the whole weight vector δ according to formula (3).
By normalizing the whole weight vector δ, obtaining the weights of five subsystems, which are innovation talent subsystem (0.1838), innovation subject subsystem (0.1740), innovation resource subsystem (0.1853), innovation environment subsystem (0.1635) and innovation network subsystem (0.2934). Compared with these weights, the weight of innovation network subsystem is far more than the other four subsystems, which is the core element of Beijing innovation ecosystem. It further verifies that innovation network is the "multiplier" of urban innovation, and can promote the scale and growth rate of urban innovation. Innovation resource subsystem, innovative talent subsystem and innovation subject subsystem have similar weights, which are the key elements of Beijing innovation ecosystem and play key roles in the process of urban innovation. The weight of innovation environment subsystem is the lowest, but it does not mean that this element is not important. It provides policy conditions and cultural atmosphere for urban innovation activities, and is the basic element of innovation ecosystem in Beijing.
Step. 4 calculate the direct impact matrix D of Beijing innovation ecosystem according to formula (4).
Step 5. Calculate the sum of each row and each column in the direct influence matrix D according to formula (5), select the maximum value f = 6.6601. According to formula (6), get the normalized matrix G.
Step 6. Calculating the comprehensive influence matrix Z according to formula (7); then according to formula (8), calculating the mean value of all elements in the comprehensive impact matrix Z to obtain the threshold β.
Step 7. First, the comprehensive influence matrix Z is transposed to obtain Z T ; second, according to formula (9), the adjacency matrix P is obtained; finally, the influence matrix Q of the modified NK model is obtained by setting p 11, p 22, … , p nn in the adjacency matrix P as 1.
According to the matrix Q, it can be found that the K values of each element in the NK model modified by BP neural network and DEMATEL method are no longer equal, which are 2, 3, 2, 4, 0. Specifically, the change of innovation resource subsystem ( u 3 ) and innovation network subsystem ( u 5 ) have certain impact on innovation talent subsystem ( u 1 ); the change of innovation talent subsystem ( u 1 ), innovation resource subsystem ( u 3 ) and innovation network subsystem ( u 5 ) have certain impact on innovation subject subsystem ( u 2 ); the change of innovation talent subsystem ( u 1 ) and innovation network subsystem ( u 5 ) have certain impact on innovation resource subsystem ( u 3 ); innovative talents Subsystem ( u 1 ), innovation subject subsystem ( u 2 ), innovation resource subsystem ( u 3 ) and innovation network subsystem ( u 5 ) all have certain influence on innovation environment subsystem ( u 4 ); meanwhile, innovation network subsystem ( u 5 ) has influence on the other four subsystems.

MATALAB simulation
For the urban innovation ecosystem, there are five subsystems, and each subsystem has two states: 0 and 1, so the system has 32 states. The initial state of the system is (0,0,0,0,0) and the final state is (1,1,1,1,1). There are 120 paths from the The values of key parameters in NK model have been obtained above, and then we calculate the fitness values corresponding to various states of the system, and search for the optimal evolution path. The specific climbing process is shown in Fig. 8.

Results and discussion
According to the optimal path of innovation ecosystem evolution in Beijing, the best logical sequence of five subsystems in promoting urban innovation is obtained, that is to create a favorable environment and culture for innovation first; then increase the input of innovation resources and promote the development of innovation network assets in turn; on this basis, cultivate, attract and retain innovative talents, and finally strengthen the construction of innovation subjects.
The first step is to create a favorable environment and culture for innovation. The government has always played an important role in urban innovation, and the policies and systems issued by the government play a leading and driving role in the innovation activities of various elements. By providing innovation subsidies, tax incentives, innovation and entrepreneurship services and other specific measures, we can promote the cultivation of innovation subjects and capacity-building; through policy guidance and improvement of the system and mechanism, we can also promote the cooperation between innovation subjects. When it comes to the cultivation and attraction of innovative talents, the government's settlement system, house purchase system and other policies play a direct role; in addition, the overall innovation atmosphere of the city can also attract and retain innovative talents. Besides, the government can adjust the reasonable allocation of capital, technology and other innovation resources by formulating corresponding policies and regulations, so as to improve the efficiency of urban innovation.
The second step is to increase the input of innovation resources. Innovation environment and resources are the basic conditions of urban innovation. On the basis of creating a favorable environment for innovation, it is also necessary to invest sufficient innovation resources, such as  0,1,1,1) (0,1,1,1,1) 1,1,1,1) (1,0,0,1,0)  0,1,1,1)   Fig. 9 The optimal evolution path of innovation ecosystem in Beijing from the global perspective innovation funds and knowledge resources, as the "nourishment" and "power" of urban innovation. On the one hand, sufficient innovation resources can provide funds and knowledge guarantee for the construction of incubator, maker space and other innovation network elements. On the other hand, sufficient innovation resources can also encourage innovation subjects and innovative talents to carry out more basic research and original research, create more forwardlooking and leading technologies, and effectively improve the overall innovation ability of the city.
The third step is to promote the development of network assets. Network assets can play a multiplier role in the innovative role of innovative subjects and innovative talents, and play a core role in the whole urban innovation ecosystem. By creating urban innovation organizations such as incubator, maker space, entrepreneurial tutor network, the innovation atmosphere of the whole city can be significantly improved, thus optimizing the overall innovation environment of the city. Parks, cafes, restaurants and other network facilities provide innovative talents with places for the collision of ideas, which is conducive to the generation of new knowledge, new ideas and other knowledge resources. Angel investors and venture capital can help enterprises obtain more innovation funds, which can help enrich urban innovation resources. Entrepreneurial mentors can help innovative talents improve their professional skills and innovation ability by providing career guidance and sharing work experience. At the same time, they can also enhance the sense of belonging of innovative talents through caring and concern, which helps to cultivate, attract and retain innovative talents. In addition, the incubators and accelerators in the innovation network subsystem can incubate more start-ups, and enhance the cooperation efficiency between innovation subjects through the maker space, and finally accelerate the construction of innovation subjects.
The fourth step is to cultivate, attract and retain innovative talents. Innovation originates from the interaction and communication between people. Through the research on the innovation ecosystem of Silicon Valley, it is found that innovative talents are the main driving force for the growth and success of Silicon Valley. A better innovation environment and more investment in innovation resources can help Beijing attract and retain more innovative talents who are important providers of innovation resources. Through scientific and technological research and development, they contribute a lot of patents, software copyrights and scientific papers, so they can feed back the knowledge resources needed for innovation. At the same time, the investment of network assets, such as incubator, maker space and entrepreneurial tutor, has further enlarged the role of innovative talents. For the innovation subject, innovative talents are also the symbol of enterprise innovation strength. Sufficient innovative talents can help enterprises obtain more government funding and institutional financing.
The fifth step is to strengthen the construction of innovation subject. The innovation subject is the final implementer of urban innovation. The creation of innovation environment, the investment of innovation resources, the development of network assets and the cultivation and attraction of innovative talents all lay a good foundation for the construction of innovation subjects. Within the innovation subject, universities and scientific research institutes are the production community of knowledge resources. They realize the diffusion of knowledge resources through intellectual property service, incubation and transformation services and other scientific and technological service agencies, so as to realize the application of knowledge resources in high-tech enterprises, and the industrial enterprises with R&D, and finally produce new products and new equipment. In addition, the optimization of the innovation environment and the introduction of the policy for transforming scientific and technological achievements promote the innovation cooperation among universities, scientific research institutes and enterprises, as well as the transformation and output of scientific and technological achievements, so as to realize the continuous increase in the turnover of technology contracts. Therefore, on the basis of optimizing the four subsystems of innovation environment, innovation resources, innovation network, and innovative talents, strengthening the construction of innovation subject is conducive to the growth of new product production, sales and technical contract turnover, so as to realize the improvement of Beijing's innovation performance.

Conclusions
The urban innovation ecosystem is a complex system with continuous evolution and self-transcendence. In this complex system, the evolution direction and logical order among subsystems have a great impact on the efficiency and performance of system evolution. At the same time, due to the difference of the economic development level of each city, the weight and the superior relationship of each subsystem in different urban innovation ecosystem are also different. Therefore, this study takes Beijing as an example, uses BP neural network and DEMATEL method to solve the weight and epistatic relationship of each subsystem in Beijing innovation ecosystem; according to the results, the NK model is modified to make it more in line with the actual situation; and then explores the optimal evolution path of urban innovation ecosystem through computer simulation. The conclusions are as follows: First, the urban innovation ecosystem includes five subsystems, namely, the innovation talent subsystem, the innovation subject subsystem, the innovation resource subsystem, the innovation network subsystem and the innovation environment subsystem. The innovation talent subsystem can be measured by the number of R&D personnel, full-time equivalent of R&D personnel, and the number of undergraduates or above. The innovation subject subsystem can be measured by the number of enterprises with R&D activities, the number of higher educational institutions, and the number of R&D institutions. The innovation resource subsystem can be measured by internal expenditure of R&D funds, external expenditure of R&D funds, number of scientific papers published, amount of patent authorized and contract amount of foreign technology introduction. The innovation environment subsystem can be measured by the number of science and technology policies, the number of science popularization activities and the number of visitors to science and technology museums. The innovation network subsystem can be measured by the number of entrepreneurial mentors, the number of incubators, the amount of venture capital obtained, the number of maker space and the number of science and technology service institutions.
Second, the weights of five subsystems are obtained by BP neural network, which are innovation talent subsystem (0.1838), innovation subject subsystem (0.1740), innovation resource subsystem (0.1853), innovation environment subsystem (0.1635) and innovation network subsystem (0.2934). Compared with these weights, it can be concluded that innovation network subsystem is the core element of Beijing innovation ecosystem; innovation resource subsystem, innovative talent subsystem and innovation subject subsystem are the key elements; and innovation environment subsystem is the basic element. On this basis, the number of epistatic relations of five subsystems is obtained by DEMATEL method, which are 2, 3, 2, 4, 0. Specifically, the change of innovation resources and innovation network has certain impact on innovative talents; the changes of innovative talents, innovative resources and innovation network have certain impact on the innovation subject; the changes of innovative talents and innovation network have certain impact on innovation resources; the four subsystems of innovative talents, innovation subject, innovation resources and innovation network all have certain impact on the innovation environment The other four subsystems have no significant impact on innovation network.
Third, according to the weight and epistatic relationship of the five subsystems, the NK model is modified, and then MATLAB software is used to search the optimal evolution path from the initial state (0,0,0,0) to the final state (1,1,1,1). Through the comparison of 100,000 simulation results, the optimal evolution path of Beijing innovation ecosystem is (0,0,0,0,0) → (0,0,0,1,0) → (0,0,1,0) → (0,0,1,1,1) → (1,0,1,1 ) → (1,1,1,1). That is to create a favorable environment and culture for innovation first, then increase the input of innovation resources and promote the development of innovation network assets in turn. On this basis, cultivate, attract and retain innovative talents, and finally strengthen the construction of innovation subjects. Therefore, to ensure that Beijing's innovation ecosystem evolves to the direction of the highest innovation efficiency and the best innovation performance, this paper suggests that the government should carry out macro-control on the evolution of the urban innovation ecosystem according to the above evolution path.
To be sure, there are still several deficiencies in this paper, which can be further discussed in the future. First, when studying the evolution of urban innovation ecosystem, this paper considers only one element change at a time. In the future, we can explore the optimal path of urban innovation ecosystem evolution when there is multiple elements change at the same time. Second, this study considers the global optimal situation, that is, the optimal path under the condition that all elements can be changed in the evolution of urban innovation ecosystem. However, in reality, some small-and medium-sized cities have limited resources and can only bear the change of some elements. Therefore, it is necessary to further explore the local optimal situation.