Method for processing and configuring public service facilities data of urban and rural community life circle
By constructing a professional knowledge base through grid partitioning and graph retrieval to enhance the generation mechanism, and combining intelligent agent collaborative simulation and multi-dimensional hierarchical sampling, the technical bottleneck in the configuration of public service facilities in urban and rural community living circles has been solved, realizing optimized planning with full coverage, quantifiable consensus, and feasible implementation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TONGJI UNIV
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies for configuring public service facilities in urban and rural community living circles suffer from limitations in spatial modeling and sampling mechanisms, insufficient participant construction and sample representativeness, difficulties in applying professional knowledge and integrating unstructured knowledge, and a lack of decision-making convergence mechanisms and consensus quantification methods, resulting in insufficient planning scientificity, fairness, and effectiveness of public participation.
A professional knowledge base is constructed by adopting grid partitioning and graph retrieval enhancement generation mechanism to generate a list of residents' needs and resources. Through collaborative simulation between planner agents and resident agents, multi-dimensional hierarchical sampling is carried out in combination with mobile phone signaling and population census data to achieve multi-stage negotiation and consensus assessment, and output an optimized list of needs and action blueprint.
It has achieved continuous spatial coverage across the entire region, reproducibility and quantifiable consensus of data and decision-making, improved the scientific nature of planning and the feasibility of public participation, and ensured the implementation and traceability of results.
Smart Images

Figure CN121936680B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of urban and rural planning and urban and rural simulation technology, specifically relating to a method for data processing and configuration optimization of public service facilities in urban and rural community living circles. Background Technology
[0002] The "15-minute community living circle," as a crucial scenario for the allocation of urban and rural public service facilities, focuses on optimizing facility layout based on residents' walking accessibility to achieve full coverage of basic living services. With the advancement of digital transformation in urban and rural areas, community planning is gradually shifting from reliance on manual experience to a technical approach combining data-driven methods and simulation models. Current conventional practices typically involve static assessments using multi-source urban and rural data or simulating simple travel behaviors through single-type intelligent agent models. However, research has revealed that existing methods and simulation technologies for allocating community spatial resources within living circles still face significant technical bottlenecks when addressing the demands for full coverage and refined management, specifically in the following aspects:
[0003] (1) Limitations of spatial modeling and sampling mechanisms:
[0004] Traditional participatory planning typically uses administrative boundaries as static discussion units. However, significant spatial divisions exist between these administrative units, leading to public service facilities at the periphery exhibiting cross-unit sharing characteristics in actual use. Meanwhile, surrounding residents are excluded from the discussion due to administrative boundary restrictions, resulting in significant omissions of peripheral information. Furthermore, fixed unit divisions cannot guarantee continuous coverage of the entire service radius, leaving service blind spots unaccounted for in the assessment, thus affecting the scientific rigor and fairness of the planning.
[0005] (2) Shortcomings in participant construction and sample representativeness:
[0006] Virtual populations generated by traditional questionnaires or single data sources struggle to replicate the complex "work-residence-age-gender" structure of real communities. Existing methods often suffer from sample bias, leading to distorted representation of needs among different groups (especially marginalized groups), and lack in-depth modeling of residents' individual psychological and cognitive characteristics, resulting in simulation interactions that fail to accurately represent residents' actual needs. Furthermore, traditional urban and rural participatory planning is limited by offline organizational forms, resulting in limited sample sizes and significant structural biases, easily overlooking the opinions of disadvantaged groups. Moreover, organizing multiple rounds of feedback is costly, difficult to cover a wide range, and lacks quantitative indicators to assess the quality of discussions, making it impossible to determine the degree of consensus formation from a data perspective.
[0007] (3) Difficulties in integrating professional knowledge application with unstructured knowledge:
[0008] Existing digital tools struggle to effectively handle the vast amounts of unstructured text in the planning field, such as standards, regulations, and historical survey reports. A semantic gap exists between planning expertise and knowledge of local communities, causing simulation decisions to often deviate from technical specifications and lack professional logical support. Specifically, traditional planning status assessments have the following technical limitations in handling unstructured knowledge: First, a large amount of tacit knowledge, such as survey records and interview texts, is difficult to extract in a structured manner, resulting in low knowledge utilization; second, there is a lack of unified semantic standards among multiple data sources, making manual integration time-consuming and prone to information omissions; finally, professional planning knowledge relies on human experience, has poor reusability, and lacks automated analysis capabilities.
[0009] (4) Lack of decision-making convergence mechanisms and consensus quantification methods:
[0010] Existing public participation simulations largely rely on simple voting statistics or speech summaries (Su Siwei and Huang Yiru. "Exploring the Implementation Path of 'Participatory' Planning and Design of Rural Community Life Circles—Taking Maoxin Village in Songjiang District, Shanghai as an Example." Residential Technology 44, No. 5 (2024): 58~64. https: / / doi.org / 10.13626 / j.cnki.hs.2024.05.009.), lacking quantitative analysis methods for comparing multiple rounds of schemes, differentiating group opinions, and emotional tendencies. This makes it difficult to form traceable and quantifiable consensus indicators in complex interest games. The traditional method of relying solely on simple voting statistics leads to the problem of "difficulty in measuring consensus," lacking threshold judgments and iterative control for the quality and convergence of negotiations. Furthermore, negotiation results often remain merely at the level of vision expression, lacking engineering implementation clues and failing to form spatial placement and action plans that can be directly used for subsequent scheme deepening.
[0011] In summary, the existing technology system has many shortcomings in terms of the adaptability of spatial units, the representativeness of intelligent agent samples, the ability to integrate unstructured knowledge, and the consensus quantification mechanism. There is an urgent need for a new technical method that can systematically integrate planning expertise, achieve continuous spatial coverage across the entire region, and accurately map the differentiated needs of residents. Summary of the Invention
[0012] This invention is made to solve the above-mentioned problems, and aims to provide a method for data processing and configuration optimization of public service facilities in urban and rural community living circles.
[0013] This invention provides a method for data processing and configuration optimization of public service facilities in urban and rural community living circles, characterized by the following steps: S10, loading the boundaries of the city and its planning area, points of interest for public service facilities, and vector data of available spatial resources; S20, after dividing the city into grids, selecting the core area grid matrix and its buffer area grid matrix of the planning area from the divided grid units based on the boundaries; S30, based on unstructured text data from the planning department, constructing a professional knowledge base that supports filtering and searching by street identifier and provides evidence tracing information using a graph retrieval enhancement generation mechanism; S40, constructing a planner intelligent agent cluster based on the professional knowledge base, points of interest for public service facilities, and vector data of available spatial resources, and generating... The resident demand list, available resource list, and facility coverage list are integrated to form a baseline for current status assessment; S50, a convolutional moving window is used to traverse the core area grid matrix, generating several negotiation units that completely cover the core area grid matrix, consisting of the central grid and its neighboring grids and overlapping each other; S60, based on mobile phone signaling and census data, virtual resident samples are obtained by stratified sampling according to a multi-dimensional population stratification system within each negotiation unit, and personalized profiles are generated using a natural language generation model, forming a heterogeneous resident intelligent agent cluster; S70, within each negotiation unit, based on the baseline, the planner intelligent agent cluster and the resident intelligent agent cluster are driven to conduct multi-stage collaborative simulation and consensus assessment, outputting an optimized demand list and action blueprint for the central grid.
[0014] The method for data processing and configuration optimization of public service facilities in urban and rural community living circles provided by the present invention may also have the following features: Step S20 includes the following sub-steps: S21, dividing the entire city into a standard grid matrix and generating a grid center point for each grid cell; S22, using a grid center point inclusion discrimination method, determining whether the grid center point falls inside the boundary of the planning area through spatial overlay analysis, thereby filtering out the core area grid matrix; S23, selecting grids in the standard grid matrix that are adjacent to the core area grid matrix but do not belong to the core area grid matrix, and incorporating them into the buffer grid matrix.
[0015] The method for data processing and configuration optimization of public service facilities in urban and rural community living circles provided by this invention may also have the following features: Step S10 further loads urban street boundary vector data, and step S30 includes the following sub-steps: S31, performing data cleaning, source tracing annotation, spatial metadata annotation, and semantic block processing on the unstructured data from the urban planning department to obtain semantic blocks, wherein the spatial metadata annotation at least includes labeling the unstructured data after source tracing annotation with the street identifier based on the street boundary vector data; S32, vectorizing the semantic blocks to construct a vector index; S33, extracting the relationships between entities from the text content of the semantic blocks to construct a graph index, and constructing a street subgraph index based on the street identifier; S34, providing a retrieval API, configured to support retrieval based on query strings and metadata filtering conditions containing street identifiers, and outputting evidence source tracing information containing evidence text and its source information; S35, completing the construction of a professional knowledge base.
[0016] The method for data processing and configuration optimization of public service facilities in urban and rural community living circles provided by this invention may also have the following features: In step S40, the planner intelligent agent cluster includes a resident demand survey planner intelligent agent, a spatial resource analysis planner intelligent agent, and a facility status assessment planner intelligent agent. The resident demand survey planner intelligent agent is configured to: call the professional knowledge base, extract residents' needs according to the street signs in the planning area, and generate a list of residents' needs by street. The spatial resource analysis planner intelligent agent is configured to: perform spatial overlay and attribute statistical analysis on the available spatial resource vector data and generate a list of available resources. The facility status assessment planner intelligent agent is configured to: construct the service coverage range of each type of public service facility based on the public service facility interest points and according to the preset service radius, perform spatial overlay analysis with the core area grid matrix, calculate the uncovered area rate of each type of public service facility in each grid unit in the core area grid matrix, and generate a facility coverage list.
[0017] The method for data processing and configuration optimization of public service facilities in urban and rural community living circles provided by the present invention may also have the following features: In step S20, each divided grid unit is assigned a unique grid identifier; step S40 further includes defining a baseline subset extraction tool and configuring it to extract corresponding target data from the baseline based on the grid identifier; in step S70, the planner intelligent agent cluster and the resident intelligent agent cluster are driven to conduct multi-stage collaborative simulation and consensus evaluation based on the target data. The extraction of target data includes: obtaining the street identifier in the corresponding grid unit through grid identifier mapping, and extracting the resident demand data corresponding to the street identifier from the resident demand list of the planning area as the resident demand baseline; selecting resource elements whose spatial range intersects with the grid unit corresponding to the grid identifier from the available resource list as the available spatial resource baseline; and extracting the uncovered area ratio data of various public service facilities corresponding to the grid identifier from the facility coverage list as the facility service coverage baseline.
[0018] The method for data processing and configuration optimization of public service facilities in urban and rural community living circles provided by the present invention may also have the following features: the specific steps of step S50 are as follows: First, each grid cell in the core area grid matrix is taken as the center grid, and the convolution window is defined as a 3×3 grid matrix including the center grid and its 8 neighboring grids; then, using the convolution window, the core area grid matrix is slid in the order of raster scanning with a moving step of 1 grid cell to generate a number of negotiation units with each grid cell in the core area grid matrix as the center grid.
[0019] The method for data processing and configuration optimization of public service facilities in urban and rural community living circles provided by the present invention may also have the following features: In step S50, for the central grid of the core area grid matrix located at the boundary of the planning area, adjacent grids are selected from the buffer grid matrix to fill its neighborhood. If its neighborhood location exceeds the boundary of the city, it is marked as an invalid neighborhood and removed.
[0020] The method for data processing and configuration optimization of public service facilities in urban and rural community living circles provided by the present invention may also have the following features: Step S60 includes the following sub-steps: S61, based on mobile phone signaling data and population census data, construct a multi-dimensional population stratification system in each negotiation unit, and count the population of each stratum in the multi-dimensional population stratification system for each grid unit in the negotiation unit; S62, set differentiated sampling weights for the central grid and neighboring grids in each negotiation unit; S63, based on the differentiated sampling weights and the population of each stratum, sample the population of each stratum in each grid unit in each negotiation unit to obtain virtual resident samples; S64, use a natural language generation model to generate a first-person profile and facility preferences for each sampled virtual resident sample, and comprehensively form a resident intelligent agent cluster containing personalized profiles and possessing heterogeneity.
[0021] The method for data processing and configuration optimization of public service facilities in urban and rural community living circles provided by this invention may also have the following features: Step S70 includes the following sub-steps: S71, based on the baseline, within each negotiation unit, the planner intelligent agent cluster is driven to output a summary of the key points of resident needs corresponding to the resident needs list at the street scale of the corresponding central grid, a summary of the available resource supply overview corresponding to the available resource list of the spatial range of the central grid, and a summary of the coverage weaknesses of various public service facilities corresponding to the facility coverage list. Subsequently, based on the output content of the planner intelligent agent cluster and combined with the personalized profile of the resident intelligent agent cluster itself, the existing public service facilities are described. Problems and improvement suggestions; S72, integrate the statements and baselines of the resident intelligent agent cluster to generate a draft of the public service facility configuration optimization demand list for the central grid; S73, drive the resident intelligent agent cluster to vote on the draft according to preset rules, take the reasons for the dissenting votes as strong constraint inputs and return to step S72 for iteration until the iteration reaches the maximum preset number of rounds or the voting situation meets the threshold set by the preset rules, and output the final draft of the public service facility configuration optimization demand list for the central grid; S74, based on the final draft, match the available resource list and facility coverage list to generate an action blueprint that includes the type, spatial location and implementation priority of public service facilities.
[0022] The method for data processing and configuration optimization of public service facilities in urban and rural community living circles provided by this invention may also have the following features: In step S74, the preset rule is based on a comprehensive consensus score, which is obtained by weighted summation of voting support, sentiment tendency, and opinion convergence. The voting support is calculated by subtracting the proportion of opposing votes weighted by a penalty coefficient from the proportion of affirmative votes in the voting, and normalizing the resulting value to the [0,1] interval. The sentiment tendency is calculated by analyzing the voting behavior of resident intelligent agent clusters based on natural language processing technology. Sentiment analysis is performed on the spoken texts, and the frequencies of positive and negative sentiment words and the total number of spoken texts are counted. After calculating the percentage of the difference between the frequencies of positive and negative sentiment words relative to the total number of spoken texts, the obtained values are normalized to the [0,1] interval. The convergence of opinions is calculated as follows: keywords in the spoken texts of the resident intelligent agent cluster in the voting are extracted using a keyword extraction algorithm, and opinions are clustered using a clustering algorithm. The product of the maximum cluster proportion and the normalized silhouette coefficient is calculated, wherein the silhouette coefficient is linearly normalized to the [0,1] interval.
[0023] The present invention has the following beneficial effects:
[0024] First, this invention no longer uses administrative boundaries such as streets and neighborhood committees as static discussion units. Instead, it constructs the entire city as a standardized grid matrix with a unified scale. Negotiation units are generated on the core area grid of the planning region using convolutional windows of "central grid + effective neighbor grids." These negotiation units are then traversed sequentially through raster scanning to form a set of overlapping and continuously covering negotiation units. For the core area edge windows, buffer grid completion and invalid neighbor removal rules are further introduced to ensure the effectiveness of window generation. This achieves the following beneficial effects:
[0025] (1) By using overlapping sliding windows, each core area grid participates in the negotiation at least once as the central grid, and at the same time participates in multiple negotiation units as a neighboring grid. This weakens the fragmentation and boundary omission caused by the traditional division according to administrative boundaries from the perspective of spatial geometry, and realizes continuous spatial coverage and boundary effect suppression.
[0026] (2) Using a unified grid identifier and window identifier as the primary key of spatial index, negotiation units, resident intelligent agents, baseline segments and output blueprints can all be organized around the same central grid, improving the consistency of cross-step data retrieval and the reproducibility of results, and realizing the alignment of data and decision-making throughout the entire process.
[0027] (3) The negotiation unit covers the potential user range with neighborhood topology, which can be closer to the real spatial structure of service spillover and cross-grid sharing in the living circle, providing a stable organizational unit for subsequent public participation simulation, and realizing the improvement of organizational capabilities at the living circle scale.
[0028] Furthermore, this invention addresses the problem that a large amount of unstructured text, such as regulations, action plans, and survey reports, concerning planning areas is difficult to use for automated decision-making. It constructs a graph retrieval-enhanced generative knowledge base with source tracing and spatial filtering capabilities. Documents are cleaned, source-tracing labeled, and semantically segmented, with a unified minimum metadata set labeled for each semantic block. Based on this, a hybrid retrieval structure of vector and graph indexes is constructed, supporting multiple retrieval modes and reordering. Street-scale filtering and evidence backtracking are achieved through street subgraph indexes. Further, this invention instantiates at least three types of professional planner agents based on this knowledge base and spatial data, and outputs them concurrently. The outputs of these three agents are then fused to form a unified, structured baseline for current status assessment. A baseline subset extraction tool is defined to extract the baseline fragments required for negotiation units according to grid identifiers. The following beneficial effects are achieved:
[0029] (1) Planning professional knowledge is “searchable-filterable-traceable”: By unifying metadata and evidence chain output, the extraction of requirements and the reference of rules can be traced back to the semantic blocks of specific documents, overcoming the problems of traditional experience-based integration being difficult to audit and verify.
[0030] (2) The assessment criteria are uniform and reproducible: The coverage assessment adopts a unified measurement method of "buffer coverage union - grid area superposition" to output standardized indicators and avoid incomparability caused by differences in the criteria of different assessors.
[0031] (3) Strict alignment of baseline and negotiation input: The requirement subset, resource subset and coverage subset are extracted in the grid index layer by the baseline subset extraction tool, so that the subsequent negotiation simulation uses the same structured baseline as input in each negotiation unit, which improves the reproducibility and cross-regional portability of the process.
[0032] Finally, this invention addresses the problems of small sample size, easy omission of vulnerable groups, and difficulty in quantifying negotiation quality in traditional public participation methods. It constructs a multi-agent collaborative simulation framework using negotiation units as organizational units. This invention combines mobile signaling data and census data to construct a multi-dimensional hierarchical system of "work-residence activity type × age group × gender," setting differentiated sampling weights in the central grid and neighboring grids, and introducing minimum sampling guarantees and enhanced inclusion strategies for special groups to generate representative resident agent samples. Then, it calls a large language model or an equivalent natural language generation model to generate first-person profiles of residents and facility preferences, forming structured resident profiles. Within each negotiation unit, this invention uses the structured baseline output by the baseline subset extraction tool as the sole factual input, driving the planner agent cluster, resident agent cluster, and coordinator agent to execute a multi-stage negotiation process of "baseline notification - resident expression - demand convergence - action blueprint generation," and writing the process into a structured event stream for round-by-round reference. This invention calculates a comprehensive consensus score by integrating indicators such as voting support, sentiment, and viewpoint convergence. When the score falls below a threshold, iterative updates to the requirement list are triggered; when the threshold is met, the final requirement list and action blueprint are output. This achieves the following beneficial effects:
[0033] (1) The public participation process is quantifiable and convergent: the negotiation process is transformed from a subjective description into a calculable indicator through multi-dimensional consensus scores, which supports threshold judgment and iterative control of negotiation quality and convergence, and overcomes the problem of "difficulty in measuring consensus" caused by relying solely on simple voting statistics in the traditional way.
[0034] (2) The results are executable and can be implemented: The action blueprint will link the final requirements with the candidate resource element identifiers, constraints and spatial locations to form a text plan and a layout in a specific data format that can be directly used for subsequent solution deepening and display, avoiding the problem that traditional public participation only stays at the level of vision expression and lacks engineering implementation clues.
[0035] (3) Full-link traceable audit: The final output record includes baseline references, evidence indexes, consensus score composition and iteration number, making the deduction path from "evidence-demand-consensus-action blueprint" auditable and verifiable. Attached Figure Description
[0036] Figure 1 This is a flowchart of a method for data processing and configuration optimization of public service facilities in urban and rural community living circles, according to an embodiment of the present invention.
[0037] Figure 2 This is a schematic diagram of the professional knowledge base for community life circle planning based on graph retrieval-enhanced generative architecture, according to an embodiment of the present invention. Detailed Implementation
[0038] To make the technical means, creative features, objectives and effects of this invention easy to understand, the following embodiments, in conjunction with the accompanying drawings, specifically illustrate a method for data processing and configuration optimization of public service facilities in urban and rural community living circles according to this invention.
[0039] Example
[0040] Figure 1 This is a flowchart of a method for data processing and configuration optimization of public service facilities in urban and rural community living circles, according to an embodiment of the present invention.
[0041] like Figure 1 As shown, this embodiment provides a method for data processing and configuration optimization of public service facilities in urban and rural community living circles, including the following steps:
[0042] S10, load the boundaries of the city, streets and their planning areas, points of interest for public service facilities, and vector data of available spatial resources (specifically in this embodiment, the city is selected as Shanghai, and the planning area is selected as a certain street in a certain district of Shanghai).
[0043] in:
[0044] (1) The city’s boundaries are represented by city-wide Shapefile data containing boundary geometric attributes.
[0045] (2) The boundary of the planning area is represented by the planning area Shapefile data containing the boundary geometric attributes.
[0046] (3) The boundaries of each street within the city are represented by street boundary Shapefile data containing the geometric attributes of each street boundary.
[0047] (4) Points of interest in public service facilities are represented by the existing public service facility POI data.
[0048] (5) Available spatial resource vector data is represented by spatial resource Shapefile data that can be used to build new public service facilities.
[0049] Specifically, in this embodiment, after loading the above data, the geographic coordinate system of the city is WGS84. When it comes to calculations involving distance / area and other measurements, the coordinates are converted to the WGS84-UTM projection coordinate system that matches the planning area (the UTM zone is automatically selected according to the area, and the unit is meters) for calculation.
[0050] S20, Mesh Construction, includes the following sub-steps S21~S23:
[0051] S21 divides the entire city into a 1km × 1km standard grid matrix, which is used to approximate the spatial scale of a 15-minute walk from a community living circle. Then, for each grid cell, a grid geometry polygon, a grid center point centroid, and a corresponding two-dimensional index (i,j) are generated, and a unique grid identifier grid_id is assigned to each grid cell for use in all subsequent spatial indexing, data association, and result traceability.
[0052] Where i is the row index (increasing from top to bottom) and j is the column index (increasing from left to right).
[0053] Next, this embodiment uses spatial topology calculation to select two types of grids from the 1km×1km standard grid matrix of the city: the core area grid matrix Gcore and the buffer area grid matrix Gbuffer, which are corresponding to the planning area. Specifically, it includes the following steps S22~S23.
[0054] S22 uses the grid center point inclusion discrimination method to determine whether the grid center point centroid falls inside the boundary of the planning area through spatial overlay analysis, thereby filtering out the core area grid matrix Gcore, and establishing a two-dimensional index matrix M[i][j] according to the corresponding grid spatial position.
[0055] S23, Select the grids in the standard grid matrix that are adjacent to the core grid matrix Gcore but do not belong to the core grid matrix Gcore, and include them in the buffer grid matrix Gbuffer.
[0056] S30, Construct a professional knowledge base based on graph retrieval enhancement generation mechanism (this embodiment specifically uses the LightRAG architecture, but other retrieval generation frameworks with graph retrieval enhancement generation functions can also be used), including the following sub-steps S31~S35:
[0057] S31, after accessing the unstructured data from the city's planning department, performs data cleaning, source tracing and annotation, spatial metadata annotation, and semantic block processing to obtain semantic blocks, specifically including the following sub-steps S311~S315:
[0058] S311, Data Access:
[0059] The unstructured data accessed by the city's planning department specifically uses planning technical standards, current status survey reports, and historical planning results, such as the "Shanghai 15-Minute Community Life Circle Planning Technical Standards", the "Shanghai '15-Minute Community Life Circle' Action Plan in 2025", and the "Survey Report on '15-Minute Community Life Circle Demand Assessment' in a Certain Street of a Certain District of Shanghai in 2025".
[0060] S312, Data Cleaning:
[0061] Use NLP tools to clean the original PDF / Word documents corresponding to unstructured data, removing headers, footers, and garbled characters.
[0062] S313, traceability label:
[0063] A unique document identifier doc_id is generated for the cleaned document in step S312, and source information doc_meta is recorded for the document, including at least the document name, publication time (publish_time), and document type (doc_type).
[0064] Among them, the document type doc_type includes planning technical standards, current status survey reports, historical planning results, etc.
[0065] S314, Spatial metadata annotation:
[0066] For each document after source tracing and annotation in step S313, perform administrative division entity recognition, extract street spatial entities (such as "a certain street"), and match them with street boundary vector data (street boundary Shapefile data) to form the street identifier subdistrict_id.
[0067] If the document is a single-street survey report, then the street identifier subdistrict_id of all semantic blocks in the document is inherited by that street; if the document is a city-wide / district-wide standard, then its street identifier subdistrict_id is marked as ALL, indicating that it can be retrieved and referenced by any street.
[0068] S315, Semantic Block Processing:
[0069] A recursive chunking strategy is used to segment the annotated document content in step S314 into semantic blocks. The preferred length of a semantic block is 500 to 1000 tokens. A unique semantic block identifier (chunk_id) is generated for each semantic block, and semantic block metadata (chunk_meta) is recorded. Specifically, in this embodiment, the semantic block metadata (chunk_meta) stored in the database includes at least:
[0070] Semantic block metadata chunk_meta={document identifier doc_id, semantic block identifier chunk_id, resource identifier source_ref, document type doc_type, publication time publish_time, subdistrict identifier subdistrict_id}.
[0071] The resource identifier source_ref includes location information such as page number, chapter, and paragraph number.
[0072] S32, Vectorized index construction:
[0073] A vectorized representation model is used to vectorize the semantic blocks, resulting in corresponding embedding vectors, which are then written to a vector index library. Each index entry in the vector index library includes at least: {semantic block identifier chunk_id, document identifier doc_id, embedding vector, and semantic block metadata chunk_meta}.
[0074] Among them, the street identifier subdistrict_id in the semantic block metadata chunk_meta is used for subsequent retrieval filtering: when it is necessary to query the residents' needs of a certain grid cell's street, the system can limit the retrieval scope to {street identifier subdistrict_id=the street}∪{street identifier subdistrict_id=ALL} through the filtering conditions filters, thereby achieving the fusion retrieval of "street-specific needs + global general rules".
[0075] S33. Extract the relationships between entities from the text content of the semantic block to construct a graph index, and construct a subdistrict subgraph index based on the subdistrict identifier subdistrict_id in the corresponding semantic block metadata chunk_meta.
[0076] Specifically in this embodiment:
[0077] (1) LightRAG’s graph index includes a low-level entity graph and a high-level community graph.
[0078] (2) The types of entities include at least the facility entity (such as “community canteen”, “elderly day care center”), the threshold entity (such as “300m”, “15 minutes”), the policy entity, and the subdistrict entity (such as “a street”).
[0079] (3) The fields of the graph index should include at least the node field and the edge field.
[0080] The node fields include: entity_id, entity_name, entity_type, source_chunk_id, and subdistrict_id.
[0081] The edge fields include: edge_id (relation identifier), src_entity_id (source entity identifier), relation_type (relation type), dst_entity_id (target entity identifier), source_chunk_id (source semantic block identifier), and subdistrict_id (street identifier).
[0082] The street identifier `subdistrict_id` in the node and edge fields is provided by the semantic block metadata `chunk_meta` corresponding to the source semantic block, and is used to subsequently build the Subdistrict Subgraph Index.
[0083] in:
[0084] (1) For the low-level entity graph:
[0085] LightRAG extracts entities of the aforementioned types from the text content of semantic blocks, uses these entities as nodes, and uses the constraint relationships identified between entities as edges, thereby constructing an entity relationship graph.
[0086] (2) For high-level community graphs:
[0087] LightRAG performs community partitioning based on entity relationship graphs, aggregating closely related entity subgraphs into "knowledge communities" and generating a community summary (community_summary) and a community identifier (community_id) for each community.
[0088] The community summary (community_summary) needs to be accompanied by a subdistrict_id tag. This tag is determined based on the source semantic block associated with the nodes / edges within the community: if the proportion of nodes or edges associated with the same subdistrict_id in the community exceeds a preset threshold, then the community summary (community_summary) is labeled with the corresponding subdistrict_id; if the proportion of nodes or edges associated with multiple different subdistrict_ids in the community does not reach the preset threshold for a single subdistrict_id, then the community summary (community_summary) is labeled as MIXED.
[0089] (3) For the Subdistrict Subgraph Index (used to quickly limit the scope of candidate entities and communities during the retrieval stage, thereby limiting the scope of graph retrieval and reasoning to the local subgraph corresponding to the target street):
[0090] LightRAG groups the lower-level Entity Graph and the higher-level Community Graph by street identifier (subdistrict_id) and constructs a Subdistrict Subgraph Index mapping:
[0091] SubgraphIndex[subdistrict_id] = {entity_ids, edge_ids, community_ids}.
[0092] In the above process, after constructing the graph index and the subdistrict subgraph index, when a query is received, LightRAG first parses the query to extract keywords, and then, in conjunction with the constraint of the subdistrict_id in the filters, performs local query, global query, and hybrid query respectively.
[0093] (1) Local Query: Focusing on specific entities, strongly related semantic blocks are recalled in the vector index; if the filter condition filters specifies the subdistrict_id, then the vector recall is only performed in the set of semantic block metadata chunk_meta of {subdistrict_id=target street}∪{subdistrict_id=ALL}.
[0094] (2) Global Query: Based on a specific topic, retrieve relevant knowledge communities and their community summaries (community_summary) in the community graph; if the filter condition specifies the subdistrict_id, the Global Query will be executed first in the community_ids set of SubgraphIndex[subdistrict_id].
[0095] (3) Hybrid Query: The candidate results obtained from Local Query and Global Query are merged and sorted, and the entity relationship path used to explain the search results is output. At the same time, token budget control is performed to ensure that the input content in the generation stage is within a reasonable range and the evidence information is concentrated.
[0096] S34 provides a retrieval API, which is configured to support retrieval based on the query string and metadata filtering conditions including the subdistrict_id, and output evidence tracing information including the evidence content and its source information doc_meta.
[0097] S35, complete the construction of the professional knowledge base, such as Figure 2 As shown, the knowledge base construction result of this embodiment includes 995 entity nodes and 501 relation edges.
[0098] S40, based on the public service facility interest points and available spatial resource vector data loaded in step S10, and the professional knowledge base completed in step S30, the system instantiates three types of professional planner agents, generates a resident demand list, an available resource list, and a facility coverage list, and merges them to form a baseline for current status assessment (each agent's output uniformly adopts JSON or GeoJSON structure, and includes timestamps, parameter configurations, and evidence traceability information in the output record for storage, tracing, and cross-step retrieval; preferably, the three types of planner agents execute tasks concurrently, and the baseline is merged and stored after all three have completed their outputs). Specifically, this includes the following sub-steps S41~S45:
[0099] S41, Configure the resident needs survey planner intelligent agent Agent1: Configure Agent1 to call the professional knowledge base, extract residents' needs, pain points and expectations for public service facilities according to the street identifier subdistrict_id in the planning area, and generate a list of residents' needs by street (structured resident needs data).
[0100] Specifically, in this embodiment, the resident needs survey planner agent Agent1 uses the rag_search interface to filter and search by street identifier subdistrict_id="XXXXX", generating a street-level list of resident needs. It identifies "urgent / relatively urgent" needs such as insufficient public service facilities, insufficient affordable housing for young people, renovation of waterlogged areas in old residential areas and elevator installation, renovation of farmers' markets, construction of beautiful communities, resilient safety construction, and lack of fire sprinklers in electric bicycle sheds. Here, "XXXXX" represents the pinyin name of the corresponding searched street spatial entity subdistrict.
[0101] S42, Configure the spatial resource analysis planner agent Agent2: Configure Agent2 to perform spatial overlay and attribute statistical analysis on available spatial resource vector data, identify the distribution, scale and constraints of available spatial resources within the planning area, and generate a list of available resources (structured available spatial resource data).
[0102] Specifically, in this embodiment, the spatial resource analysis and planning agent Agent2 performs spatial overlay and attribute statistical analysis on the available spatial resource vector data to form the "Potential Spatial Resource Summary of Community Living Circle": including overall developable land plots, existing renewal land plots (under construction / planned in the near future / with renewal intentions), inefficient and idle spaces, ancillary public open spaces, and usable spaces within the road red line; among them, the total area of overall developable land plots is 28,598 m², the total area of existing renewal land plots (under construction) is 53,708 m², the total area of existing renewal land plots (planned in the near future) is 1,861 m², the total area of existing renewal land plots (with renewal intentions) is 7,728 m², the total area of inefficient and idle spaces is 14,512 m², the total area of ancillary public open spaces is 2,425 m², and the total area of usable spaces within the road red line is 2,084 m², totaling approximately 110,916 m².
[0103] S43, Configure the facility status assessment planner agent Agent3: Configure Agent3 to construct the service coverage range of each type of public service facility based on the interest points of public service facilities and according to the preset service radius, perform spatial overlay analysis with the core area grid matrix Gcore, calculate the uncovered area rate of each type of public service facility in each grid cell of the core area grid matrix Gcore (used to identify coverage gaps and weak grids), and generate a facility coverage list (structured public service facility coverage assessment data).
[0104] Specifically, in this embodiment, the service radius threshold is uniformly set to 1000m. A 1000m buffer zone is constructed for public service facility interest points, and a union operation of similar values is performed to obtain the coverage area. Subsequently, the coverage area is spatially overlaid with the core area grid set Gcore one by one, and the uncovered area rate of various public service facilities in the four core area grids is calculated. Based on the uncovered area rate results, it is identified that elderly care service facilities and convenient service facilities have a high uncovered area rate in several core area grids, which are high-priority shortcomings.
[0105] S44 integrates the residents' needs list, the available resources list, and the facilities coverage list to form a baseline for current status assessment.
[0106] Through the collaborative output of Agent1, Agent2, and Agent3, a baseline for assessing the current status of public service facility configuration is formed concurrently, covering the demand side of residents, the supply side of spatial resources, and the supply side of existing facilities. This baseline is then stored in a database for subsequent steps.
[0107] S45, Define the baseline subset extraction tool.
[0108] To support the generation of the subsequent optimization requirement list, a baseline subset extraction tool, `baseline_slice`, is defined. This tool extracts the target data `Baseline(window_id)` corresponding to a segment of the baseline from the public service facility configuration status assessment, based on the grid identifier `grid_id`. Specifically, it includes:
[0109] (1) Obtain the subdistrict_id of the corresponding grid cell by mapping the grid identifier grid_id, and extract the resident demand data corresponding to the street identifier from the resident demand list of the planning area as the resident demand baseline baseline_needs_subset.
[0110] (2) Select resource elements whose spatial range intersects with the grid cell corresponding to the grid identifier grid_id from the available resource list, and use them as the available spatial resource baseline_resources_subset.
[0111] (3) Extract the uncovered area rate data of various public service facilities corresponding to the grid_id from the facility coverage list and use it as the facility service coverage baseline_coverage_subset.
[0112] To address the spatial fragmentation and boundary effects resulting from organizing public participation solely according to administrative boundaries, this embodiment employs a convolutional moving window mechanism in step S50 to generate overlapping, fully covering negotiation units (Window(g)) on the core area grid matrix Gcore of the planning region. x This involves organizing a collaborative simulation of a 15-minute community workshop for public participation in the living circle, involving subsequent resident intelligent agents and planner intelligent agents.
[0113] S50, by traversing the core region mesh matrix Gcore through a convolutional moving window, several negotiated cells that completely cover the core region mesh matrix Gcore are generated, consisting of the central mesh and its neighboring meshes and overlapping each other, including the following sub-steps S51~S53:
[0114] S51, taking each grid cell in the core region grid matrix Gcore as the center grid, defines the convolution window as including the center grid g. x and its 8 neighboring grids N8(g x A 3×3 grid matrix.
[0115] S52, using a convolution window, slides within the core region grid matrix Gcore in a step size of 1 grid cell, following the raster scan order (from left to right, top to bottom), generating a grid g with each grid cell in the core region grid matrix Gcore as the center grid.x Several negotiation units Window(g) x This mechanism can ensure, from a spatial geometry perspective, that all potential users within a 1km service radius of the public service facilities in the central grid are sampled and included in the same negotiation unit, thereby achieving comprehensive negotiation coverage at the living circle scale.
[0116] Where x represents the grid cell number in the core area grid matrix Gcore of the planning area. Specifically, in this embodiment, a 3×3 convolutional moving window mechanism is used to generate the negotiation unit Window(g x There are 4 in total.
[0117] Specifically, in this embodiment, for the central grid g of the core area grid matrix Gcore located at the boundary of the planning area... x If some of its neighboring grids N8(g) x If a grid cell does not belong to the core area grid set Gcore, it will select adjacent grid cells from the buffer grid matrix Gbuffer to fill its neighborhood. If its neighborhood exceeds the city boundary, it will be marked as an invalid neighborhood and removed. This ensures that each grid cell in the core area grid matrix Gcore participates in the negotiation unit Window(g) at least once as the "center grid". x ) is generated and can be used as a neighborhood grid N8(g x ) Participating in multiple negotiation units Window(g x ).
[0118] S53, to support subsequent extraction of baseline segments and generation of resident intelligent agent samples according to the negotiation unit index, for each negotiation unit Window(g) x Define a unique negotiation unit identifier window_id.
[0119] Preferably, the negotiation unit identifier window_id is associated with the corresponding central grid g. x The identifiers `center_grid_id` are the same, both generated from the grid identifier `grid_id` of their corresponding center grids, making the same center grid `g`... x Corresponding unique negotiation unit Window(g) x ).
[0120] S60, the generation of resident intelligent agent clusters based on hierarchical random sampling and large model enhancement, includes the following sub-steps S61~S65:
[0121] S61, based on mobile signaling data and census data, in each negotiation unit Window(g) xConstruct a multi-dimensional population stratification system and count the population size of each stratum in the multi-dimensional population stratification system for each grid cell in the negotiation unit, including the following sub-steps S611~S615:
[0122] S611, Mobile signaling data preprocessing:
[0123] Mobile signaling data is aggregated by grid unit to form a statistical table indexed by grid identifier grid_id. Each record contains at least a grid identifier field, a spatial affiliation field (such as a street / area name field), and various stationing behavior statistical fields.
[0124] S612, Three categories of work-residence activities:
[0125] Based on residential and work-related behaviors in mobile phone signaling, the active population is divided into:
[0126] (1) Only residents have a residence record in this grid unit.
[0127] (2) Only working people have work stay records only in this grid cell.
[0128] (3) Residents who work and reside in the same grid unit have both residential and work records.
[0129] S613, Age Group and Gender Grouping:
[0130] (1) Divide the age groups into three categories: 7-17 years old, 18-44 years old, and 45-59 years old.
[0131] (2) Divide gender into two categories: male and female.
[0132] S614, 18-dimensional population attribute stratification:
[0133] A population stratification system with 18 dimensions is constructed based on the combination of "type of work-residence activity (3 categories) × age group (3 categories: 7-17 years old, 18-44 years old, 45-59 years old) × gender (2 categories: male, female)". The field naming rule is "{user_type}-{age_type}-{gender}". For example, "1-2-1" means "residence only - 18-44 years old - male".
[0134] S615, Population Data CSV Structure:
[0135] Each grid cell corresponds to one row of records, which includes the grid identifier grid_id and the field values of the 18-dimensional population attribute stratification. The values of each field are the actual population of the corresponding stratification.
[0136] S62, for each negotiation unit Window(g) xSet the center grid g. x With the neighboring grid N8(g x Differential sampling weights:
[0137] In each negotiation unit Window(g x Within ) to reflect the central grid g x Demand-driven, setting the central grid g x The sampling ratio is higher than that of the neighboring grid N8(g) x Sampling ratio. Preferably, the central grid g x With the neighboring grid N8(g x The sampling proportions for ) are 0.2% and 0.1%, respectively. Let the central grid be g. x The sampling ratio is r c Neighborhood grid N8(g) x The sampling proportion is r n .
[0138] S63, based on differentiated sampling weights and the population size of each stratum, for each negotiation unit Window(g) x The population of each stratum within each grid cell is sampled to obtain a virtual resident sample.
[0139] Wherein, for the k-th stratified population in the x-th grid cell, the sampling size is:
[0140] n sample (x,k)=round[n real (x,k)×r sampling ].
[0141] In the above formula, n real (x,k) represents the number of people in the k-th stratum within the x-th grid cell, r sampling For the corresponding sampling ratio, when the grid cell is the central grid g x r at time sampling Take r c When the grid cell is a neighboring grid N8(g) x r at ) sampling Take r n , round is the rounding function.
[0142] Specifically, this step also employs a minimum sampling guarantee mechanism and a social equity-oriented strategy to enhance the inclusion of special groups, in order to avoid the complete neglect of small sample groups and to reflect the fairness of the planning.
[0143] Minimum sampling guarantee mechanism:
[0144] If n sampleIf the calculated result of (x,k) is less than 1, then probability sampling is used to avoid omitting vulnerable groups: n sample (x,k) serves as the supplementary sampling probability, i.e., the probability of selecting one individual. This is achieved by generating a random number between 0 and 1 and combining it with n. sample The comparison method (x,k) determines whether to perform supplementary sampling (if n sample If (x,k) > random number, then draw 1 more person; if n sample If (x,k)≤ random number, then no additional sampling is required, thus avoiding the complete neglect of small sample groups without introducing systematic bias.
[0145] A strategy to enhance the inclusion of special groups with a social equity orientation: Statistical data on special groups is loaded using the street identifier (subdistrict_id) as the smallest statistical unit; when only coarser-grained statistical units are available, the proportion can be pushed down to the street level according to population weight. Specifically, this includes:
[0146] (1) Loading data for special groups: Load a statistical data table containing fields such as subdistrict_id (or a district field that can be mapped to a street), number of disabled persons, number of elderly persons over 60 years old, and total population.
[0147] (2) Calculation of the proportion of special groups: For any street s, calculate the following:
[0148] The ratio of disabled persons is calculated as: ratio_disabled(s) = number of disabled persons(s) / total population(s).
[0149] The ratio of seniors aged 60 and above is calculated as: ratio_senior(s) = number of seniors aged 60 and above (s) / total population (s).
[0150] (3) Generation of special group intelligent agents:
[0151] Intelligent agents for the elderly aged 60 and above: Based on the original 18-dimensional population stratification system, intelligent agents in the "60 years and above" age group are generated according to the proportion of the elderly aged 60 and above, and their age_type is labeled as "60+".
[0152] Disabled agents: Based on the proportion of disabled persons (ratio_disabled(s)), randomly select agents from the sampled resident agents in each grid cell and add the "disabled" label (covering all age groups).
[0153] S64, based on the attributes of "18-dimensional population attribute hierarchical system × grid cell × special group label", uses a natural language generation model to generate a first-person profile and facility preferences (natural language demand preferences for public service facilities) for each sampled virtual resident sample, and comprehensively forms a resident intelligent agent cluster containing personalized profiles and possessing heterogeneity (output in JSON format).
[0154] S65 groups and stores resident intelligent agent clusters by negotiation unit identifier window_id.
[0155] Therefore, subsequent steps can directly retrieve the negotiation unit Window(g) by its window_id identifier. x The resident intelligent agent cluster, and in conjunction with the baseline subset extraction tool baseline_slice in step S45, extracts the negotiation unit Window(g) x The baseline segments of the relevant resident demand baseline (street scale), available space resource baseline (baseline_resources_subset), and facility service coverage baseline (baseline_coverage_subset) are used to facilitate the negotiation simulation process.
[0156] S70, a collaborative simulation of a 15-minute living circle public participation community workshop based on a multi-agent collaborative framework, includes the following sub-steps S71~S74:
[0157] S71, drive the output content of the planner intelligent agent cluster and the resident intelligent agent cluster, and combine their output content to state the problems and improvement suggestions of existing public service facilities, including the following sub-steps S711~S715:
[0158] S711, loading data:
[0159] For any negotiation unit Window(g) x Read its negotiation unit identifier window_id and the corresponding center grid g. x The identifier center_grid_id is used to map the street identifier subdistrict_id in the grid cell through the corresponding grid identifier grid_id, so as to align with the resident demand baseline baseline_needs_subset (street scale) in the baseline segment.
[0160] S712, Extract the target data Baseline(window_id) of the baseline segment:
[0161] The baseline subset extraction tool `baseline_slice` is invoked to extract negotiated cells (Window(g)) based on the grid identifier `grid_id`. x Corresponding to the central grid g x The baseline segment target data Baseline(window_id) refers to the resident demand baseline, available spatial resource baseline, and facility service coverage baseline in step S45.
[0162] S713, Configuration Workshop:
[0163] For each negotiation unit Window(g) x The workshop is configured with a cluster of planner intelligent agents, a cluster of resident intelligent agents, and a coordinator intelligent agent.
[0164] Among them, the planner intelligent agent cluster includes the aforementioned Agent1, Agent2 and Agent3.
[0165] The resident intelligent agent cluster was among the participants.
[0166] The coordinator agent is configured to maintain the agenda progression, speaking order, and round convergence rules. The coordinator agent does not output planning conclusions, but is only responsible for: (1) announcing the current negotiation unit Window(g) x (1) Scope and objectives; (2) Speakers of the scheduling planner intelligent agent cluster and the resident intelligent agent cluster; (3) When the voting situation in subsequent step S74 does not meet the threshold set by the preset rules, the requirement list iteration is triggered; (4) After the threshold is reached, the action blueprint generation and final archiving are triggered.
[0167] S714, the coordinator agent sends the task prompt word task_prompt_A1 to Agent1 in the planner agent cluster, requesting it to output the central grid g based on the resident demand baseline baseline_needs_subset. x Summary of key needs of residents in the local street.
[0168] The coordinator agent sends the task prompt word task_prompt_A2 to Agent2 in the planner agent cluster, requesting it to output the central grid g based on the available spatial resource baseline baseline_resources_subset. x Summary of available resource supply within the corresponding spatial range.
[0169] The coordinator agent sends the task prompt word task_prompt_A3 to Agent3 in the planner agent cluster, requesting it to output the central grid g based on the facility service coverage baseline baseline_coverage_subset. x Summary of the weak coverage of various public service facilities within the corresponding spatial area.
[0170] S715, Problems and Suggestions Regarding the Cluster Statement of Resident Intelligent Agents:
[0171] The coordinator agent sequentially sends the resident speech task prompts (task_prompt_B1) to the grouped and stored resident agent cluster. The prompts require residents to state the problems and improvement suggestions of existing public service facilities based on their own personalized profiles (personal attributes and preferences) and the output of the planner agent cluster. The resident speech text (ResidentOpinions) is then summarized with the structured fields for subsequent demand list generation and consensus assessment.
[0172] S72, generating the initial draft of the configuration optimization requirements list:
[0173] The coordinator agent sends the task prompt word task_prompt_C1 to Agent1, requesting it to combine the spoken text ResidentOpinions with the target data Baseline(window_id) to form a central grid g. x DraftNeeds, the initial list of requirements.
[0174] S73, Vote and generate the final draft of the configuration optimization requirements list, including the following sub-steps S731~S732:
[0175] S731, Residents' Voting and Evaluation:
[0176] The coordinator agent sends the task prompt word `task_prompt_C2` to each resident agent in the resident agent cluster, votes on each item in the DraftNeeds, and sums up the votes to obtain the proportion of affirmative votes (Ratio). agree Ratio of dissenting votes disagree A sentiment analysis of the ResidentOpinions text was performed to obtain the frequency count of positive sentiment words. pos Count of negative emotion words neg Simultaneously, the maximum cluster ratio was obtained by clustering keywords in the ResidentOpinions of the speech text. max_cluster With profile coefficient Coef silhouette .
[0177] The pre-defined rules for resident voting and evaluation employ a multi-dimensional consensus assessment mechanism, with the corresponding comprehensive consensus score as follows:
[0178] Score overal =ω1×S vote +ω2×S emotion +ω3×S convergence .
[0179] S vote =normalize(Ratio agree -α×Ratio disagree ).
[0180] S emotion =normalize[(Count pos -Count neg ) / Total messages ].
[0181] S convergence =Ratio max_cluster ×normalize(Coef silhouette ).
[0182] In the above formula, Score overal S represents the overall consensus score, ω1, ω2, and ω3 represent weighting coefficients, preferably 0.5, 0.2, and 0.3 respectively. vote S indicates the level of support in voting. emotion S indicates emotional inclination. convergence The expression represents the convergence of viewpoints, `normalize` represents linear normalization to the [0,1] interval, `α` represents the penalty coefficient (preferably 0.5), and `Total` represents the total convergence of viewpoints. messages This indicates the total number of ResidentOpinions text messages.
[0183] S732, take the reasons for the opposing votes of the resident intelligent agents in the resident intelligent agent cluster as strong constraint input and return to step S72 for iteration until the iteration reaches the maximum preset number of rounds or the comprehensive consensus score is greater than or equal to the threshold θ, and output the final draft of the public service facility configuration optimization demand list for the central grid, FinalNeeds.
[0184] Specifically, in this embodiment, θ=0.8 is preferred, and the overall consensus score is considered to be... overal A high consensus is reached when the threshold θ is reached; during iteration, task_prompt_C1′ is issued to Agent1 again, in which the reasons for the residents' dissenting votes and the modification suggestions are used as strong constraint inputs to update DraftNeeds.
[0185] S74 generates an action blueprint that includes the types, spatial locations, and implementation priorities of public service facilities:
[0186] The coordinator agent concurrently sends the action blueprint task prompt word task_prompt_D1 to Agent2 and Agent3, requiring them to negotiate within the Window(g) unit. x Within the specified scope, the final draft of the public service facility configuration optimization demand list (FinalNeeds) matches and allocates resident needs with available space resources in the available space resource baseline (baseline_resources_subset). It then provides the correspondence between these allocations and the public service facility coverage gaps in the facility service coverage baseline (baseline_coverage_subset), and outputs an executable action blueprint (ActionBlueprint). This includes the following: {negotiation unit identifier window_id, center grid identifier center_grid_id, finalNeeds, and overall consensus score}. overal The ActionBlueprint is written to the results database and a traceable summary field, result_summary, is generated. This summary includes at least the evidence source index (document identifier doc_id, semantic block identifier chunk_id, resource identifier source_ref), the identifier of the resource element called, and the negotiated threshold θ and service radius configuration used when generating the ActionBlueprint.
[0187] This embodiment also provides a data processing and configuration optimization system for public service facilities in urban and rural community living circles. It uses the data processing and configuration optimization method for public service facilities in urban and rural community living circles in this embodiment, including a data loading module, a grid processing module, a knowledge base construction module, a baseline generation module, a negotiation unit generation module, a resident intelligent agent cluster construction module, and a collaborative simulation and output module.
[0188] The data loading module is used to load the city and its streets and their planned areas' boundaries, public service facility points of interest, and available spatial resource vector data according to the method in step S10.
[0189] The grid processing module is used to divide the city into grids according to the method in step S20, and then select the core area grid matrix and its buffer area grid matrix of the planning area from the divided grid cells based on the boundary.
[0190] The knowledge base construction module is used to construct a professional knowledge base that supports filtering and searching by street identifier and provides evidence tracing information, based on the unstructured text data of the planning department and using a graph retrieval enhancement generation mechanism, in accordance with the method in step S30.
[0191] The baseline generation module is used to construct a cluster of planner intelligent agents based on the professional knowledge base, public service facility interest points and available spatial resource vector data according to the method in step S40, generate a list of residents' needs, a list of available resources and a list of facility coverage, and integrate them to form a baseline for current status assessment.
[0192] The negotiation unit generation module is used to generate several negotiation units that completely cover the core area grid matrix by traversing the core area grid matrix through a convolutional moving window, according to the method in step S50. These negotiation units consist of the central grid and its neighboring grids and overlap with each other.
[0193] The resident intelligent agent cluster construction module is used to obtain virtual resident samples in each negotiation unit according to the method in step S60, based on mobile phone signaling and population census data, by stratified sampling according to a multi-dimensional population stratification system, and generate personalized profiles using a natural language generation model to form a heterogeneous resident intelligent agent cluster.
[0194] The collaborative simulation and output module is used to drive the planner agent cluster and the resident agent cluster to conduct multi-stage collaborative simulation and consensus assessment based on the baseline within each negotiation unit, according to the method in step S70, and output an optimization requirement list and action blueprint for the central grid.
[0195] Those skilled in the art should understand that this invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to this invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method for processing and optimizing the configuration of public service facilities data in urban and rural community life circles, characterized in that, Includes the following steps: S10, loads the city and its planned area boundaries, public service facility points of interest, and available spatial resource vector data; S20, after dividing the city into grids, based on the boundaries, the core area grid matrix and its buffer zone grid matrix of the planning area are selected from the divided grid cells, including the following sub-steps: S21, the entire city area is divided into a standard grid matrix, and a grid center point is generated for each grid cell. S22, using the grid center point inclusion discrimination method, spatial overlay analysis is used to determine whether the grid center points fall inside the boundary of the planned area, thereby filtering out the core area grid matrix. S23, Select the grids in the standard grid matrix that are adjacent to the core area grid matrix but do not belong to the core area grid matrix, and include them in the buffer grid matrix; S30, based on unstructured text data from planning departments, uses a graph retrieval-enhanced generation mechanism to build a professional knowledge base that supports filtering and retrieval by street identifier and provides evidence tracing information; S40, Based on the professional knowledge base, the public service facility interest points, and the available spatial resource vector data, construct a planner intelligent agent cluster to generate a resident demand list, an available resource list, and a facility coverage list, and integrate them to form a baseline for current status assessment; S50, by traversing the core area mesh matrix through a convolutional moving window, several negotiation cells that completely cover the core area mesh matrix are generated, consisting of the central mesh and its neighboring meshes and overlapping each other. The specific steps are as follows: First, each grid cell in the core region grid matrix is taken as the center grid, and the convolution window is defined as a 3×3 grid matrix including the center grid and its 8 neighboring grids. Then, using the convolution window, following the raster scan order, the window slides in the core region grid matrix with a movement step of 1 grid cell, generating several negotiation cells with each grid cell in the core region grid matrix as the center grid. S60, based on mobile phone signaling and population census data, virtual resident samples are obtained by hierarchical sampling according to a multi-dimensional population stratification system in each negotiation unit, and personalized profiles are generated using a natural language generation model to form a heterogeneous cluster of resident intelligent agents; S70, within each negotiation unit, based on the baseline, drive the planner agent cluster and the resident agent cluster to perform multi-stage collaborative simulation and consensus assessment, and output an optimization requirement list and action blueprint for the central grid.
2. The method for data processing and configuration optimization of public service facilities in urban and rural community living circles according to claim 1, characterized in that: wherein Step S10 also loads the street boundary vector data of the city. Step S30 includes the following sub-steps: S31, perform data cleaning, source tracing and annotation, spatial metadata annotation, and semantic block processing on the unstructured data from the city's planning department to obtain semantic blocks. The spatial metadata annotation includes at least the annotation of the street to which the unstructured data belongs after being annotated with the street boundary vector data for source tracing. S32, the semantic block is vectorized to construct a vector index; S33, extract the relationships between entities from the text content of the semantic block to construct a graph index, and construct a street subgraph index based on the street identifier; S34, provide a retrieval API, which is configured to support retrieval based on query strings and metadata filtering conditions containing the street identifier, and output evidence tracing information containing evidence text and its source information; S35, complete the construction of the professional knowledge base.
3. The method for data processing and configuration optimization of public service facilities in urban and rural community living circles according to claim 1, characterized in that: wherein In step S40, the cluster of planner intelligent agents includes a resident needs survey planner intelligent agent, a spatial resource analysis planner intelligent agent, and a facility status assessment planner intelligent agent. The resident needs survey planner intelligent agent is configured to: invoke the professional knowledge base, extract residents' needs according to the street identifiers within the planning area, and generate a list of residents' needs organized by street. The spatial resource analysis and planning agent is configured to perform spatial overlay and attribute statistical analysis on the available spatial resource vector data to generate a list of available resources. The facility status assessment planner agent is configured to: construct the service coverage range of each type of public service facility based on the public service facility interest points according to the preset service radius, perform spatial overlay analysis with the core area grid matrix, calculate the uncovered area rate of each type of public service facility in each grid unit of the core area grid matrix, and generate a facility coverage list.
4. The method for data processing and configuration optimization of public service facilities in urban and rural community living circles according to claim 1, characterized in that: Step S20 further assigns a unique grid identifier to each of the divided grid cells. Step S40 also includes defining a baseline subset extraction tool and configuring it to extract corresponding target data from the baseline based on the grid identifier. Step S70 uses the target data to drive the planner agent cluster and the resident agent cluster to perform multi-stage collaborative simulation and consensus evaluation. Extracting the target data includes: The street identifier in the corresponding grid cell is obtained by mapping the grid identifier, and the resident demand data corresponding to the street identifier is extracted from the resident demand list of the planning area as the resident demand baseline; Resource elements whose spatial extent intersects with the grid cell corresponding to the grid identifier are selected from the available resource list and used as the available spatial resource baseline; and Extract the uncovered area rate data of various public service facilities corresponding to the grid identifier from the facility coverage list, and use it as the facility service coverage baseline.
5. The method for data processing and configuration optimization of public service facilities in urban and rural community living circles according to claim 1, characterized in that: wherein In step S50, for the central grid of the core area grid matrix located at the boundary of the planning area, adjacent grids are selected from the buffer grid matrix to fill its neighborhood. If its neighborhood location exceeds the boundary of the city, it is marked as an invalid neighborhood and removed.
6. The method for data processing and configuration optimization of public service facilities in urban and rural community living circles according to claim 1, Its features are: Step S60 includes the following sub-steps: S61, Based on mobile signaling data and census data, a multi-dimensional population stratification system is constructed in each of the negotiation units, and the population size of each stratum in the multi-dimensional population stratification system is counted for each grid unit in the negotiation unit; S62, set differentiated sampling weights for the central grid and the neighboring grids in each negotiation unit; S63, Based on the differentiated sampling weights and the population size of each stratum, sample the population of each stratum in each grid cell within each negotiation unit to obtain virtual resident samples; S64, using a natural language generation model to generate a first-person profile and facility preferences for each sampled virtual resident sample, and combining them to form a resident intelligent agent cluster that includes personalized profiles and has heterogeneity.
7. The method for data processing and configuration optimization of public service facilities in urban and rural community living circles according to claim 1 or 4, Its features are: Step S70 includes the following sub-steps: S71, based on the baseline, within each negotiation unit, the planner agent cluster is driven to output a summary of the key points of residents' needs corresponding to the residents' needs list at the street scale where the central grid is located, a summary of the available resource supply overview corresponding to the available resource list in the spatial range where the central grid is located, and a summary of the weak coverage of various public service facilities corresponding to the facility coverage list. Then, based on the output of the planner agent cluster and combined with the personalized profile of the resident agent cluster itself, the problems and improvement suggestions of the existing public service facilities are presented. S72, combining the statements of the resident intelligent agent cluster and the baseline, generate a draft of the public service facility configuration optimization demand list for the central grid; S73, after driving the resident intelligent agent cluster to vote on the initial draft according to the preset rules, the reasons for the opposing votes are used as strong constraint inputs and the process returns to step S72 for iteration until the iteration reaches the maximum preset number of rounds or the voting situation meets the threshold set by the preset rules, and the final draft of the public service facility configuration optimization demand list for the central grid is output. S74. Based on the final draft, match the available resource list and the facility coverage list to generate an action blueprint that includes the type, spatial location, and implementation priority of public service facilities.
8. The method for data processing and configuration optimization of public service facilities in urban and rural community living circles according to claim 7, characterized in that: wherein In step S74, the preset rule is based on a comprehensive consensus score, which is obtained by weighted summation of voting support, sentiment tendency, and viewpoint convergence. The voting support rate is calculated as follows: subtract the proportion of opposing votes weighted by a penalty coefficient from the proportion of affirmative votes in the vote, and normalize the resulting value to the interval [0,1]. The sentiment tendency is calculated as follows: based on natural language processing technology, sentiment analysis is performed on the speech texts of the resident intelligent agent cluster in the voting process. The frequencies of positive sentiment words, negative sentiment words, and the total number of speech texts are counted. After calculating the percentage of the difference between the positive sentiment word frequencies and the negative sentiment word frequencies relative to the total number of speech texts, the obtained value is normalized to the interval [0,1]. The convergence of the viewpoints is calculated as follows: keywords are extracted from the speech text of the resident intelligent agent cluster in the voting using a keyword extraction algorithm, and the viewpoints are clustered using a clustering algorithm. The product of the maximum cluster proportion and the silhouette coefficient after normalization is calculated, wherein the silhouette coefficient is linearly normalized to the interval [0,1].