# Application Analysis of the Ecological Economics Model of Parallel Accumulation Sorting and Dynamic Internet of Things in the Construction of Ecological Smart City

Authors: Sunquan Xu; Yi Hou; Li Mao
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

In order to improve the effect of ecological smart city construction, this paper analyzes the application of the ecological economic model based on parallel accumulation sorting and dynamic Internet of Things in the construction of ecological smart city. Moreover, this paper studies the core technology algorithm of information retrieval, proposes a parallel accumulation sorting algorithm, and combines the dynamic Internet of Things and ecological economics to construct an ecological smart city construction model. In addition, on the basis of constructing an ecological smart city, this paper combines the parallel accumulation sorting algorithm and the dynamic Internet of Things technology to analyze the construction effect of the ecological smart city. The experimental research results show that the ecological economic model based on parallel accumulation sorting and dynamic Internet of Things has a good application effect in the construction of ecological smart city.


---

## Body

## 1. Introduction

After experiencing primitive civilization, agricultural civilization, and industrial civilization, human society is moving towards a new era of ecological civilization. In the era of ecological civilization, more and more people gather in cities. People live in cities, and while obtaining superior material conditions, they are constantly changing cities. With socioeconomic development around the world, cities are becoming more and more glamorous. However, serious resource and environmental crises also lurked in the aftermath. Since the 21st century, the situation of global ecological debt has become more and more severe. In the era of industrial civilization, the traditional urban development model that obtains economic benefits at the expense of the environment has been struggling, and global ecological and environmental problems have become more and more serious. While creating 80% of global GDP, cities consume 85% of resources and energy [1], causing a series of problems such as ecological environment deterioration, water shortage, sharp loss of biodiversity, climate warming, and sea level rise. For these environmental problems, cities are the main perpetrators and the most direct victims of environmental problems. In the context of the constraints of global resources and environmental conditions, the proposal of the ecological city concept is a reflection of human beings on the unsustainable urban development model of industrial civilization at the cost of destroying the environment, and it is also a major progress in the history of human social development [2]. Although there is no academic consensus on the concept of ecocity, it has become the consensus of people all over the world to transform the way of urban development and realize the goal of “better city life.”Environmental problems around the world have made people gradually realize the importance of urban ecological transformation, but at present, ecological restoration, energy conservation and emission reduction, control of motor vehicle travel, and waste recycling are all carried out in small areas. If the cause of environmental problems cannot be understood from the source, these ecological restoration measures only reduce the negative impact of human activities on the city to a certain extent. In fact, the city is still following the predatory mode of production in the industrial age [3]. Ecocity is the product of urban development to the era of ecological civilization, emphasizing the urban spatial layout mode of intensive, compact, and integration with nature, which is conducive to solving many ecological environmental problems and unreasonable spatial layout problems in the current city. It has important guiding significance to establish a new urban space development order and relieve the functions of the central urban area. How to build an intensive and efficient urban spatial layout mode dominated by the concept of ecocity, and abandon the unsustainable urban spatial development mode of “motor vehicles - oil energy consumption - urban sprawl” dominated by motor vehicles in the industrial age, is the key factors for my country’s cities to enter a new era of sustainable development [4].Wisdom is empirical knowledge based on understanding. The ability of insight and judgment to decide what to do [5], ecological wisdom is one kind of wisdom. Ecological wisdom is defined as a philosophy of ecological harmony or balance, and its ultimate purpose is not only to make scientific descriptions, explanations, and predictions but also to provide norms and rules to guide actions [6]. Some scholars believe that ecological wisdom is a knowledge that guides practice [7]. It is a combination of theoretical wisdom (ecosophy) to decide what to do and practical wisdom (ecophronesis) to know how to apply it [8]. Ecological wisdom is aimed at realizing the harmonious coexistence of man and the natural environment [9]. This is exactly in line with the philosophy shared by different indigenous people around the world—respect for all life forms and land; and the unity of nature and man advocated in traditional Chinese culture is the core of ecological wisdom. People can change the environment. But this change must follow the laws of nature, without destroying the ecosystem [10].Ecological wisdom emphasizes the integrity of a system, which is particularly important at present. However, the essence of many theories and practices is still to balance and select ecosystem services for different parts of society [11]. The goal of ecological wisdom is the harmonious relationship between man and the environment. Therefore, resilient cities no longer focus solely on improving resilience against a single hazard, nor do they advocate a choice or balance among competing urban resilience such as those of ecosystems or social systems [12]. The study of ecological wisdom achieves harmony between man and nature by linking human values with ecological integrity. In this regard, the resilient lifestyle advocated by ecological wisdom refers to people’s willingness to acknowledge that the place they live is embedded in an ecosystem part of. Therefore, people’s requirements for quality of life and behavior should be adapted to the needs of maintaining the entire system. In other words, the creation of the built-up environment is to meet human needs, but must follow the laws of nature. To achieve a harmonious relationship between people and the environment is to develop ecological stability. A society in which the economy is favorable and the aesthetics and literatures coexist [13].Ecosmart cities adopt intelligent waste sorting technology. First, residents use uniform-sealed garbage bags to seal the garbage to block the odor of garbage and then directly distribute it to different garbage-sealed boxes in the basement through the sealed gas pipeline transportation system for storage [14]; self-unloading and then hoisting the sealed box full of garbage to the transport vehicle can complete garbage recycling and transfer. The entire waste sorting and recycling process is fully sealed and unmanned, which greatly reduces the risk of personnel infection with harmful microorganisms, ensures that the health of front-line sanitation workers is endangered, and effectively prevents secondary air pollution, providing protection for urban landscaping [15].Big data smart management technology is the intelligent embodiment of ecological smart city, providing urban residents with real data on the living environment and self-adjustment, so as to achieve environmental goals. Smart city’s public emergency management mainly uses intelligent equipment to analyze the data technology of the public environment to carry out urban management, but it lacks the management and control of urban living environment factors [16]. Ecosmart cities increase the intelligent management function of environmental big data. Through the use of smart homes, the collection, recording, classification, induction, and other massive data of users are scientifically processed to accurately reflect the immediate needs of customers for the living environment, so as to provide more accurate effective point service content [17]. The smart management system developed with big data technology integrates smart devices with the smart environment system, realizes real-time remote monitoring and adjustment of parameters such as outdoor environment and indoor environment quality through the APP platform, grasps room information anytime and anywhere, and builds a set of intelligent, environmentally friendly, safe, and convenient smart home system [18]. Especially in terms of home health environment, according to the latest urban environment and community environment data, the monitoring system content of home environment can be replaced in time, such as microbial parameter detection, early monitoring, and early warning, and according to their own needs to adjust and close doors and windows, use and stop using household appliances, reduce household air pollution, and realize the unification of the urban environment and the home environment [19]. In the process of building an ecological smart city in the future, the smart environmental big data will conduct static and dynamic analysis and data modeling through three different levels of data: home, community, and city, to provide urban environment and community, home planning and design for urban construction. For example, when planning a community, you can calculate the total area, green space, water area, etc. required by the community from the basic data of the number of households and population in the community and according to the data model of the human settlement and health environment, so as to determine the environmental indicators that meet the needs of people’s health and guide environmental planning and architectural planning and design [20].From a research perspective, most studies focus on the subresearch on ecocity or smart city, and there are relatively few studies integrating the two. The operability of constructing the measurement index system and the availability of data lack certain theoretical and practical significance, and the practical application value is limited. The unique characteristics of cities and the problems they are facing have put forward targeted development suggestions, and there are relatively few studies in this area.This paper analyzes the application of the ecological economic model based on parallel accumulation sorting and dynamic Internet of Things in the construction of ecological smart city, explores the construction of ecological smart city, and promotes the construction and development of ecological smart city.


## 2. Parallel Sorting Learning Algorithm

### 2.1. Sorting Learning Algorithm

The core technology of information retrieval is sorting. The key to sorting is to learn a sorting model by using the given document set and the manually marked document relevancy and then score and sort the documents to be sorted according to the sorting model. The traditional information retrieval model (such as BM25 and language model) is difficult to obtain the user’s approval due to its simple construction method. At the same time, with more and more feature vectors of the information to be retrieved, the previous retrieval model is simply unable to do such a job, so people naturally introduce machine learning algorithms to learn the ranking model.We set a query setQ=q1,q2,⋯,qn, where qi represents the i-th query, and set a document set Di=d1i,d2i,⋯,dmqii. Among them, dji represents the corresponding document set obtained for the query qi, and n(qi) represents the number of document sets returned by the query. For a specific query qi, we denote the relevance of the document di corresponding to it as yi, which is given by professional researchers and used as a training set. Each level can be marked as one of a set of relatedness (very related, partially related, and not related). X=Q×D,xi∈X,j=1,2,⋯,m;j=1,2,⋯,n, xi represents a feature vector, S=xi,yji=1m is used as the training set, where Yi=y1i,y2i,⋯,ynqii. Then, the problem of sorting learning can be described as follows. In sorting learning, our ultimate goal is to create a sorting function fq,d by sorting the training system, as shown in Figure 1. When a new query qm+1 is input to the query system, we use the sorting function to score the data in the dataset D. Then, according to the score of each data, we finally evaluate our ranking results through some evaluation indicators commonly used in ranking learning and finally consider adjusting the parameters to optimize the model.Figure 1
Ranking learning system.Since the sorting effect of the method based on document pair is ideal and the complexity of the algorithm based on document list is lower, this paper chooses the sorting learning algorithm based on document pair. Figure2 shows the specific method for constructing training instances based on the document pair-based ranking learning algorithm.Figure 2
Construction method of training instance based on Pair-wise.For queryqi, we obtain a set of training instances according to the above-mentioned method of constructing sample pairs according to the difference of the relevance (label) of all document sets corresponding to it. In this set of training instances, each instance is constructed from documents with different degrees of relevance. For example, the relevancy degrees corresponding to documents d1i and d2i in Figure 2 are 4 and 2, respectively, then we construct a paired training instance jd1i−d2i to make its relevancy degree +1, or it can be constructed asd2i−d1i to make this relevancy degree -1. In this way, when sorting documents, we only need to classify all pairs of training instances to obtain the order relationship of all documents in the document set, so that document sorting can be achieved.The notationA>B indicates that the ranking of A is better than that of B; then, the input training instance of the SVM based on ranking can be denoted as R=x1,y1,⋯,xm,ym. Among them, fx represents the ranking function, which is different from the output of the classification support vector machine. Since the sorting SVM based on paired documents is approximately linearly separable, we adopt a linear kernel to express the sorting functionfx⟶.
(1)fx⟶;w⟶∗=w⟶∗,x⟶.We note that there is no intercept termb in SVM in Equation (1). The reason is that in ranking learning, we only care about the difference between different ranking results in the output results, without considering the absolute value between them. Therefore, when we learn the ranking model, we can ignore the intercept term, so we do not need to calculate its value in the ranking model.According to the ranking model trained using the sorted support vector machine on the training document setR, we can obtain the global ranking function and have the following formula:
(2)∀xi,xjyi>yj∈R;fxi>fxj⇔w⋅xi>w⋅xj⇔wxi−xj.We can clearly see that the sorting problem is transformed into an SVM classification problem. In actual training, we construct the original training instance as a pair of input samples, and the specific constructor is as follows:(3)xi1−xi2,zi=+1,ify1−y2>0−1,elsei=1l.In the above formula,xi1 and xi2 represent the relevance of the original training instance, respectively, and 1 represents the total number of constructed pairs of samples.After transforming the learning to rank problem into a binary classification problem, all we have to do is to classify the pairwise sample set based on the input training examples. Then, SVM is utilized to solve this problem.We assume that the training sample setxi∈Rn,i=1,⋯,l and its corresponding class label yi∈+1,−1,i=1,⋯l has been given, where l represents the number of training sample sets, and n represents the number of training samples. Then, applying SVM to classification is actually equivalent to solving the following SVM model:
(4)minw,b,ξ12w2+C∑i=1lξis.t.wKxi+b≥1−ξi,ξi>0,i=1,⋯,l.Among them,K represents the kernel function, and its function is to solve the “dimension disaster” caused by the high-dimensional input of SVM, thereby greatly reducing the amount of calculation. The frequently used kernel functions are linear kernel, radial basis kernel, polynomial kernel, and sigmoid kernel. w represents the weight vector, C represents the penalty coefficient, which is mainly used to balance the generalization ability and training error, and ξi represents the i-th slack variable, and the main meaning is to quantify the distance of the noise point from the optimal classification hyperplane. According to Wolff’s duality theory, we can deform the above equation to obtain its dual problem, such as formula (5), and solve the optimal solution of the original problem by solving its dual problem.
(5)maxα∑i=1lαi−12∑i,j=1lyiyjαiαjKxi,xj,s.t.0≤αi≤C∀i,∑i=1lyiαi=0.Among them,αi represents the Lagrange multiplier corresponding to the i-th sample. We consider bringing the input vector model into the above formula, then we can get
(6)maxα∑i=1lαi−12∑i,j=1lyiyjαiαjxi1−xi2,xj1−xj1,s.t.∑i=1lyiαi=0,0≤αi≤C,i=1,⋯,l.Finally, we use a modified sequential minimization algorithm (SMO) to solve the dual problem of formula (6) to find the optimal Lagrange multiplier α⟶∗. According to the KKT (Karush-Kuhn-Tucker) condition, once the optimal α⟶∗ is given, the optimal weight vector can also be expressed as
(7)w⟶∗=∑i=1lα⟶∗yixi1−xi2.After obtaining the optimal weight vector, we can use it to construct the sorting function.(8)fx⟶;w⟶=w⟶∗,x⟶=∑i=1lα⟶i∗,yix1−x2.This way, when there is an instance that needs to be sorted, we can score this instance with this sorting function and then sort based on its score. In this way, we use the sorted support vector machine to completely solve the sorting problem.From formula (6), we can see that if we want to train the SVM classification model, then we need to solve this dual problem, and we first convert formula (6) into its vector form:
(9)minαfα=12αTQα−eTα,s.t.yTα=0,0≤αi≤C,i=1,⋯,l.Among them,Q is a symmetric matrix, and its specific form is Qij=yiyjxi1−xi2,xj1−xj2, where xi1−xi2,xj1−xj2 represents the product of two pairs of training instances, and the vector e represents the unit vector.The performance of the improved SMO algorithm is improved a lot. The main steps of its algorithm include the following three steps:(1)
First initialize the Lagrange multiplier vector(2)
At the k-th iteration, if the k-th Lagrangian multiplier vectorα satisfies the optimal solution required by formula (2-9), then the algorithm stops the iteration and uses this Lagrangian multiplier vector to solve the weight vector(3)
Once the Lagrangian multiplierα of the binary working set F1 is selected, the algorithm starts to update the k +1 Lagrangian multiplier α and the gradient G, and then skips to step 2 to continue judging and updating


### 2.2. Sorting Learning Evaluation Metrics

Mean Average Precision (MAP) and discounted gain value are commonly used to evaluate ranking performance in the field of information retrieval. For a particular query, the accuracy at positionn, Panl9, is used to measure the relevance of the top n search results, which can be defined as
(10)P@n=#relevantdocsontopn.After averaging the accuracy, the AP value (Average Precision) will be obtained, which can be defined by the following formula:(11)AP=∑n=1NP@n×reln#relevantdocsforthisquery.In the above formula,N represents the number of documents returned for a particular query, and n represents the position of the document in the sorted list. reln represents the relevance of the document at position n, reln=1 means that the document at position n is relevant to the query, and reln=О means that it is irrelevant to the query. The MAP value is the arithmetic mean of the AP values.NDCG is another evaluation index widely used in the field of information retrieval, which improves the traditional evaluation index. Its idea is to give more weight to documents with high relevance, and at the same time, the later the documents are arranged, the less users will consider these documents. Therefore, in NDCG, not only the influence of document relevancy but also the contribution of documents to the location is taken into consideration in the evaluation. When we are given a specific query, the NDCG value of locationm can be defined as
(12)NDCG@m=Zm∑j=1m2rj−1log1+j.Among them,zm represents a normalized parameter.


### 2.3. Parallel Hardware Architecture

The structure of the GPU is relatively simple. In the GPU, the stream processor and the video memory controller occupy the vast majority. Therefore, there are more computing modules and fewer functional modules. However, in the CPU, most of the hardware units are used as the control part, and only a few hardware units are used for calculation. Therefore, there are many functional modules in the CPU. There are multiple stream processing units in the GPU, each stream processor can process corresponding data independently, and each GPU has a large number of stream processing units. Therefore, this makes GPUs well suited for computationally intensive tasks. Taking the Tesla k20 of the Kepler architecture as an example, as shown in Figure3, it uses 15 SMX (Stream Multiprocessor eXtreme) units. Each of these SMX units uses 192 stream processing units (Core), which makes the k20 have more than 2000 processing units. Therefore, it is suitable for processing extremely computationally intensive calculations. At the same time, each SMX unit contains 32 Special Function Units (SFU), which makes the k20 faster when processing computationally intensive and complex tasks.Figure 3
NVIDIA Tesla k20 architecture.The hardware architecture of the GPU corresponds to the OpenCL programming model. Therefore, the design of the hardware architecture directly affects the acceleration performance of OpenCL programming. Although the SIMD (Single Instruction Multiple Data) engine in the GPU can only perform floating-point and integer AND-OR operations, it can reduce the number of instruction scheduling and instruction decoding components at the same time and directly allow hardware instructions to participate in data parallel operations. Each SIMD engine has a 32 KB Local Data Sharing Cache (LDS), its role is to hold local memory structures in OpenCL, and its data read speed is very fast. Therefore, some data that is not too large but frequently used in GPU operations can be stored here.The MIC coprocessor contains multiple computing cores of the “MIC architecture 1”, and the connection speed between these cores is very high, as shown in Figure4. The MIC has independent IA (Intel Architecture) computing cores. These IA cores support hardware multithreading, and each core can execute 4 threads concurrently, which makes the MIC card have a high degree of parallelism. At the same time, because the MIC uses GDDR5 (Graphics Double Data Rate version 5) memory, the memory reading speed is very fast.Figure 4
Architecture diagram of the MIC coprocessor.Due to the characteristics of the MIC architecture, Mode 1 is CPU-centric and MIC collaborative computing. This mode is more common in MIC applications, and it is suitable for scenarios where computation is relatively intensive in the application. This mode is also called offload mode. This programming form is similar to OpenMP, that is, for the part of the program that needs to be parallelized, it is handed over to the acceleration device for acceleration. When the program is executed, when the part that needs to be parallelized is encountered, the program code and the data to be used are transferred to the MIC for parallel execution, and then, the result is returned, and the main thread continues to execute the original program.


### 2.4. Parallel Programming Model

The memory model means that the memory that OpenCL needs to use for the kernel program is divided into four different types according to the actual hardware architecture, as shown in Figure5. Global Memory allows all work items in the work group to read and write data in this memory, but the read and write speed of this memory is relatively slow. Constant Memory is read-only, and the values stored in it cannot be changed when the kernel program is executed. Moreover, the local memory (local memory) belongs to only one work group, and the values in it can only be shared by all the work nodes in this work space. In addition, private memory belongs to only one worker node and cannot be viewed by other worker nodes. Compared with global memory, private memory has the fastest read and write speed, followed by local memory.Figure 5
OpenCL memory model.Programming models can be divided into three categories according to parallelism: data parallelism, task parallelism, and a programming model that is a mixture of these two. Data parallelism refers to performing the same operations on data to achieve parallel effects. In addition, task parallelism means assigning certain tasks to each worker node, so that the worker nodes can perform operations independently.When OpenMP is used, the programmer needs to specify the part of the program that can be used for parallelism. By adding the keyword of parallel compilation, the parallel segment program can be added to multithreading. A simpler programming mode in OpenMP is the fork-join parallel mode, that is, a task is decomposed (fork) into multiple subtasks and executed in parallel in multiple threads, and the results are merged (join) after the execution. If it is assumed that there are now two serial tasks and one parallel task in OpenMP, then their operation mode is shown in Figure6.Figure 6
OpenMP task execution model.


## 2.1. Sorting Learning Algorithm

The core technology of information retrieval is sorting. The key to sorting is to learn a sorting model by using the given document set and the manually marked document relevancy and then score and sort the documents to be sorted according to the sorting model. The traditional information retrieval model (such as BM25 and language model) is difficult to obtain the user’s approval due to its simple construction method. At the same time, with more and more feature vectors of the information to be retrieved, the previous retrieval model is simply unable to do such a job, so people naturally introduce machine learning algorithms to learn the ranking model.We set a query setQ=q1,q2,⋯,qn, where qi represents the i-th query, and set a document set Di=d1i,d2i,⋯,dmqii. Among them, dji represents the corresponding document set obtained for the query qi, and n(qi) represents the number of document sets returned by the query. For a specific query qi, we denote the relevance of the document di corresponding to it as yi, which is given by professional researchers and used as a training set. Each level can be marked as one of a set of relatedness (very related, partially related, and not related). X=Q×D,xi∈X,j=1,2,⋯,m;j=1,2,⋯,n, xi represents a feature vector, S=xi,yji=1m is used as the training set, where Yi=y1i,y2i,⋯,ynqii. Then, the problem of sorting learning can be described as follows. In sorting learning, our ultimate goal is to create a sorting function fq,d by sorting the training system, as shown in Figure 1. When a new query qm+1 is input to the query system, we use the sorting function to score the data in the dataset D. Then, according to the score of each data, we finally evaluate our ranking results through some evaluation indicators commonly used in ranking learning and finally consider adjusting the parameters to optimize the model.Figure 1
Ranking learning system.Since the sorting effect of the method based on document pair is ideal and the complexity of the algorithm based on document list is lower, this paper chooses the sorting learning algorithm based on document pair. Figure2 shows the specific method for constructing training instances based on the document pair-based ranking learning algorithm.Figure 2
Construction method of training instance based on Pair-wise.For queryqi, we obtain a set of training instances according to the above-mentioned method of constructing sample pairs according to the difference of the relevance (label) of all document sets corresponding to it. In this set of training instances, each instance is constructed from documents with different degrees of relevance. For example, the relevancy degrees corresponding to documents d1i and d2i in Figure 2 are 4 and 2, respectively, then we construct a paired training instance jd1i−d2i to make its relevancy degree +1, or it can be constructed asd2i−d1i to make this relevancy degree -1. In this way, when sorting documents, we only need to classify all pairs of training instances to obtain the order relationship of all documents in the document set, so that document sorting can be achieved.The notationA>B indicates that the ranking of A is better than that of B; then, the input training instance of the SVM based on ranking can be denoted as R=x1,y1,⋯,xm,ym. Among them, fx represents the ranking function, which is different from the output of the classification support vector machine. Since the sorting SVM based on paired documents is approximately linearly separable, we adopt a linear kernel to express the sorting functionfx⟶.
(1)fx⟶;w⟶∗=w⟶∗,x⟶.We note that there is no intercept termb in SVM in Equation (1). The reason is that in ranking learning, we only care about the difference between different ranking results in the output results, without considering the absolute value between them. Therefore, when we learn the ranking model, we can ignore the intercept term, so we do not need to calculate its value in the ranking model.According to the ranking model trained using the sorted support vector machine on the training document setR, we can obtain the global ranking function and have the following formula:
(2)∀xi,xjyi>yj∈R;fxi>fxj⇔w⋅xi>w⋅xj⇔wxi−xj.We can clearly see that the sorting problem is transformed into an SVM classification problem. In actual training, we construct the original training instance as a pair of input samples, and the specific constructor is as follows:(3)xi1−xi2,zi=+1,ify1−y2>0−1,elsei=1l.In the above formula,xi1 and xi2 represent the relevance of the original training instance, respectively, and 1 represents the total number of constructed pairs of samples.After transforming the learning to rank problem into a binary classification problem, all we have to do is to classify the pairwise sample set based on the input training examples. Then, SVM is utilized to solve this problem.We assume that the training sample setxi∈Rn,i=1,⋯,l and its corresponding class label yi∈+1,−1,i=1,⋯l has been given, where l represents the number of training sample sets, and n represents the number of training samples. Then, applying SVM to classification is actually equivalent to solving the following SVM model:
(4)minw,b,ξ12w2+C∑i=1lξis.t.wKxi+b≥1−ξi,ξi>0,i=1,⋯,l.Among them,K represents the kernel function, and its function is to solve the “dimension disaster” caused by the high-dimensional input of SVM, thereby greatly reducing the amount of calculation. The frequently used kernel functions are linear kernel, radial basis kernel, polynomial kernel, and sigmoid kernel. w represents the weight vector, C represents the penalty coefficient, which is mainly used to balance the generalization ability and training error, and ξi represents the i-th slack variable, and the main meaning is to quantify the distance of the noise point from the optimal classification hyperplane. According to Wolff’s duality theory, we can deform the above equation to obtain its dual problem, such as formula (5), and solve the optimal solution of the original problem by solving its dual problem.
(5)maxα∑i=1lαi−12∑i,j=1lyiyjαiαjKxi,xj,s.t.0≤αi≤C∀i,∑i=1lyiαi=0.Among them,αi represents the Lagrange multiplier corresponding to the i-th sample. We consider bringing the input vector model into the above formula, then we can get
(6)maxα∑i=1lαi−12∑i,j=1lyiyjαiαjxi1−xi2,xj1−xj1,s.t.∑i=1lyiαi=0,0≤αi≤C,i=1,⋯,l.Finally, we use a modified sequential minimization algorithm (SMO) to solve the dual problem of formula (6) to find the optimal Lagrange multiplier α⟶∗. According to the KKT (Karush-Kuhn-Tucker) condition, once the optimal α⟶∗ is given, the optimal weight vector can also be expressed as
(7)w⟶∗=∑i=1lα⟶∗yixi1−xi2.After obtaining the optimal weight vector, we can use it to construct the sorting function.(8)fx⟶;w⟶=w⟶∗,x⟶=∑i=1lα⟶i∗,yix1−x2.This way, when there is an instance that needs to be sorted, we can score this instance with this sorting function and then sort based on its score. In this way, we use the sorted support vector machine to completely solve the sorting problem.From formula (6), we can see that if we want to train the SVM classification model, then we need to solve this dual problem, and we first convert formula (6) into its vector form:
(9)minαfα=12αTQα−eTα,s.t.yTα=0,0≤αi≤C,i=1,⋯,l.Among them,Q is a symmetric matrix, and its specific form is Qij=yiyjxi1−xi2,xj1−xj2, where xi1−xi2,xj1−xj2 represents the product of two pairs of training instances, and the vector e represents the unit vector.The performance of the improved SMO algorithm is improved a lot. The main steps of its algorithm include the following three steps:(1)
First initialize the Lagrange multiplier vector(2)
At the k-th iteration, if the k-th Lagrangian multiplier vectorα satisfies the optimal solution required by formula (2-9), then the algorithm stops the iteration and uses this Lagrangian multiplier vector to solve the weight vector(3)
Once the Lagrangian multiplierα of the binary working set F1 is selected, the algorithm starts to update the k +1 Lagrangian multiplier α and the gradient G, and then skips to step 2 to continue judging and updating


## 2.2. Sorting Learning Evaluation Metrics

Mean Average Precision (MAP) and discounted gain value are commonly used to evaluate ranking performance in the field of information retrieval. For a particular query, the accuracy at positionn, Panl9, is used to measure the relevance of the top n search results, which can be defined as
(10)P@n=#relevantdocsontopn.After averaging the accuracy, the AP value (Average Precision) will be obtained, which can be defined by the following formula:(11)AP=∑n=1NP@n×reln#relevantdocsforthisquery.In the above formula,N represents the number of documents returned for a particular query, and n represents the position of the document in the sorted list. reln represents the relevance of the document at position n, reln=1 means that the document at position n is relevant to the query, and reln=О means that it is irrelevant to the query. The MAP value is the arithmetic mean of the AP values.NDCG is another evaluation index widely used in the field of information retrieval, which improves the traditional evaluation index. Its idea is to give more weight to documents with high relevance, and at the same time, the later the documents are arranged, the less users will consider these documents. Therefore, in NDCG, not only the influence of document relevancy but also the contribution of documents to the location is taken into consideration in the evaluation. When we are given a specific query, the NDCG value of locationm can be defined as
(12)NDCG@m=Zm∑j=1m2rj−1log1+j.Among them,zm represents a normalized parameter.


## 2.3. Parallel Hardware Architecture

The structure of the GPU is relatively simple. In the GPU, the stream processor and the video memory controller occupy the vast majority. Therefore, there are more computing modules and fewer functional modules. However, in the CPU, most of the hardware units are used as the control part, and only a few hardware units are used for calculation. Therefore, there are many functional modules in the CPU. There are multiple stream processing units in the GPU, each stream processor can process corresponding data independently, and each GPU has a large number of stream processing units. Therefore, this makes GPUs well suited for computationally intensive tasks. Taking the Tesla k20 of the Kepler architecture as an example, as shown in Figure3, it uses 15 SMX (Stream Multiprocessor eXtreme) units. Each of these SMX units uses 192 stream processing units (Core), which makes the k20 have more than 2000 processing units. Therefore, it is suitable for processing extremely computationally intensive calculations. At the same time, each SMX unit contains 32 Special Function Units (SFU), which makes the k20 faster when processing computationally intensive and complex tasks.Figure 3
NVIDIA Tesla k20 architecture.The hardware architecture of the GPU corresponds to the OpenCL programming model. Therefore, the design of the hardware architecture directly affects the acceleration performance of OpenCL programming. Although the SIMD (Single Instruction Multiple Data) engine in the GPU can only perform floating-point and integer AND-OR operations, it can reduce the number of instruction scheduling and instruction decoding components at the same time and directly allow hardware instructions to participate in data parallel operations. Each SIMD engine has a 32 KB Local Data Sharing Cache (LDS), its role is to hold local memory structures in OpenCL, and its data read speed is very fast. Therefore, some data that is not too large but frequently used in GPU operations can be stored here.The MIC coprocessor contains multiple computing cores of the “MIC architecture 1”, and the connection speed between these cores is very high, as shown in Figure4. The MIC has independent IA (Intel Architecture) computing cores. These IA cores support hardware multithreading, and each core can execute 4 threads concurrently, which makes the MIC card have a high degree of parallelism. At the same time, because the MIC uses GDDR5 (Graphics Double Data Rate version 5) memory, the memory reading speed is very fast.Figure 4
Architecture diagram of the MIC coprocessor.Due to the characteristics of the MIC architecture, Mode 1 is CPU-centric and MIC collaborative computing. This mode is more common in MIC applications, and it is suitable for scenarios where computation is relatively intensive in the application. This mode is also called offload mode. This programming form is similar to OpenMP, that is, for the part of the program that needs to be parallelized, it is handed over to the acceleration device for acceleration. When the program is executed, when the part that needs to be parallelized is encountered, the program code and the data to be used are transferred to the MIC for parallel execution, and then, the result is returned, and the main thread continues to execute the original program.


## 2.4. Parallel Programming Model

The memory model means that the memory that OpenCL needs to use for the kernel program is divided into four different types according to the actual hardware architecture, as shown in Figure5. Global Memory allows all work items in the work group to read and write data in this memory, but the read and write speed of this memory is relatively slow. Constant Memory is read-only, and the values stored in it cannot be changed when the kernel program is executed. Moreover, the local memory (local memory) belongs to only one work group, and the values in it can only be shared by all the work nodes in this work space. In addition, private memory belongs to only one worker node and cannot be viewed by other worker nodes. Compared with global memory, private memory has the fastest read and write speed, followed by local memory.Figure 5
OpenCL memory model.Programming models can be divided into three categories according to parallelism: data parallelism, task parallelism, and a programming model that is a mixture of these two. Data parallelism refers to performing the same operations on data to achieve parallel effects. In addition, task parallelism means assigning certain tasks to each worker node, so that the worker nodes can perform operations independently.When OpenMP is used, the programmer needs to specify the part of the program that can be used for parallelism. By adding the keyword of parallel compilation, the parallel segment program can be added to multithreading. A simpler programming mode in OpenMP is the fork-join parallel mode, that is, a task is decomposed (fork) into multiple subtasks and executed in parallel in multiple threads, and the results are merged (join) after the execution. If it is assumed that there are now two serial tasks and one parallel task in OpenMP, then their operation mode is shown in Figure6.Figure 6
OpenMP task execution model.


## 3. Ecological Smart City Model

Ecology is a science that studies the interaction between organisms and the environment, and between organisms and organisms, and uses the laws to solve human consciousness and behavior and to explore the laws of their occurrence and development. It plays an active role in species evolution, system evolution, and ecosystem management and prediction. Ecology divides the organizational level of research objects into seven levels: individual-population-community-ecosystem-landscape-region-.global to study the interaction between organisms and the environment (Figure7).Figure 7
The scale relationship of the seven levels of ecology.The ideographic structure of the ecocity space system is “spatial structure layer-spatial function layer-spatial value layer” from the outside to the inside. The referents of these three levels are independent of each other, representing the contents of different levels of the ecocity space, and at the same time, they are related to each other. The space value layer is the deep meaning of the existence and development of the space structure layer and the space function layer. The spatial structure layer is the physical manifestation of the rich inner and outer of urban space. The spatial function layer is the actual utility of urban social and economic life, connecting form and meaning (Figure8). These three levels constitute the three subsystems of the system, respectively.Figure 8
The structure of the ecological city space system.Ecological smart city refers to the use of ecological principles, with ecologicalization, informatization, and innovation as the principles and leading paths, to create high-quality, adaptable, and beautiful villages. It adheres to the development concept of ecological priority and people-oriented, strengthens the construction of wisdom, strengthens the drive of innovation, and promotes the sustainable development of the countryside, as shown in Figure9.Figure 9
Schematic diagram of the connotation of ecological smart city.


## 4. Application Analysis of the Ecological Economics Model of Parallel Accumulation Sorting and Dynamic Internet of Things in the Construction of Ecological Smart City

Based on the above construction of ecological smart city, this paper combines the proposed parallel accumulation sorting algorithm and dynamic Internet of Things technology to analyze the construction effect of ecological smart city. In this paper, the system simulation is carried out through MATLAB, and the data collection and data processing of the ecological smart city based on the algorithm of this paper and the dynamic Internet of Things technology are calculated. Moreover, this paper evaluates the effect of ecological smart city construction, and the results are shown in Table1 and Table 2.Table 1
Data collection and data processing of ecological smart city.
NumberData collectionData processingNumberData collectionData processing192.8194.961695.9991.97291.6494.571794.5790.39395.9193.031892.2595.99493.5190.341994.7293.22594.9994.612093.2392.00691.1191.162190.9291.08791.5392.632290.2191.44892.9195.062394.7893.95994.6595.922490.8992.031091.8494.642595.3090.981191.9494.002695.0492.641291.7590.632792.5591.891391.7291.182893.6194.111494.1591.582993.9994.631593.2090.053092.8393.70Table 2
The construction effect of ecological smart city.
NumberEcological smart city constructionNumberEcological smart city constructionNumberEcological smart city construction181.492181.214182.20291.912289.584282.21384.252383.224381.07488.462485.334483.33587.562589.724583.37686.902681.094688.58787.962785.984782.75887.412881.934887.80983.892984.384991.491085.773085.905086.411185.233189.745189.731286.293283.785284.221386.323381.425383.361484.273481.135485.471584.013588.015590.891684.183689.865686.231785.683783.045791.151889.403882.315889.471985.743991.555988.092084.544085.546083.59Through the above experimental research, it can be seen that the ecological economics model based on parallel accumulation sorting and dynamic Internet of Things has a good application effect in the construction of ecological smart cities and can effectively promote the construction and development of ecological smart cities.


## 5. Conclusion

By comparing the research on “ecological wisdom” at home and abroad, it is found that Western scholars mostly understand and practice ecological wisdom through sustainability, introduce concepts such as resilience, adaptive design, and ecosystem services as the practical framework and evaluation basis for ecological wisdom, and emphasize its value in the process of adaptive organization and management. However, as the birthplace of the philosophical view of “harmony between man and nature”, scholars in China are more likely to understand and accept “ecological wisdom” but lack corresponding scientific support in its application, so the guiding value of its modern practice is weak. This paper analyzes the application of the ecological economic model based on parallel accumulation sorting and dynamic Internet of Things in the construction of ecological smart city and explores the construction of ecological smart city. The experimental research shows that the ecological economic model based on parallel accumulation sorting and dynamic Internet of Things has better application effect in the construction of ecological smart city.



---

*Source: 8770859-2022-05-18.xml*