MULTI-SCALE DYNAMIC PARTITIONING SYSTEM OF URBAN SPATIAL UNITS

: As the spatial structure of cities becomes increasingly complex and sustainable development goals are promoted, society places higher demands on the management and planning of cities. As the basic unit of urban analysis, the combination pattern and scale shape of urban spatial units are crucial for rational management and planning of cities. However, existing urban analysis management systems often adopt a prefabricated fixed cell division method, which is difficult to meet the needs of high precision and multi-scale analysis of urban information. Therefore, this paper proposes an interactive dynamic partitioning technology, and designs a multi-scale dynamic partitioning system for urban spatial units (SUPS), in order to meet the diverse needs of urban management and planning. The system consists of a data management module, a spatial unit module, an integration module and a visualization module. The system not only realises the multi-scale dynamic partitioning of spatial units in the form of interactive operation, but also obtains more detailed identification results by applying the multi-scale spatial units to the identification of urban functional areas, verifying the effectiveness and feasibility of the interactive multi-scale dynamic partitioning of spatial units, and providing a new technical support for fine urban management.


INTRODUCTION
As urbanization accelerates and urban areas expand, the spatial structure of urban areas has become increasingly complex (Zhao et al., 2021).Meanwhile, with the development of human society and the continuous promotion of sustainable development goals, various types of living areas emerge in cities to achieve more scientific urban management and planning.In this context, the combination pattern and scale shape of urban spatial units, as one of the basic management units of cities, have an important impact on the functional planning, population flow and environmental pollution of cities (Dong et al., 2020), especially when it comes to specific urban analysis applications, high-quality basic data can effectively improve the accuracy of the analysis results (Fu et al., 2017).For example, tourists can plan their itineraries carefully according to their behavioural intentions and the distribution of scenic spots, thereby reducing time spent in transit; urban managers can implement reasonable policies based on different scales of urban functional regions (UFRs) and land-use types to improve the efficiency of urban management and decision-making.Therefore, acquiring appropriate scale spatial units is a critical step in improving the urbanization process, which is expected to bring new opportunities and challenges for refined urban management.
In response to and to promote the development of informatization and digitalization in urban management, a smart system for urban analysis has emerged.Such systems aim to use modern information communication technology and data collection methods to manage and serve cities, improve urban operational efficiency, and enhance residents' quality of life (De Lotto, 2022).WebGIS, as an important component of the smart city system, provides a visual and interactive geographic information service platform for city managers and the public.Specifically, WebGIS * Corresponding author, Changfeng Jing jingcf@cugb.edu.cnintegrates and encapsulates complex calculations in a B/S (browser/server) format, eliminating the need for users to perform specialized operations and greatly reducing the user's threshold for use (Lu, 2006).Thus, it is widely used in various fields such as disaster monitoring (Simeoni et al., 2013), information service management (Zhang et al., 2018), and urban security assessment (Chen et al., 2021b;Coletti et al., 2020), among others.Therefore, WebGIS plays a crucial role in enabling intelligent systems to offer comprehensive information management and services to cities from diverse perspectives.Additionally, Horváth (Horváth, 2021) pointed out the significant relationship between smart systems and intelligent design, in which the development of smart systems requires a reliable foundation of intelligent design to provide effective cognitive support.The urban spatial unit serves as the basic analytical unit for most urban analysis systems and has a crucial impact on intelligent design.Therefore, the urban spatial unit plays an indispensable role in smart systems for urban analysis.
Currently, the prefabricated fixed-cell partitioning technique in urban multidimensional data management and analysis systems is unable to meet the high-precision and multi-granularity requirements for urban structure spatiotemporal analysis and mining.To address this issue, we propose an interactive dynamic segmentation technique, especially for high-precision adaptive partitioning in mixed urban areas, using an interactive unit grid partitioning method.To achieve this goal, we introduce a spatial unit hierarchical partitioning method, fully considering the interaction and visualization in the partitioning process, and design a multi-scale dynamic partitioning system of urban spatial units (abbreviated as SUPS).The system aims to achieve automated and customized partitioning of urban spatial units to meet the diverse needs of urban management and planning.The specific contributions of this paper are as follows: (1) A detailed analysis of the demand for spatial unit hierarchical partitioning in the system, and combining map services and database design to develop an interactive spatial unit custom partitioning method, greatly improving the efficiency of obtaining spatial units when applied to urban functional service modules.
(2) The system integrates various methods for identifying UFRs applied to generated urban spatial units, verifying the practicality of the spatial unit dynamic partitioning method and providing valuable reference for the development of urban intelligent systems.

Urban Spatial Unit Partitioning
Urban spatial units refer to the division of urban space into different units for analysis, evaluation, and decision-making in urban planning and management (Suligowski et al., 2021).Existing research indicates that the methods for obtaining urban spatial units mostly include four types: fixed-grid setting, remote sensing image segmentation, building footprint division, and traffic analysis zone division (Dong et al., 2020).Specifically, fixed-grid setting refers to the division of a fixed size spatial grid according to experience or the scope of the study area, such as a 1 km square grid based on research requirements (Liu et al., 2012).Although this method is simple and has easily interpretable characteristics, it is also single and limited in scope.Therefore, Jing et al. (Jing et al., 2022a) improved this method by using information entropy to achieve multi-level division and functional area recognition under multiple scales in the same area.Remote sensing image segmentation refers to the use of image segmentation algorithms to divide remote sensing images, such as using Latent Dirichlet allocation(LDA) models to classify high-resolution remote sensing images and obtain urban land use information (Liu et al., 2017).Although remote sensing images are often used as spatial units in pixels, object units, and scenes, their interpretation ability is limited for complex urban areas, but they can provide detailed object information for researchers to analyse.The building footprint division method is based on the size and shape of buildings to divide urban areas, such as Zhang et al. (Zhang et al., 2023) using this method to accurately determine the function of buildings and apply and verify it in social detection.Another approach involves the use of traffic analysis zones (TAZs) to delineate spatial units, which specifically refer to areas enclosed by buildings or plots of land (Dong et al., 2020).For instance, studies that integrate urban road networks and taxi OD trajectory data for functional urban area identification (Jing et al., 2022b) and those that combine freight traffic networks with spatial clustering to improve freight traffic analysis zones (FTAZs) (Chandra et al., 2021) share similarities with building footprint delineation methods.These approaches contribute valuable urban building information for urban-related investigations and are widely employed in current research.Therefore, it becomes apparent that employing appropriate methods for spatial unit delineation allows for a more precise depiction of cities' physical characteristics, socio-economic attributes, and environmental quality.
However, these methods primarily focus on academic research, which poses challenges in the practical implementation of urban spatial units.Firstly, there is a need to adapt simple spatial units to meet the requirements of real-world applications and determine appropriate scales for analysis.Additionally, the hierarchical division method of spatial units has not been extensively utilized.Secondly, the automatic generation of spatial units relies on a significant amount of remote sensing images and training samples, overlooking the concerns of storage space and computational resources required in practical scenarios.

Application of Spatial Units in Urban Analysis Systems
An urban analytics smart system is a comprehensive system that utilizes information technology and the Internet of Things (IoT) to manage and provide services to cities. Today, it is constantly being endowed with the "smart" capability.Initially, the term "smart" was only used to name physical products and electronic devices, such as smart watches and smartphones, to inform users that these products have greater autonomy and stronger analytical capabilities.With the rapid expansion of cities over the past decade, urban smart systems have become increasingly important.Additionally, the concept of smart has brought about significant changes in urban-related research in areas such as the Internet of Things, manufacturing, energy, mobility, and transportation (Jia et al., 2022).However, in some systems used for urban analysis, the focus is usually only on highlighting the system's functional advantages, resulting in the neglect of the more critical foundational element in multi-dimensional data management and analysis systems for cities, namely, the urban spatial unit.
For urban management and analysis systems, having a suitable spatial unit is essential, as this will largely determine whether the results fed back to us by the analysis system are accurate.For example, Zhou et al. (Zhou et al., 2018)divided the research area into several regular hexagonal regions based on human behaviour and taxi travel patterns and developed a taxi visualization analysis system to quickly capture the moving patterns inside the city's functions, achieving effective division of the city's functional zones.However, this system uses uniform hexagonal regions, which, although less biased towards edge effects (Wang and Kwan, 2018;Liu et al., 2021), cannot meet the analysis and research needs at different scales and ignore spatial heterogeneity between research areas.Guo et al. (Guo et al., 2022)divided the research area into regions based on the size and shape of the buildings at a small scale and developed a smart campus power visualization system to manage and predict campus power consumption.Although this system meets the requirements for multi-scale analysis, it requires manual pre-division or acquisition of relevant vector data, which is not very friendly to systems that need to study other areas.Unlike smart transportation systems (Chen et al., 2021a), sensor management systems (Jing et al., 2019), etc., these systems can achieve realtime management and monitoring of cities without humancomputer interaction, relying solely on road vector data and GPS location data, while also providing users with a more comfortable usage environment and experience.Obviously, a system that can obtain appropriate scale research areas in real-time is truly a smart system, not just reflected in the system's functionality.
It is evident that existing urban analysis systems mostly use spatial units with a single scale and shape when analysing target areas.However, this is insufficient for a system that needs to comprehensively analyse the complex spatial structure of cities and effectively manage them.Therefore, how to quickly obtain spatial units with higher interpretability and more analysis scales in the system to develop urban functional services is still a problem that needs to be solved.

OVERALL SYSTEM DESIGN
The SUPS is a professional system based on point of interest data for analysis.Its aim is to achieve interactive dynamic partitioning of urban spatial units by combining WebGIS core technology and theoretical methods of spatial unit partitioning, in order to meet diverse urban service function requirements and provide a technical platform for the digital development of urban information integration.

Requirement Analysis of System Functionality
In this paper, we divide the process and application of urban spatial unit partitioning into three steps: raw data acquisition and pre-processing, spatial unit partitioning, and integration of urban analysis functions, where the integrated analysis function is urban functional area identification, as shown in Figure 1, which graphically demonstrates the overall process of system functions, and also analyses and describes the requirements for system implementation for system development.Based on this, we elaborated the core requirements for the development from the system's perspective: (1) Firstly, the system needs to provide easy access to data and hide the pre-processing process.Users can upload their own data or select from the system's existing data including map data, vector data and point-of-interest data.
(2) Secondly, the system should support interactive multi-scale access to spatial units.Based on the need for information entropy calculation and mixed degree selection in the spatial unit hierarchical partitioning method, the system should be able to automatically calculate the information entropy and visualise the mixed degree.At the same time, for the needs of iterative partitioning and hierarchical spatial unit acquisition, the system needs to provide the function of freely selecting the degree of mixing to partition the spatial unit scale.
(3) Finally, the system should be able to visually display the application of urban spatial units in the integration module.Considering that the integrated function of the system is urban functional area identification, the system needs to encapsulate the complex data processing and calculation process, and provide the user with a selection window for the original data and the input of parameters required in the identification process, so as to realise the identification of urban functional areas at any scale.In addition, the system needs to compare the results of the identification to provide a more valuable reference for the user.

System Architecture
Based on the requirements analysis of system functionality and the technical principles of system development, a four-layer architecture was designed using the mainstream architecture and development model of front-end and back-end separation, as shown in Figure 2. The four layers are the presentation layer, application layer, service layer, and data layer.The interactive layer of the system acts as a public interface for the user to access the system and is responsible for handling the user input requests and the system output responses.In fact, the user sends requests and transmits data to the server via a web browser using the HTTP protocol.In this layer, we show the user the functions and optional parameters that the system can implement, such as the ability to click on the view button to see detailed information about the spatial data and to enter the parameters required to customise the division of the hierarchical spatial units, but no specific functions are implemented, only the Requests are forwarded.
The application layer handles the business logic and is responsible for receiving, processing and forwarding requests.In this layer, the services provided by the server are invoked through the use of AJAX technology and encapsulated into the required functions according to the design of the system functions, returning to the user the data and types required for the corresponding functions, such as uploading, publishing and downloading in data management, space unit division, functional area identification, etc., which are finally returned to the interaction layer in the form of JSON.
The service layer is the core of the whole system and is mainly responsible for realising the business logic of the system.In this system, we use Spring Boot as the development framework, run python programs through java calls to system functions to realise the calculation and analysis of complex processes, and implement custom operations in chunks according to the intermediate processes of division and identification, while using Tomcat and GeoServer as server-side applications to encapsulate the data management services and identification services, and Services are provided to the upper layers.
The data layer is the data storage and management centre for the entire system and is responsible for managing and maintaining the system's data.In the data layer, JDBC and ORM technologies are used to connect the data layer to the service layer.PostgreSQL is used to add, delete, change and store spatial data, while its extension PostGIS is used to perform spatial operations.

Function Modules
To better develop the system and achieve the multi-scale dynamic partitioning of urban spatial units, this paper, combined with the system's overall design in Section 3, divides the system into four specific functional modules: the data management module, spatial unit module, integration module, and visualization module.Through the collaborative action of these four modules, the entire system's functionality is achieved, as shown in Figure 3.
The data management module, as the basic module of the system, not only needs to provide basic data information to other modules, but also needs to provide functions such as querying and publishing of spatial data, so as to realize custom spatial unit division and generation in the spatial unit module, and further apply to urban analysis in the integration module, and the services provided by the data management module, spatial unit module and integration module together constitute the Web Server of the whole system.Then, through the GIS Server, the spatial data published by each module in the form of WMS and WFS is passed to the visualization module, making the results generated by each module more intuitive and easier to analyse.

Data Management Module
The Data Management module provides functions for uploading, publishing, deleting, querying and displaying data for the purpose of data management and maintenance.The upload and publish functions allow users to upload their data into the system and publish it directly as an online service for easy recall and display by other modules, which can be done by clicking the "Upload" button in the system, as shown in Figure 4(1).The Delete function allows the deletion of uploaded data and also supports the deletion of published map services.Specifically, users can select the target data in the system and then click on "Batch Deletion" to achieve batch deletion, or click on "Delete" to achieve the deletion of individual data, as shown in Figure 4(2) and ( 3).The query function allows users to find and display data in the system based on keywords (as shown in Figure 4(4)), while the display function can display meta information of all data or detailed information of individual data, either in the form of a table or a list, or by clicking on the name of the target data (i.e. Figure 4(6)) for more detailed information.The download function supports access to data that exists in the system or is generated by other modules, which can be achieved by clicking on the "Download" button in Figure 4(3).

Space Unit Module
The spatial unit module mainly includes the functions of mixing degree calculation and grid division.The mixing degree calculation is actually based on the input partitioning times or the scale of the spatial grid to calculate the information entropy within the spatial unit, allowing users to choose the desired mixing degree threshold based on the distribution of information entropy.The grid division uses the mixing degree threshold to iteratively divide the spatial unit until the requirements are met, and publishes it as a map service.The specific interactive operation process is shown in Figure 5.

Integration Module
The integration module aims to integrate algorithms and methods used in urban management analysis into the system, and apply the multi-scale urban spatial units obtained from the system to relevant urban management analysis methods.Here, we integrated methods for urban functional zone identification, including density-based method (Density), kernel density indexbased method (KDI), and topic model-based method (LDA).
The Density method refers to calculating the proportion of each POI category within a given spatial unit, as shown in equation ( 1).
The KDI method uses a kernel function, 푓 (푥, 푦), as described in equation ( 2), to calculate the density contribution of each grid centroid for each square point within a given radius, which can effectively identify different functional areas within spatial data, as shown in equation ( 3).The LDA method uses the K-means clustering method to cluster similar vectors obtained from topic model into several categories and then identifies functional types within classified areas, as shown in equations ( 4) and ( 5).
Where 퐹 represents frequency density and 퐶 represents category proportion.푖 represents the category of POI, 푊 represents the weight of the ith category of POI, mi represents the number of the ith category of POI in the clustering area, and 푀 represents the total number of i-th category of POI.When the 퐶 value is large, the POI category with the largest 퐶 value is considered as the function of the region.Otherwise, it is a mixed function, and the type of functional area is determined by the specific 퐶 value size.

Visualization Module
The visualization module includes functions such as layer rendering and chart drawing.Layer rendering is used to render the data generated by the integrated module so that users can intuitively understand the results of functional area identification, as shown in Figures 6 and 7. Chart drawing can more intuitively and specifically display the interaction process and analysis results of various modules.For example, in functional area identification, the proportion of different types of functional areas is vividly displayed in the form of a pie chart.

Data Description
This article uses Beijing's POI data as an example to verify the feasibility of the spatial unit multi-scale dynamic generation system.We obtained POI data from the year 2018 by calling the API provided by Amap (http://lbs.amap.com/),with a total of more than 100,000 points.This dataset contains rich spatial and semantic information.To better support subsequent experiments and development, we classified the POI data into six categories: the first category includes residential areas and residential quarters, the second category includes public services such as entertainment, government, scientific research, and education, the third category includes commercial and financial catering such as large shopping malls, shopping, and financial services, the fourth category includes companies and enterprises, the fifth category includes scenic spots, and the sixth category includes transportation facilities.In addition, we also weighted each POI type according to public awareness, with weights of 30, 50, 15, 40, 90, and 100, respectively.

Partitioning of Spatial Units
Partitioning urban spatial units is done to enable more reasonable management and analysis of the city at a more appropriate scale.Therefore, we used the 1-kilometre grid unit of Beijing as the starting unit for partitioning.The number of partitions is entered at (1) to obtain the distribution statistics chart of mixing ratios.Then, we select the most concentrated mixing ratio interval of 1.3~1.4(enter 1.35 at (2)), to obtain the spatial unit grid on the left, as shown in Figure 8.

LDA-based Method for Identifying UFRs
In this paper, we choose to apply the multi-scale spatial unit identification of UFRs as an example of the LDA identification method, the principle of which can be found in section 4.4.The urban spatial units before and after partitioning are selected as input data in the selection box, as in Figure 9(a)(1) and Figure 9(b)(1) respectively, and the appropriate number of themes is selected and input to (2) according to the known range 2~12 (the maximum number of POI categories), and the appropriate clustering range (3~15) is filled in at (3) to calculate the contour coefficients, which are used to obtain the optimal number of clusters.As can be seen from the histograms in Figure 9(a) and (b), the best clustering coefficients for the original spatial unit and the hierarchical spatial unit are 6 and 8 respectively.The results show that the use of multi-scale spatial units is a good way of identifying the spatial units.The results show that the UFRs identified using multi-scale spatial units are more refined.

DISCUSSION
By integrating the UFRs identification function into the system, the feasibility and effectiveness of a multi-scale dynamic urban spatial unit delineation system is effectively demonstrated, further addressing the shortcomings of existing urban multidimensional data management and analysis systems: (1) Firstly, compared to urban analysis systems using fixed spatial units, the SUPS designed and developed in this paper not only supports the dynamic adjustment of core parameters, but also achieves the division and generation of multi-scale spatial units in real time in an interactive manner, meeting the need for high-precision and multi-scale analysis of urban information.
The system is based on the hierarchical spatial unit division method and chooses to present the intermediate process of hierarchical spatial unit division visually in the form of a stretchable histogram, allowing users to choose their own parameters for the division rather than giving the results directly after the division, meeting the analytical needs of different studies in practical applications and allowing the analysis and management of the city to be carried out at a more appropriate scale.Also, the results of the integration module show that the UFRs identified on the hierarchical spatial units are more refined compared to those identified on the original spatial units.
(2) Secondly, the system ensures fast response of each functional module while performing complex calculations.The system combines vector data processing tools such as GDAL and Arcpy to complete data pre-processing and multi-scale dynamic partitioning of spatial units in a short period of time, and in addition, the system integrates the open source tool Geo Server to publish vector data into map services that can be called directly and stored in the database as URLs, effectively improving the efficiency of data management module, spatial unit module and integration The system also integrates the open source tool Geo Server to publish vector data into a map service that can be called directly and stored as a URL in the database, effectively improving the efficiency of layer acquisition for the data management module, the spatial unit module and the integration module, and accelerating the efficiency of layer rendering and chart creation for the visualization module.
However, there is still room for improvement in the interactive guidance of the system for specific operations.Although the system provides a dynamic partitioning of spatial units that can be interactively manipulated, the user is only provided with operational hints in the form of text and diagrams, in which case the user may not be able to intuitively understand how to use the system's functions, and thus the results obtained do not meet the needs of the user.

CONCLUSION
This article proposes a dynamic multi-scale urban spatial unit partitioning system (SUPS) to address the limitations of existing urban multidimensional data management and analysis systems in meeting the requirements of high-precision and multigranularity spatiotemporal analysis and mining.The system provides users with the ability to customize the partitioning process according to the complexity of urban areas and integrates various urban analysis methods, such as the LDA method for identifying UFRs.The results show that the methods used in the system can analyse urban areas at multiple scales and facilitate decision-makers in making more accurate decisions.
Although this article only uses administrative district data and point of interest data from Beijing for experiments, the complex urban structure and rich point of interest data in Beijing have great representativeness and research value.In the future, the system will integrate more urban analysis methods and incorporate other similar data to further explore the practical value of multi-scale urban spatial units in other studies.For example, these results can be used to identify hotspots and population distribution in urban areas, monitor and analyse natural resources in cities, among others.Additionally, these results can support urban planning and land use decision-making by better understanding the spatial structure and development trends of cities and formulating more scientifically effective urban planning and management strategies.

Figure 5 .
Figure 5. Front-end and back-end interaction process of spatial unit partition.

Figure 6 .
Figure 6.Rendering of functional area layers.

Figure 9
Figure 9(a).LDA identification of original spatial units.