# Artificial Intelligence-Based Recommendation and Application of Public Services in Smart Cities

Authors: Jin Zhou
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

With the promotion and application of information technology, smart cities based on artificial intelligence have become the best choice for the government to solve urban problems, connect urban citizens, and provide quality public services. From the initial information city and digital city to the current smart city, the construction of smart cities has undergone profound changes with five major characteristics: big data, intelligence, innovation, interaction, and integration, and Internet giants have emerged in the field of public services in smart cities. Internet giants are emerging in the construction of public service platforms for smart cities, and traditional smart city construction enterprises are also expanding various forms of urban operation services through the form of “Internet+“. Nevertheless, there is still a gap between the quantity and quality of China’s smart cities compared with developed countries, and there is a need to build a number of pilot smart cities characterized by the linkage of artificial intelligence technology and public services, easy to promote, and sustainable development. The smart city construction model with public services as the core has research value and has the possibility of becoming the mainstream development in the future. Therefore, exploring the organic combination of AI technology and urban public services is the key to answer whether AI technology can promote the improvement of urban public services.


---

## Body

## 1. Introduction

China’s urbanization process is accelerating, the level of economic development is rapidly increasing, the urban population is constantly coming in and expanding, and residents’ requirements for daily life and public services are also increasing [1]. Under such circumstances, the traditional public service model is increasingly unable to adapt to these changes [2]. In the face of the growing population size and the increasing requirements for living experience, the contradiction between insufficient urban carrying capacity and low level of public services has forced the need for rapid transformation in the construction of urban public service facilities. Smart cities are undoubtedly a powerful means to break this bottleneck [3]. SmartCity is an intelligent self-awareness, self-adaptation, and self-optimization based on comprehensive perception and interconnection of ubiquitous information using new-generation information technology to achieve seamless connection and cooperative linkage among people, things, and urban functional systems, so as to make intelligent responses to urban service demands, such as people’s livelihood, environmental protection, public safety, urban functions and business activities, and form a safe, convenient, efficient, and green city with sustainable endogenous power. It can form a safe, convenient, efficient, and green city form with sustainable endogenous power [4]. It can make the services and facilities in the city make intelligent and rapid responses to better perform their functions and guarantee the development of people’s livelihood [5]. Public service facilities, which are the concrete manifestation of the city’s services for its residents, are the means of expression of all aspects of the city’s functions [6]. Whether they are truly organically combined with modern information means, scientific planning and innovation, and ultimately meet the requirements of intelligent services, is the biggest criterion to measure whether a smart city is truly built.For the construction of urban public service facilities, the main issues to be considered are the rational allocation of space and the correspondence between functions and needs, so when using the theory of smart cities for construction, these issues should also be considered, and on this basis, a more “intelligent” model and thinking should be used to deal with problems, introduce new technologies, and bring wisdom into play [7]. After setting this basic direction, it is necessary to consider various factors, such as input, efficiency, effectiveness and balance. For example, when planning the space, it is necessary to ensure the maximum representation of functions, but also to take care not to take resources from other areas and to ensure the overall coordination and science of urban planning. When designing the specific locations and configurations of various service facilities, the degree of residents’ demand for different services should be actually investigated so that the response speed and priority of the service facilities meet the actual needs, such as appropriately increasing the number and density of some services with high pedestrian flow and urgent demand [8]. In addition, when designing and planning, it is also necessary to apply a developmental perspective as much as possible and introduce innovative means and technologies so that traditional public service facilities can be infused with new vitality, keep up with the times, and strive to meet the gradually growing individualized needs of residents. In this way, it is also expected to enhance the residents’ sense of identity and life experience in the city, pull the development of the city, and improve the overall development level and comprehensive strength of the city.The construction of smart cities is also inseparable from the application of big data. Through data collection and macro analysis of city residents, we can summarize the demand and intensity of various public service facilities and residents’ tendency to choose them to help make more reasonable planning and settings [9]. By applying various perception-based technologies and location identification systems to draw precise point-to-point planning maps and incorporate detailed information of residents in real time, we can gain a deeper and more comprehensive understanding of residents’ daily needs and living habits and improve the efficiency of public service facilities in a targeted manner.At present, the construction and development of smart cities suffer from the lack of regional characteristics, insufficient development planning, unbalanced construction and application, imitation over R&D, and difficulty in integrating resources, while the research on smart cities emphasizes technology over application, the disconnection between high-tech and application services, and the deviation between concept and practice. How to plan urban public service facilities scientifically and effectively, and how to apply wisdom technology to public services in combination with social needs are the key points and difficulties of smart city construction, which is also the main theme of this paper.


## 2. Related Work

Since the theory of “smart city” was proposed, it has been discussed and analyzed by various parties, and the theoretical system is becoming more and more enriched and mature, and the basic connotation is changing [10, 11]. At present, the discussions and concerns about smart cities are mainly focused on the technical level and the policy level: at the technical level, the concern is about the technology to be introduced and its feasibility; at the policy level, the discussion is about the government’s attitude and guidance, and the presence of democratic forces is considered [12]. In addition, many scholars in China have been committed to constructing and filling the basic framework of smart city theory, trying to explore deeper connotations, combining local characteristics or even local features, and constructing a comprehensive and detailed theory from which all places can learn and form a system that truly fits our national conditions [13].Technology has always been the focus of attention, and although the combination of information technology and urban construction is not a new concept, how to use it skillfully and rationally needs to be explored in depth [14]. At present, smart cities are applied to a variety of technical means, of which the supporting technologies mainly include cloud computing, information collection and integration, artificial intelligence identification, etc. And with the continuous development of information technology and frequent results, more new technologies are bound to be applied to the construction of smart cities [15]. At present, several cities in China have incorporated the construction of smart cities into their development plans, and the applicable technologies will be different for these cities with different development directions and human geographic connotations [16]. How to use the technology comprehensively according to their own characteristics and realize the maximum value of the technology is also a problem that needs to be faced directly [17].The smooth construction and development of smart cities cannot be achieved without the support and guidance of policies [18]. In this regard, relevant departments and experts have studied and discussed the policies. Smart cities involve economy, people’s livelihood, humanities, environment, etc., which cannot be favored over others, otherwise, it will easily cause unbalanced and unstable conditions, which is the reason why policy forces are needed to intervene. The policy research should start from the position of each resident, close to the people’s life, and try to achieve real benefit to the people.In the context of artificial intelligence, it is of great importance how to better recommend and apply public services in smart cities, in which effective intelligent recommendation algorithms are necessarily needed. The basic idea of recommendation system, as a tool to facilitate people to quickly and accurately locate the items they are interested in among a large number of item choices in the era of big data, is to extract the characteristics of users and items from their historical data by building a model, and to recommend items to users in a targeted manner using the trained model [19]. Research on applying reinforcement learning to recommender systems has received increasing attention. The first exploratory model that applies deep reinforcement learning to recommender systems is DRN [20], which constructs a basic framework for recommender systems, and the block diagram is shown in Figure 1.Figure 1
Schematic diagram of deep reinforcement learning-based recommendation system.In such a reinforcement learning framework, the learning process of the model can be iterated continuously, and the iterative process has the following main steps.(1)
Initialize the recommendation system (intelligent body)(2)
The recommendation system performs news ranking (action) based on the current collected data (state) and pushes it to the website or app (environment)(3)
The user receives a list of recommendations and clicks or ignores (feedback) a recommendation result(4)
The recommendation system receives the feedback and updates the current state or updates the model-by-model training(5)
Repeat step 2There have been many research results about deep reinforcement learning-based recommender systems, such as the literature [21] and others applied DQN to social networks. Applied DQN to a trust recommendation system based on social networks, applied to an intelligent body to learn the dynamic representation of trust between users and recommend users based on that trust value; literature [22] applied DDQN to recommendation suggestions, solving the problems of low recommendation accuracy, slow speed, and cold start; literature [23] applied DDPG algorithm to stored recommendations, solving the problem of sparse user data. The literature [24] applied the Actor-Critic algorithm to list-based recommendation, solving the problem that the traditional recommendation model can only model the recommendation process as a static process. The above research results and the numerous studies not listed above use the nature of reinforcement learning itself to solve the recommendation problem, and rarely consider the problem from the recommendation perspective.


## 3. Practical Scheme

By dividing the basic public service items, the dimensions of measuring the level of public services in smart cities were classified as public education (PE), social security (SC), medical health (MHC), housing security (HC), public culture (PC), and social services (SS). The smart city pilot started in 2013, so the panel data of 31 provinces (regions and cities) in China from 2014 to 2018 were selected for the empirical study. The data were obtained from China Statistical Yearbook, China Science and Technology Statistical Yearbook, and National Housing Fund Report from 2014 to 2018. In order to exclude the influence of factors, such as interaction terms and reveal the relationship between AI technology and public service level, control factors are added and a panel data model is constructed:(1)PEti=α0+β1DIti+β2DOti+β3GDPti+β4FDIti+β5INFti+β6PSti+ϵti,SCti=α0+β1DIti+β2DOti+β3GDPti+β4FDIti+β5INFti+β6PSti+ϵti,MHCti=α0+β1DIti+β2DOti+β3GDPti+β4FDIti+β5INFti+β6PSti+ϵti,HCti=α0+β1DIti+β2DOti+β3GDPti+β4FDIti+β5INFti+β6PSti+ϵti,PCti=α0+β1DIti+β2DOti+β3GDPti+β4FDIti+β5INFti+β6PSti+ϵti,1n∑i=1nAve_Rewardi,n,where PEti denotes the level of public education in city i (i  = 1, 2, …, n) in year t, SCti denotes the level of social security in city i in year t, MHCti denotes the level of health care in city i in year t, HCti denotes the level of housing security in city i in year t, PCti denotes the level of public culture in city i in year t, SSti denotes the level of social services in city i in year t, DIti denotes the AI technology input of city i in year t, DOti denotes the AI technology output of city i in year t, GDPti denotes the economic level of city i in year t, FDIti denotes the openness level of city i in year t, INFti denotes the infrastructure level of city i in year t, PSti denotes the population size of city i in year t, and ϵti is a random disturbance term.Public education (PE) is measured by the pupil–teacher ratio in elementary schools. With the popularization of quality education, the teacher–student ratio has become an important criterion for the improvement of educational strength. Social Security (SC) is measured by the urban registered unemployment rate. With the development of the economy, the role of unemployment insurance in preventing unemployment and promoting employment is becoming more and more important, and has become a booster and safety valve for economic development and social stability. Medical Health Care (MHC) is measured by the number of beds in medical and health institutions per 1,000 people. With the development of modern economy, the residents’ demand for medical and health resources allocation is getting higher and higher, and the number of medical and health institution beds in a region represents the intensity of medical and health security in that region. Housing security (HC) is measured by the amount of CPF contributions. The value-added income of the CPF provides a source of funds for the construction of low-cost housing and supports low-income families in solving their housing problems, reflecting the special function of housing security. Public culture (PC) is measured by the number of books per capita in public libraries. In terms of equalization, standardization, digitalization, and socialization, libraries have always led the development of public cultural services. Social services (SS) are measured by the number of elderly beds per 1,000 elderly people. “The 13th Five-Year Plan points out that the number of social service beds for the elderly can be used as the basis for judging the assistance and welfare subsidies for the elderly.Artificial intelligence investments are based on trading logic and mathematical models given to computers by computer programmers. Computers are programmed to capture investment opportunities across the market and put them into practice, and all trading moves are made based on models, algorithms, and logic that can overcome human weaknesses, such as greed, fear, and fluke. Investment in artificial intelligence (DI) is measured by the intensity of investment in research and experimental development (R&D) in each region. Capital is the blood of innovation activities and is an important link to continuously support the development of innovation in the digital economy. R&D investment intensity can better measure the R&D capital investment in digital information technology. Artificial intelligence technology output (DO) is measured by the number of patent applications per 10,000 people in each region. Patent data can better reflect technological innovation and better demonstrate the level of AI technology in cities.Economic level (GDP), measured by per capita gross regional product; openness level (FDI), measured by foreign fixed asset investment; infrastructure (INF), measured by per capita urban road area; and population size (PS), measured by the number of population at the end of each year, are given in Tables1–3.Table 1
Descriptive statistics of each variable.
Variable nameSample sizeMean valueStandard errorMinMaximum valuePE15516.1872.3512.1318.99SC1553.1970.651.324.51MHC1558.9332.065.3918.21HC155545.798445.2142.122293.69PC1550.6990.550.283.28SS15528.79810.058.3165.21DI1550.2450.2101.00DO1550.2050.2301.00GDP1550.2790.1901.00FDI1550.1520.2101.00INF1550.5560.2301.00PS1550.3870.2801.00Table 2
Basic regression analysis.
Public servicesModelDIDOFixed effectsTime effectControl variablesNR2Public education1−4.029(2.268)0.153(1.325)√××1550.0492−5.055(0.569)−1.195(1.387)√√×1550.1033−5.348(2.446)−0.352(1.396)√×√1540.0694−5.987(2.568)−0.935(1.558)√√√1540.129Social security5−1.921(1.281)−0.093(0.265)√××1550.0616−1.202(1.178)0.510(0.389)√√×1550.1517−0.857(0.935)1.754(0.558)√×√1540.2698−0.635(0.976)1.727(0.597)√√√1540.289Health care97.267(3.825)0.907(0.955)√××1550.051105.854(3.789)−2.062(1.263)√√×1550.188116.395(4.223)−1.358(1.989)√×√1540.071126.236(3.512)−1.598(1.539)√√√1540.223Housing13485.002(386.698)1694.899(230.699)√××1550.73914101.899(435.698)1357.400(268.000)√√×1550.7981562.001(435.199)555.200(286.000)√×√1540.8551625.031(424.899)599.100(283.000)√√√1540.859Public culture170.212(0.285)0.868(0.145)√××1550.73818−0.115(0.283)0.539(0.142)√√×1550.798190.035(0.302)0.435(0.161)√×√1540.85520−0.062(0.289)0.469(0.129)√√√1540.865Social services21−4.359(19.798)8.779(10.188)√××1550.659226.987(25.268)9.899(13.872)√√×1550.78923−25.599(18.982)23.835(12.599)√×√1540.75524−16.029(19.525)15.001(14.232)√√√1540.132Table 3
Heterogeneity regression results.
Public servicesCategoryDIDONR2A−3.321(3.159)0.122(2.155)550.299B−11.563(4.712)−1.456(3.652)500.367C−5.698(6.312)−10.799(5.235)490.451East−2.156(3.038)−0.195(2.659)600.191Central−10.179(9.068)−8.985(7.334)450.412West−10132(5.556)−3.178(2.894)490.468Social securityA−2.049(0.953)0.522(0.688)550.293B2.036(1.478)1.623(0.915)500.595C−6.599(3.523)2.998(0.820)490.645East−0.152(1.132)1.293(0.652)600.265Central0.323(2.598)2.187(0.126)450.371West−5.236(2.239)1.789(1.569)490.525Health careA9.156(1.650)−5.123(1.002)550.253B2.968(5.469)−1.489(2.006)500.372C9.367(19.185)−11.321(15.865)490.521East7.152(3.339)−2.789(3.422)600.820Central−0.705(5.525)−13.569(4.335)450.453West16.598(12.635)−3.155(5.985)490.203HousingA44.003(486.200)−563.651(280.400)550.429B−39.598(345.900)−116.987(230.400)500.719C539.251(398.200)68.487(328.200)490.235East666.798(575.600)356.000(515.300)600.968Central1298.362(420.400)522.400(288.600)450.897West−122.000(415.200)470.000(265.400)490.921Public cultureA0.036(0.449)0.022(0.142)550.893B0.061(0.272)−0.055(0.188)500.926C−0.698(0.345)−2.179(0.455)490.906East0.309(0.455)0.279(0.195)600.896Central0–0.049(0.355)−0.035(0.295)450.897West−0.255(0.519)−0.263(0.196)490.793Social servicesA7.186(25.325)1.059(12.725)550.879B−37.269(23.805)34.100(17.655)500.931C187.399(117.825)46.168(77.165)490.756East−15.598(21.155)16.239(10285)600.425Central18.459(36.825)−49.179(30.958)450.498West91.897(135.895)58.235(35.889)490.620This section introduces the proposed model for Smart City Recommendation (SCR), which uses user interests as the states seen by the intelligences in deep reinforcement learning as a way to accomplish the intelligent recommendation task. To capture the long-term interest of users, this paper uses a long- and short-term memory network (LSTM) with state enhancement units to learn the browsing records of users over a longer period of time, and retention ratios in the network through three gating units.We use the attention mechanism as the base model for extracting users’ short-term interests. It is assumed that the user’s short-term interest can be extracted from three consecutive browsing records (item1, item2, and item3), which are coded to form vectorγ. After that, the three vectors are calculated as respective Queries vector, Keys vector, and Values vector according to different parameters WQi,WKi,WVii=1,2,3 and combined into a matrix form, and then the following formula is used to calculate the self-attentive value of each record is calculated by the following formula.(2)Z∗=softmaxQ×KTdk,where Q,K,V are the matrices based on X1,X2,X3 vectors combined as Queries vector, Keys vector, and Values vector, respectively, and dk is the length of a browsing record. Z∗ is the matrix of the final calculated vector of short-term interests of the user reflected by each item.The final short-term interest of the user is achieved by directly summing the user short-term interest vectors reflected by each item, i.e.,(3)shortinterest=Z1+Z2+Z3+⋯+Zn.TheZi in the equation represents the user’s short-term interest reflected by the i th browsing record. i has a temporal characteristic, i.e., the larger i is, the closer it is to the current moment, and Zi the closer the interest expressed is to the user’s current interest. Careful consideration reveals that when multiple Zi’s are superimposed, the trend of current user short-term interest is diluted as Zi’s are superimposed. To solve this problem, this paper improves short interest by adding weights to the short-term interests expressed by each browsing record in order, and the more backward the time, the greater the weight assigned to the user’s short-term interests, as expressed by the formula(4)shortinterest=1nZ1+2nZ2+3nZ3+⋯+Zn.The final model is calledT-self-attention, and the weight of the interest vector in the short-term interest composition is assigned in time sequence. By embedding the long and short-term interest extraction module into the Actor network of the DDPG algorithm, the purpose of updating the parameters of the long- and short-term interest extraction module network while training the Actor network is achieved, and an improvement of the Actor network is shown next. The pseudocode of the algorithm of SCR is given in Algorithm 1.Algorithm 1: SCR algorithm.
Input: user history browsing recordsRandom initialization of Critic networkQs,aθQ and Actor network μsθuNetwork parametersθQ,θuInitialize the network parametersθQ′←θQ,θu′←θu for the target network Boo Q′,μ′.Initialize the LSTM network parametersInitialize theT-self-attention network parametersInitialize theT-self-attention network parametersFor episode = 1, Mdo for action exploration initializationRandom processNRandomly select useruGet the current browsing history of useru and the browsing history of the next momentFort = 1 to T doBased on the current browsing recordRc , the current moment status st is generated by Algorithm 2Based on the next browsing recordRn, the next moment st+1 is generated by AlgorithmGenerate action based on Evaluation-Actor and noiseat=μstθu+NtExecute the actionat Get the return rtCalculating TD-error target valuesyt=rt+γQ′st+1,μ′st+1θu′θQ′Based on lossL=1/n∑iyi−Qsi,ai+θQ2Update Critic NetworkUpdate actor policy with sampling policy gradient:∇θ′J≈1/N∑i∇aQs,aθQs=si,a=μsi∇θμsθasUpdate the target network parameters by soft copy.θq′←τθQ+1−τθQ′θu′←τθu+1−τθu′Output: predicted ratings


## 4. Case Study

In order to prove the effectiveness of our scheme, we have experimented and analyzed it on a dataset. In this paper, the following rules are followed in both training and testing phases: the user browsing sequence is denoted as:Su=I1,I2,I3,…,ISu , where Ii denotes the i-th record of the item viewed by the user. The first 0.8∗Su of each user’s browsing records are used as the training set, and the remaining data are used as the test data. During training, the browsing records in the training set are input into the model in order of users, and for each record, the model predicts the rating of the recommendations contained in the record, and the reward value is calculated based on the difference between the real rating and the predicted rating and fed back to the intelligence, and the algorithm optimizes the model based on the reward value. The operations during testing are similar to those during training, but there is no model optimization operation.(1)
Action space: in this paper, the original scores are normalized to map the range of values to the interval [0, 1], which becomes (0, 0.25, 0.5, 0.75, 1). Meanwhile, the results are mapped to the [0, 1] interval using the sigmoid activation function at the fully connected layer of the algorithm using the floating-point data with continuity generated each time as the action, i.e., the predicted recommendation scores. Therefore, the action space of this model is a continuous space in the interval of [0, 1].(2)
State space: the user browsing records are treated as an observation, and the extracted interests are used as states after interest extraction by the long-term interest and short-term interest extraction modules in chronological order. The brief process is shown in Figure2.(3)
Reward function: when designing the reward function, this paper uses the difference between the predicted score and the real score as the criterion to guide the optimization direction of the intelligent body. The specific design approach is as follows:(5)Reward=e−abspre_score−real_score,where pre-score indicates the predicted score, real_score indicates the real score, and abs indicates that the absolute value sign is taken. The reward function can be interpreted as follows: the larger the gap between the predicted score and the real score, the smaller the reward obtained by the intelligence, and the smaller the gap the larger the reward obtained.Figure 2
Sketch of state generation.In this paper, the performance of the algorithm is observed mainly through the trend of the rewards obtained by the intelligences to observe whether the algorithm eventually converges. In testing the convergence of the algorithm, because the test results of a single user are contingent and do not reflect the overall performance of the algorithm, this paper collects the rewards obtained by the intelligences of each record of each user during the test and reflects the convergence of the algorithm by calculating the mean value of the collected data. Thus, the final rewards used for testing take the form of(6)Ave_reward=∑i∑jrijN.The effectiveness of the algorithm is tested using the root mean square error (RMSE) and the mean absolute error (MAE), which are common test metrics for rating classification algorithms. The RMSE and MAE are expressed as(7)RMSE=1m∑i=1myi−y^i2,MAE=1m∑i=1myi−y^i.


### 4.1. Experimental Results and Analysis

#### 4.1.1. Overall Performance Comparison

Therefore, after the analysis of Tables4–6, the performance of the deep reinforcement learning algorithm based on the extraction of public service infrastructure. The specific results are given in Tables 4–6.Table 4
Comparison of experimental results.
AlgorithmDataset 1Dataset 2Ave_RMSEAve_MAEAve_RMSEAve_MAESCR0.39920.22880.27760.1115DDPG + RLSTM0.45800.26160.52220.4085DDPG + LETM0.58920.46590.55680.4439DDPG +T_self_attention0.57620.40250.44860.2826DDPG + self_attention0.59650.442590.53560.3636DDPG + RLSTM + self_attention0.40250.24190.85520.1818DDPG + LSTM +T_self_attention0.40360.23580.66580.2860DDPG + LSTM + self_attention0.44780.28860.68290.3259KNNBasic0.92280.74760.66580.4201KNNWithMeans0.93200.73860.98860.7325KNNBasicline0.89580.70660.93350.7136SVD0.88300.68560.92580.7022SVD++0.86220.9728092250.7268NMF0.92160.73520.96800.7698Table 5
Boost values of SCR and module combination algorithm on Ave_RMSE.
KNNBasicKNNWithMeansKNNBasiclineSVDSVD++NMFD1SCR0.52250.52880.49580.48730.45620.5216DDPG + RLSTM0.48480.48200.45620.75920.42120.4879DDPG + LETM0.32580.33520.35680.22520.32100.3215DDPG + T_self-attention0.34650.35250.23650.65820.32420.4521DDPG + self-attention0.32880.33550.15980.78300.28260.4663DDPG + RLSTM + self-attention0.52200.52680.22560.12590.27890.3221DDPG + LSTM +T_self-attention0.51220.52550.35580.25250.23450.5124DDPG + LSTM + self-attention0.46800.48200.70350.32510.23250.5110D2SCR0.75350.70780.65240.32560.24510.3654DDPG + RLSTM0.45680.42580.41250.25640.32140.3219DDPG + LETM0.42560.38650.32540.68710.40040.2598DDPG + T_self-attention0.53250.52260.46870.32520.65870.3987DDPG + self-attention0.44520.42260.10360.25200.23350.4210DDPG + RLSTM + self-attention0.15690.12980.72550.32100.56320.2113DDPG + LSTM +T_self-attention0.32500.28260.36520.10200.12350.1558DDPG + LSTM + self-attention0.30550.26780.55290.23250.25580.2864Table 6
Lift values of SCR and module combination algorithm on Ave_MAE.
KNNBasicKNNWithMeansKNNBasiclineSVDSVD++NMFD1SCR0.48860.80980.47760.45680.44320.4862DDPG + RLSTM0.46500.48860.44460.42500.41120.4620DDPG + LETM0.25250.26920.24560.22680.20320.2556DDPG +T_self-attention0.32560.33650.30050.28260.26880.3228DDPG + self-attention0.30010.32250.26870.26420.25450.2788DDPG + RLSTM + self-attention0.48650.50650.48560.46520.24590.4825DDPG + LSTM +T_self-attention0.49350.52250.48260.45150.43400.4896DDPG + LSTM + self-attention0.43580.44880.42680.45250.43680.4456D2SCR0.66120.63250.62580.38980.39580.6548DDPG + RLSTM0.36320.33420.34450.63520.60980.3588DDPG + LETM0.33300.30950.30260.32800.31120.3128DDPG +T_self-attention0.52200.48820.46820.30020.20010.4858DDPG + self-attention0.4880.39520.38460.29660.19870.3987DDPG + RLSTM + self-attention0.0044−0.0196−0.0352−0.0320−0.4680−0.0106DDPG + LSTM +T_self-attention0.20900.18490.15680.18220.15620.1952DDPG + LSTM + self-attention0.18260.16580.14230.15520.12830.1658


#### 4.1.2. Analysis of Algorithm Convergence

This part of the experiment mainly collects the Reward value Reward that the intelligent body can obtain after each prediction recommendation score when the algorithm is tested, as well as the RMSE and MAE values that can be obtained for each round of prediction, and analyzes the convergence of the algorithm by observing the trend of the values of these evaluation indexes. Also, in order to evaluate the convergence of the algorithm as a whole, this paper analyzes the algorithm by observing the trend of the average return Ave_Reward in each round. Figure3 shows the trend graph of the Ave_Reward values of the DDPG-LA algorithm and the combined algorithm of each module with increasing number of training sessions on both data sets.Figure 3
Ave_Reward trend graph.
(a)(b)From Figure3, it can be seen that the overall results of all algorithms tested on the dataset are better.


#### 4.1.3. Comparative Analysis of Discount Factorγ

In the experimental process to get the best experimental results, this paper tries various different discount factor values and visualizes the effect of each discount factor through the final results. And by comparing the height of the curves, it is found that the height of the curve changes with the value ofγ from small to large, and the trend of this correlation is shown in Figure 4.Figure 4
Trend of total_ave_reward value for different values ofγ.
(a)(b)The Total_Ave_Reward value represents the average of the average Reward for each round of testing at differentγ values, i.e.,(8)1n∑i=1nAve_Rewardi,where n denotes the number of test rounds. Figure 4 shows that different discount factors have an effect on the final convergence of the algorithm and are positively correlated.


## 4.1. Experimental Results and Analysis

### 4.1.1. Overall Performance Comparison

Therefore, after the analysis of Tables4–6, the performance of the deep reinforcement learning algorithm based on the extraction of public service infrastructure. The specific results are given in Tables 4–6.Table 4
Comparison of experimental results.
AlgorithmDataset 1Dataset 2Ave_RMSEAve_MAEAve_RMSEAve_MAESCR0.39920.22880.27760.1115DDPG + RLSTM0.45800.26160.52220.4085DDPG + LETM0.58920.46590.55680.4439DDPG +T_self_attention0.57620.40250.44860.2826DDPG + self_attention0.59650.442590.53560.3636DDPG + RLSTM + self_attention0.40250.24190.85520.1818DDPG + LSTM +T_self_attention0.40360.23580.66580.2860DDPG + LSTM + self_attention0.44780.28860.68290.3259KNNBasic0.92280.74760.66580.4201KNNWithMeans0.93200.73860.98860.7325KNNBasicline0.89580.70660.93350.7136SVD0.88300.68560.92580.7022SVD++0.86220.9728092250.7268NMF0.92160.73520.96800.7698Table 5
Boost values of SCR and module combination algorithm on Ave_RMSE.
KNNBasicKNNWithMeansKNNBasiclineSVDSVD++NMFD1SCR0.52250.52880.49580.48730.45620.5216DDPG + RLSTM0.48480.48200.45620.75920.42120.4879DDPG + LETM0.32580.33520.35680.22520.32100.3215DDPG + T_self-attention0.34650.35250.23650.65820.32420.4521DDPG + self-attention0.32880.33550.15980.78300.28260.4663DDPG + RLSTM + self-attention0.52200.52680.22560.12590.27890.3221DDPG + LSTM +T_self-attention0.51220.52550.35580.25250.23450.5124DDPG + LSTM + self-attention0.46800.48200.70350.32510.23250.5110D2SCR0.75350.70780.65240.32560.24510.3654DDPG + RLSTM0.45680.42580.41250.25640.32140.3219DDPG + LETM0.42560.38650.32540.68710.40040.2598DDPG + T_self-attention0.53250.52260.46870.32520.65870.3987DDPG + self-attention0.44520.42260.10360.25200.23350.4210DDPG + RLSTM + self-attention0.15690.12980.72550.32100.56320.2113DDPG + LSTM +T_self-attention0.32500.28260.36520.10200.12350.1558DDPG + LSTM + self-attention0.30550.26780.55290.23250.25580.2864Table 6
Lift values of SCR and module combination algorithm on Ave_MAE.
KNNBasicKNNWithMeansKNNBasiclineSVDSVD++NMFD1SCR0.48860.80980.47760.45680.44320.4862DDPG + RLSTM0.46500.48860.44460.42500.41120.4620DDPG + LETM0.25250.26920.24560.22680.20320.2556DDPG +T_self-attention0.32560.33650.30050.28260.26880.3228DDPG + self-attention0.30010.32250.26870.26420.25450.2788DDPG + RLSTM + self-attention0.48650.50650.48560.46520.24590.4825DDPG + LSTM +T_self-attention0.49350.52250.48260.45150.43400.4896DDPG + LSTM + self-attention0.43580.44880.42680.45250.43680.4456D2SCR0.66120.63250.62580.38980.39580.6548DDPG + RLSTM0.36320.33420.34450.63520.60980.3588DDPG + LETM0.33300.30950.30260.32800.31120.3128DDPG +T_self-attention0.52200.48820.46820.30020.20010.4858DDPG + self-attention0.4880.39520.38460.29660.19870.3987DDPG + RLSTM + self-attention0.0044−0.0196−0.0352−0.0320−0.4680−0.0106DDPG + LSTM +T_self-attention0.20900.18490.15680.18220.15620.1952DDPG + LSTM + self-attention0.18260.16580.14230.15520.12830.1658


### 4.1.2. Analysis of Algorithm Convergence

This part of the experiment mainly collects the Reward value Reward that the intelligent body can obtain after each prediction recommendation score when the algorithm is tested, as well as the RMSE and MAE values that can be obtained for each round of prediction, and analyzes the convergence of the algorithm by observing the trend of the values of these evaluation indexes. Also, in order to evaluate the convergence of the algorithm as a whole, this paper analyzes the algorithm by observing the trend of the average return Ave_Reward in each round. Figure3 shows the trend graph of the Ave_Reward values of the DDPG-LA algorithm and the combined algorithm of each module with increasing number of training sessions on both data sets.Figure 3
Ave_Reward trend graph.
(a)(b)From Figure3, it can be seen that the overall results of all algorithms tested on the dataset are better.


### 4.1.3. Comparative Analysis of Discount Factorγ

In the experimental process to get the best experimental results, this paper tries various different discount factor values and visualizes the effect of each discount factor through the final results. And by comparing the height of the curves, it is found that the height of the curve changes with the value ofγ from small to large, and the trend of this correlation is shown in Figure 4.Figure 4
Trend of total_ave_reward value for different values ofγ.
(a)(b)The Total_Ave_Reward value represents the average of the average Reward for each round of testing at differentγ values, i.e.,(8)1n∑i=1nAve_Rewardi,where n denotes the number of test rounds. Figure 4 shows that different discount factors have an effect on the final convergence of the algorithm and are positively correlated.


## 4.1.1. Overall Performance Comparison

Therefore, after the analysis of Tables4–6, the performance of the deep reinforcement learning algorithm based on the extraction of public service infrastructure. The specific results are given in Tables 4–6.Table 4
Comparison of experimental results.
AlgorithmDataset 1Dataset 2Ave_RMSEAve_MAEAve_RMSEAve_MAESCR0.39920.22880.27760.1115DDPG + RLSTM0.45800.26160.52220.4085DDPG + LETM0.58920.46590.55680.4439DDPG +T_self_attention0.57620.40250.44860.2826DDPG + self_attention0.59650.442590.53560.3636DDPG + RLSTM + self_attention0.40250.24190.85520.1818DDPG + LSTM +T_self_attention0.40360.23580.66580.2860DDPG + LSTM + self_attention0.44780.28860.68290.3259KNNBasic0.92280.74760.66580.4201KNNWithMeans0.93200.73860.98860.7325KNNBasicline0.89580.70660.93350.7136SVD0.88300.68560.92580.7022SVD++0.86220.9728092250.7268NMF0.92160.73520.96800.7698Table 5
Boost values of SCR and module combination algorithm on Ave_RMSE.
KNNBasicKNNWithMeansKNNBasiclineSVDSVD++NMFD1SCR0.52250.52880.49580.48730.45620.5216DDPG + RLSTM0.48480.48200.45620.75920.42120.4879DDPG + LETM0.32580.33520.35680.22520.32100.3215DDPG + T_self-attention0.34650.35250.23650.65820.32420.4521DDPG + self-attention0.32880.33550.15980.78300.28260.4663DDPG + RLSTM + self-attention0.52200.52680.22560.12590.27890.3221DDPG + LSTM +T_self-attention0.51220.52550.35580.25250.23450.5124DDPG + LSTM + self-attention0.46800.48200.70350.32510.23250.5110D2SCR0.75350.70780.65240.32560.24510.3654DDPG + RLSTM0.45680.42580.41250.25640.32140.3219DDPG + LETM0.42560.38650.32540.68710.40040.2598DDPG + T_self-attention0.53250.52260.46870.32520.65870.3987DDPG + self-attention0.44520.42260.10360.25200.23350.4210DDPG + RLSTM + self-attention0.15690.12980.72550.32100.56320.2113DDPG + LSTM +T_self-attention0.32500.28260.36520.10200.12350.1558DDPG + LSTM + self-attention0.30550.26780.55290.23250.25580.2864Table 6
Lift values of SCR and module combination algorithm on Ave_MAE.
KNNBasicKNNWithMeansKNNBasiclineSVDSVD++NMFD1SCR0.48860.80980.47760.45680.44320.4862DDPG + RLSTM0.46500.48860.44460.42500.41120.4620DDPG + LETM0.25250.26920.24560.22680.20320.2556DDPG +T_self-attention0.32560.33650.30050.28260.26880.3228DDPG + self-attention0.30010.32250.26870.26420.25450.2788DDPG + RLSTM + self-attention0.48650.50650.48560.46520.24590.4825DDPG + LSTM +T_self-attention0.49350.52250.48260.45150.43400.4896DDPG + LSTM + self-attention0.43580.44880.42680.45250.43680.4456D2SCR0.66120.63250.62580.38980.39580.6548DDPG + RLSTM0.36320.33420.34450.63520.60980.3588DDPG + LETM0.33300.30950.30260.32800.31120.3128DDPG +T_self-attention0.52200.48820.46820.30020.20010.4858DDPG + self-attention0.4880.39520.38460.29660.19870.3987DDPG + RLSTM + self-attention0.0044−0.0196−0.0352−0.0320−0.4680−0.0106DDPG + LSTM +T_self-attention0.20900.18490.15680.18220.15620.1952DDPG + LSTM + self-attention0.18260.16580.14230.15520.12830.1658


## 4.1.2. Analysis of Algorithm Convergence

This part of the experiment mainly collects the Reward value Reward that the intelligent body can obtain after each prediction recommendation score when the algorithm is tested, as well as the RMSE and MAE values that can be obtained for each round of prediction, and analyzes the convergence of the algorithm by observing the trend of the values of these evaluation indexes. Also, in order to evaluate the convergence of the algorithm as a whole, this paper analyzes the algorithm by observing the trend of the average return Ave_Reward in each round. Figure3 shows the trend graph of the Ave_Reward values of the DDPG-LA algorithm and the combined algorithm of each module with increasing number of training sessions on both data sets.Figure 3
Ave_Reward trend graph.
(a)(b)From Figure3, it can be seen that the overall results of all algorithms tested on the dataset are better.


## 4.1.3. Comparative Analysis of Discount Factorγ

In the experimental process to get the best experimental results, this paper tries various different discount factor values and visualizes the effect of each discount factor through the final results. And by comparing the height of the curves, it is found that the height of the curve changes with the value ofγ from small to large, and the trend of this correlation is shown in Figure 4.Figure 4
Trend of total_ave_reward value for different values ofγ.
(a)(b)The Total_Ave_Reward value represents the average of the average Reward for each round of testing at differentγ values, i.e.,(8)1n∑i=1nAve_Rewardi,where n denotes the number of test rounds. Figure 4 shows that different discount factors have an effect on the final convergence of the algorithm and are positively correlated.


## 5. Conclusion

The needs of social development, the support of national policies, and the support of information technology have created a very favorable environment for the development of smart cities and become a strong impetus for the smooth development of smart cities. In practice, construction planners tend to pay too much attention to the input of technology and its effect to meet expectations, while ignoring the inner needs of thousands of city dwellers, that is, ignoring the essence of “service.” Before making a decision, a comprehensive and large-scale survey should be conducted to identify the needs of the residents, and on this basis, a plan should be designed to make the city a livable place that is recognized by the people through artificial intelligence-based methods, rather than operating according to the criteria that the decision makers have in mind. The concept of smart cities continues to rise in popularity, with more and more voices participating in the discussion, and it is normal for misconceptions and deviations to occur, but as decision makers and builders, it is important to clearly understand where the original intention of developing smart cities lies, to think about its essence and connotation in an environment where the heat remains high, and to make decisions that are truly relevant.



---

*Source: 8958865-2022-08-30.xml*