Traditional street and alley roaming vitality representation and multi-objective optimization method based on heterogeneous graph neural network

By using a heterogeneous graph neural network-based approach, traditional streets and alleys are divided into channels, segments, and interface levels. Complex relationship edges are established, and graph neural networks are used to encode the sequential context of segments. This solves the problem of topological relationship expression in traditional street and alley vitality evaluation and realizes closed-loop optimization from evaluation to design.

CN123178903APending Publication Date: 2026-11-27HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611537293.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-30
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively express the complex topological, adjacency, and hierarchical relationships between spatial objects in traditional streets and alleys, making it difficult for streetscape vitality evaluation results to guide interface optimization decisions in the renewal of historical districts.

Method used

Based on heterogeneous graph neural networks, streets and alleys are divided into three levels: channels, segments, and interfaces. Subordinate relationship edges between channels and segments, sequential relationship edges between segments, and interaction relationship edges between segments and interfaces are established. Relationship-specific graph neural networks are used to encode the segment sequence context, and a workable design scheme is generated through a multi-objective optimization algorithm.

Benefits of technology

It achieves an end-to-end closed loop from streetscape vitality assessment to design scheme, which can effectively guide interface optimization decisions in historical districts, reduce the risk of over-commercialization or openness caused by single-objective optimization, and adapt to the planning needs of different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178903A_ABST
    Figure CN123178903A_ABST
Patent Text Reader

Abstract

The present application is suitable for the technical field of spatial data analysis and graph neural network, and provides a traditional street and alley roaming vitality characterization and multi-objective optimization method based on a heterogeneous graph neural network, which acquires street and alley multi-source data, divides street and alley objects into three levels of channels, segments and interfaces, establishes three types of relationship edges to form a heterogeneous graph, performs message passing and encodes segment sequential context through a relationship-specific graph neural network, outputs a roaming vitality proxy prediction value, extracts segment graph embedding for clustering to identify spatial types, takes interface types and enclosure features as decision variables, jointly optimizes roaming vitality, path guidance degree and semantic inclination degree under protection constraints, and outputs an interface update candidate scheme. The present application uniformly maps continuous walking experience, spatial relationship and path context to a graph structure, and is suitable for historical block micro-updating and scenic tour line organization scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of spatial data analysis and graph neural network technology, specifically to a traditional street and alleyway activity representation and multi-objective optimization method based on heterogeneous graph neural networks. Background Technology

[0002] The evaluation and optimization of the vitality of traditional streets, historical districts, and various continuous pedestrian spaces is an important issue in urban and rural planning, heritage protection, and tourism management. Existing methods for evaluating street vitality or pedestrian experience typically begin by organizing each spatial unit into a single table of data, then using methods such as linear regression, random forest, XGBoost, multilayer perceptron, or SHAP to analyze the relationship between variables such as width, sky visibility, functional mix, and commercial proportion and the vitality score. While this approach can handle the static attributes of individual spatial units, it weakens the relationships between adjacent segments, interface hierarchies, and walking order as independent variables, making it difficult to express the complex topological, adjacency, and hierarchical relationships between spatial objects. Another type of existing approach uses spatial syntax, visibility analysis, or street view image semantic segmentation to quantitatively analyze path connectivity, visibility depth, sky visibility, and interface elements. This type of approach can provide geometric or visual indicators, but its output often remains at the diagnostic level, lacking a unified data structure that directly feeds the evaluation model back into spatial element modification and multi-objective optimization, making it difficult to translate evaluation conclusions into actionable design solutions. Existing general technologies also include isomorphic graph convolution, GraphSAGE, graph attention network, heterogeneous graph neural network, recurrent neural network and NSGA-II multi-objective evolutionary algorithm. These algorithms can be used for neighborhood information aggregation, sequence modeling or multi-objective search, respectively. However, existing solutions have not yet formed an integrated process for object hierarchical, relational encoding, vitality agent evaluation, spatial type diagnosis and interface multi-objective optimization for continuous street and alley roaming.

[0003] Existing technical solutions include research on heterogeneous graph attention networks, which proposes a heterogeneous graph attention network and sets independent attention mechanisms for different types of nodes and relationships; research on identifying street vitality visual features based on street view image convolutional neural networks, which uses convolutional neural networks to extract visual features from street view images and establish a mapping relationship with street vitality; and research on the nonlinear relationship between built environment and urban vitality based on interpretable machine learning analysis, which uses interpretable machine learning methods to reveal the nonlinear relationship between built environment elements and urban vitality. These solutions provide technical foundations for heterogeneous graph neural networks, street view image feature extraction, and interpretable analysis of the built environment, but none of them involve a complete process for encoding spatial objects and their relationships in a continuous pedestrian environment into a heterogeneous graph and performing roaming vitality proxy prediction and multi-objective optimization. Overall, existing technical solutions lack an intermediate data structure that can simultaneously accommodate heterogeneous spatial objects, different relationship types, path sequences, and operable interface variables, resulting in a lack of a closed loop between "data collection—experience evaluation—solution generation," making it difficult for the results of street view vitality evaluation to effectively guide interface optimization decisions in the renewal of historical districts.

[0004] Therefore, in view of the above situation, there is an urgent need to provide a traditional street and alleyway activity representation and multi-objective optimization method based on heterogeneous graph neural networks to overcome the shortcomings in current practical applications. Summary of the Invention

[0005] The purpose of this invention is to provide a traditional street and alleyway activity representation and multi-objective optimization method based on heterogeneous graph neural networks, which effectively solves the problems in the background technology mentioned above.

[0006] This invention is implemented as follows: a traditional street and alleyway activity representation and multi-objective optimization method based on heterogeneous graph neural networks, comprising:

[0007] S1, acquire street and alley network data, spatial geometry data, human viewpoint image data, interface element data, functional semantic data and perception evaluation data of the target area;

[0008] S2 divides the target streets and alleys into three levels: passage, segment, and interface;

[0009] S3, calculate the feature data of each layer node, establish the subordinate relationship edge between channel and segment, the order relationship edge between segment and segment, and the interaction relationship edge between segment and interface to form a heterogeneous graph;

[0010] S4 uses fragment nodes with perceptual ratings as supervised samples, employs a relation-specific graph neural network to perform message passing on the heterogeneous graph, and encodes the fragment order context to train a roaming vitality agent predictor, outputting the roaming vitality agent prediction value of the fragment.

[0011] S5: Extract the graph embedding of the fragment nodes, identify the spatial type through clustering, and locate the fragment to be optimized;

[0012] S6. Set the interface type and enclosure features as decision variables, keep the main road network and immutable protection elements unchanged, and use roaming vitality, path guidance degree and semantic tendency as optimization objectives to search for non-dominated solution set using a multi-objective optimization algorithm.

[0013] S7 performs constraint verification and outputs the candidate solutions.

[0014] As a further aspect of the present invention: In step S2:

[0015] The passage is a linear spatial unit with continuous accessibility in the street and alley network; The segment is a local unit that is relatively continuous in terms of geometric shape and visual changes and belongs to the channel. The segment is divided based on the farthest visible point in the field of view, the geometric turning point of the path, the node space, the interface abrupt change point or the preset step size. The interface is a boundary unit that belongs to the segment and has an enclosing, visual, or functional effect on the walking experience. The segment boundary is divided into multiple interface elements by the geometric continuity of the building facade.

[0016] As a further aspect of the present invention: In step S3:

[0017] The subordinate relationship edge connects the channel node and the fragment node, and the edge attributes include the order within the channel and the belonging weight; The sequential relationship edges connect adjacent segment nodes within the same channel, and the edge attributes include distance, direction, order difference, and rotation angle. The interaction relationship connects the fragment node and the interface node, and the edge attributes include interface length, coverage ratio, interaction strength and relative orientation;

[0018] For cases where the same interface affects multiple fragments, multiple fragment-interface relationship edges are established and their corresponding edge attributes are recorded respectively.

[0019] As a further aspect of the present invention: In step S3:

[0020] The channel node records the channel identifier, path level, and overall connectivity. The fragment node records the fragment length, width, curvature, sky ratio, line-of-sight depth, and foreground occlusion. The sky rate is the number of sky category pixels in the semantic segmentation result divided by the total number of valid image pixels; The line-of-sight depth is the high-quantile statistical value of the depth of the forward region after excluding the sky. The foreground occlusion is the percentage of pixels in the central area of ​​the foreground whose depth value is less than a preset threshold. The interface node records the interface type, bottom edge length, vertical width, enclosed area, enclosed strength, navigation guidance, and native visibility.

[0021] As a further aspect of the present invention: In step S4, the method of using a relation-specific graph neural network to perform message passing on the heterogeneous graph is as follows:

[0022] For the k target node v For each type of relationship r Aggregate corresponding neighbor nodes u The representation of the node is then combined with the relation aggregation result and the node's own representation to obtain the next level node representation: ;

[0023] in, k Network layer index in non-negative integer form; v Let u be the target node and u be the neighboring node. r It is a relation type; For the target node v In the k Layer representation, For neighboring nodes u In the k Layer representation; To pass through relationships r With the target node v The set of connected neighboring nodes; To the neighbor node u Point to target node v Optional edge attributes; For relationship r The corresponding aggregation functions can be mean, weighted mean, max pooling, or attention aggregation; For the first k Hierarchical Relationship r After aggregation, the data is passed to the target node. v The message; For the first k The trainable weight matrix represented by each layer node itself. For the first k Hierarchical Relationship r The corresponding trainable weight matrix; For the first k Layer bias vector; σ It is a non-linear activation function; This indicates summing over all relation types.

[0024] As a further aspect of the present invention: the encoding segment order context method in step S4 is as follows:

[0025] Based on the actual browsing order of the segments within each channel, a segment embedding sequence is constructed: ;

[0026] in, i The number of segments within a single channel. For the first i The graph embedding is obtained by encoding a segment using a relation-specific graph neural network;

[0027] The sorted fragment embedding sequence is input into a bidirectional gated recurrent unit, and the fragment sequence is encoded along both the forward and reverse directions: ;

[0028] The hidden states in the two directions are concatenated to obtain the first... i Contextual representation of each fragment: ;

[0029] Embed the original image With context representation The enhanced fragment representation after fusion: ;

[0030] Will Inputting the regression prediction header yields the roaming vitality proxy prediction value: ;

[0031] in, This represents the segment augmentation representation after fusing graph structural information and sequence context information; Represents the regression prediction function; For the model to the first i Realistic perception score for each segment The prediction results.

[0032] As a further aspect of the present invention: In step S5:

[0033] Extract fragment node embeddings from the trained graph proxy predictor, and select the last layer message passing output, sequence fusion output, or a combination of both as clustering features;

[0034] After standardizing and reducing the dimensionality of the clustering features, spatial types are obtained using K-means, spectral clustering, hierarchical clustering, or density clustering.

[0035] For each type, statistics on wall interface ratio, sky ratio, secondary alleyway entrance ratio, public interface ratio, average width, roaming activity agent prediction value, path guidance degree, and semantic tendency degree are calculated to form a type profile.

[0036] As a further aspect of the present invention: In step S6:

[0037] The decision variables include the type of adjustable interface, enclosure strength, vertical width, and enclosure area;

[0038] Locking masks should be installed for historical facades, main road networks, structural components, and protected boundaries that cannot be altered;

[0039] The roaming guidance index (PGI) is defined as follows:

[0040] PGI=0.35·SLR+0.20·PIR+0.20·OSR+0.25·CD;

[0041] Wherein, SLR is the proportion of secondary alleyway entrances, PIR is the proportion of public interfaces, OSR is the proportion of open space, and CD is the connectivity.

[0042] The semantic tendency (SAI) is defined as follows:

[0043] SAI=TL, T=weighted_mean(TO) / 5, L=weighted_mean(NLV) / 5;

[0044] Where, weighted_mean represents the mean weighted by interface length, effect intensity, or the product of the two; TO is the tour guidance degree, and NLV is the native visibility;

[0045] The multi-objective optimization algorithm employs NSGA-II, NSGA-III, MOEA / D, particle swarm optimization, multi-objective Bayesian optimization, reinforcement learning, or enumeration search. The optimization objectives are to maximize SVP, ensure PGI is not lower than the baseline, and make SAI approach the target interval. The algorithm iteratively performs variable encoding, candidate generation, constraint repair, graph feature writing back, surrogate evaluation, non-dominated sorting, and crowding selection until the required number of iterations or convergence conditions are met.

[0046] This invention also provides a traditional street and alleyway activity representation and multi-objective optimization system based on heterogeneous graph neural networks, including:

[0047] The data access unit is used to acquire street and alley network data, spatial geometric data, human viewpoint image data, interface element data, functional semantic data, and perception evaluation data of the target area;

[0048] The object hierarchical unit is used to divide the target street into three levels: passage, segment, and interface.

[0049] Graph construction unit is used to calculate the feature data of nodes at each layer, establish the subordinate relationship edges between channels and segments, the order relationship edges between segments, and the interaction relationship edges between segments and interfaces, forming a heterogeneous graph;

[0050] The graph surrogate prediction unit is used to train a relation-specific graph neural network using fragment nodes with perceptual ratings as supervised samples, and to encode the fragment order context to obtain a roaming vitality surrogate predictor, which outputs the roaming vitality surrogate prediction value of the fragment.

[0051] The clustering diagnostic unit is used to extract the graph embedding of fragment nodes, identify spatial types through clustering, and locate fragments to be optimized.

[0052] The multi-objective optimization unit is used to set the interface type and enclosure features as decision variables, keep the main road network and immutable protection elements unchanged, and use roaming vitality, path guidance degree and semantic tendency as optimization objectives to search the non-dominated solution set using a multi-objective optimization algorithm;

[0053] The result output unit is used to perform constraint verification and output of candidate solutions.

[0054] As a further aspect of the present invention: the edge relationships established by the graph construction unit include: subordinate relationship edges connecting channel nodes and fragment nodes, sequential relationship edges connecting adjacent fragment nodes within the same channel, and interaction relationship edges connecting fragment nodes and interface nodes. The relation-specific graph neural network of the graph proxy prediction unit sets an independent trainable weight matrix for each relation type, and performs message passing and aggregation on channel dependency information, sequence context information and interface action information respectively. The multi-objective optimization unit takes the roaming vitality agent prediction value, path guidance degree and semantic tendency degree as three optimization objectives, performs constrained multi-objective search on the type, enclosure strength, vertical width and enclosure area of ​​the adjustable interface, and outputs the Pareto non-dominated solution set.

[0055] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention explicitly encodes channels, fragments, interfaces, and various relationships into a heterogeneous graph structure, reducing information loss caused by compressing complex spaces into single-row tables. This allows for the complete preservation and propagation of spatial topological relationships, adjacency relationships, and hierarchical relationships. Fragment sequential edges, together with the sequence encoder, characterize the preceding and following context, enabling spatial expansion and contraction, transitions, and path rhythms to be incorporated into the prediction model, overcoming the technical deficiency of single-point prediction failing to reflect temporal experience. Interface variables can be written back to the heterogeneous graph and re-inferred, directly generating candidate update schemes from diagnostic results, achieving an end-to-end closed loop from evaluation to design. Each candidate scheme is associated with clearly defined interface, fragment, and channel identifiers, allowing for viewing variable changes, target changes, and the scope of impact, meeting the interpretability requirements of planning reviews. Simultaneously considering vitality, path guidance, and living / tourism semantics, a constrained multi-objective search is employed to output non-dominated schemes, reducing the risk of over-commercialization or over-openness caused by single-objective optimization. Through cross-validation, early stopping, relationship ablation, and surrogate model mechanisms, overfitting is effectively controlled and information gain is compared when field samples are limited. By locking variables and constraining the magnitude of changes, the main road network and historical elements can be protected. Extended constraints such as cost, reversibility, and resident acceptance can also be added to adapt to different application scenarios.

[0056] Experiments show that after introducing the interface enclosure relationship attribute in the embodiments, the HeteroSAGE model achieves MAE=0.351 and R in leave-one-out cross-validation. 2 =0.581; the model incorporating segment sequence context achieved a MAE of 0.507 in channel-wise leave-out validation; the joint model of interface features and sequence context achieved a more balanced result (LOOCV MAE = 0.355, LCO-CV MAE = 0.536). After multi-objective optimization, compared with the baseline mean SVP = 3.263, PGI = 0.195, and SAI = -0.497, the candidate solutions achieved SVP of 3.306-3.319, PGI of 0.209-0.234, and SAI of -0.436 to -0.376, all showing effective improvement. The above experiments show that interface relationships can improve local fitting, segment sequence context can improve cross-channel generalization, and multi-objective optimization can form a trade-off front without changing the main road network. Attached Figure Description

[0057] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0058] Figure 1A schematic diagram illustrating the background relationship between the material form, sensory experience, behavioral response, and vitality outcome of traditional streets and alleys; Figure 2 A schematic diagram illustrating the three-layer spatial objects of channel, fragment, and interface, and their conceptual relationships; Figure 3 This is a schematic diagram of the channel nodes, fragment nodes, interface nodes, and heterogeneous relationship structure. Figure 4 A flowchart for the overall process of evaluating the vitality of street and alleyway roaming and optimizing multiple objectives based on heterogeneous graphs; Figure 5 A schematic diagram of the construction of channel nodes, segment nodes, interface nodes, and relation edges for a traditional village instance; Figure 6 A schematic diagram illustrating the design of a graph neural network baseline, heterogeneous attribute ablation, and sequence context enhancement model; Figure 7 This is a schematic diagram showing the segment characteristics, target indicators, and Pareto optimization results of the connecting passages of streets A and B in a certain location. Figure 8 for Figure 7 Local magnification Figure 1 ; Figure 9 for Figure 7 Local magnification Figure 2 ; Figure 10 This is a schematic diagram illustrating three representative interface update schemes in a certain local implementation: activity-first, guidance-first, and tour semantic enhancement. Figure 11 for Figure 10 Local magnification Figure 1 ; Figure 12 for Figure 10 Local magnification Figure 2 . Detailed Implementation

[0059] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0060] The present invention will be further explained below with reference to specific embodiments.

[0061] This invention uses heterogeneous graphs as a unified carrier of multi-source spatial information, representing the overall path, mesoscopic experience unit, and local update object as channel nodes, fragment nodes, and interface nodes, respectively; it uses relationship-specific message passing to calculate fragment embedding, and combines fragment order to form a roaming vitality proxy evaluation; then it uses graph embedding clustering to diagnose spatial type, and writes the adjustable interface attributes back to the heterogeneous graph, generating candidate solutions through multi-objective optimization.

[0062] Please see Figures 1-12 ,in, Figure 2 It illustrates three levels: village area, path, and node, as well as the subordinate, inheritance, and generative relationships between channels, segments, interfaces, and related spatial concepts. Figure 3 In the diagram, COR, SEG, and INT represent channel, fragment, and interface nodes, respectively; the blue, red, and orange lines represent channel-fragment, fragment-fragment, and fragment-interface relationships, respectively. Figure 6 The diagram shows how the model, through isomorphic baselines, interface attribute ablation, and fragment sequence enhancement comparisons, validates the contribution of different relational information to prediction. Figure 8 The following is an embodiment of this method. The optimized representative solution displays the adjustment position, adjustment type and target changes using interface ID and fragment ID as indexes, which is convenient for designers to review.

[0063] The traditional street and alleyway activity representation and multi-objective optimization method based on heterogeneous graph neural networks provided in this invention includes:

[0064] S1, acquire street and alley network data, spatial geometry data, human viewpoint image data, interface element data, functional semantic data and perception evaluation data of the target area;

[0065] S2 divides the target streets and alleys into three levels: passage, segment, and interface;

[0066] S3, calculate the feature data of each layer node, establish the subordinate relationship edge between channel and segment, the order relationship edge between segment and segment, and the interaction relationship edge between segment and interface to form a heterogeneous graph;

[0067] S4 uses fragment nodes with perceptual ratings as supervised samples, employs a relation-specific graph neural network to perform message passing on the heterogeneous graph, and encodes the fragment order context to train a roaming vitality agent predictor, outputting the roaming vitality agent prediction value of the fragment.

[0068] S5: Extract the graph embedding of the fragment nodes, identify the spatial type through clustering, and locate the fragment to be optimized;

[0069] S6. Set the interface type and enclosure features as decision variables, keep the main road network and immutable protection elements unchanged, and use roaming vitality, path guidance degree and semantic tendency as optimization objectives to search for non-dominated solution set using a multi-objective optimization algorithm.

[0070] S7 performs constraint verification and outputs the candidate solutions.

[0071] In a more specific example, spatial object layering and multi-source information acquisition:

[0072] 1. Division of Channels, Fragments, and Interfaces

[0073] A passageway is a linear spatial unit with continuous accessibility in a street and alley network, recording passageway identification, hierarchy, starting and ending directions, and overall connectivity. A segment, subordinate to a passageway, is a relatively continuous local unit in terms of geometric shape and visual changes; it can be divided along a path by the furthest visible point, obvious turning points, nodal spaces, interface abrupt changes, or a preset step length. An interface, subordinate to a segment, is a boundary unit on both sides and at the ends of a road that encloses, visually or functionally affects the walking experience; it includes building facades, courtyard walls, alleyway entrances, public space edges, open boundaries, and landscape interfaces.

[0074] After object partitioning, a globally unique identifier is assigned to each channel, segment, and interface, and the source data location, relationship, and sequential index along the channel are recorded. For cases where the same interface acts on multiple segments, multiple segment-interface relationship edges can be established, and the action length or action intensity can be recorded separately.

[0075] 2. Fragment geometry and forward-looking scene features

[0076] For each segment, the planar projection geometric midline length L, average width W, and midpoint curvature CV are calculated. Human viewpoint images are acquired along a preset roaming direction, and at least one keyframe is captured at the entry, middle, and exit positions; in one embodiment, five keyframes are captured for each segment. A semantic segmentation model is used to identify categories such as sky, buildings, roads, vegetation, and pedestrians. A monocular depth estimation model is used to obtain a depth map, and the sky ratio SOR, line-of-sight depth VDS, and foreground occlusion OIS are calculated. The visual features of each segment are shown in Table 1.

[0077] Table 1. Segment Visual Features ; 3. Interface geometry and semantic features

[0078] Based on the geometric continuity of the building facade, the segment boundary is decomposed into multiple interface elements. The interface vertices of the building's outer contour projection geometry are triangulated, and the interface base length (IL), vertical width (CW), and enclosed area (CA) are measured. The enclosure / effect intensity (CCR) is calculated based on the interface's coverage ratio relative to the segment, distance, or viewing angle. The interface type (IT) is classified and coded, and the visitor guidance degree (TO) and native visibility (NLV) are labeled according to a preset scale.

[0079] Interface types (IT) can at least include building facades, courtyard walls, side alley entrances, public space edges, and open boundaries; in practical applications, categories such as shop interfaces, resident entrances, waterfront interfaces, green space interfaces, and temporary shelters can be added. TO and NLV can use a 1-5 level scale, or the probabilities output by the classification model can be mapped to a uniform scale.

[0080] 4. Perceptual evaluation data

[0081] For segments with labeled conditions, obtain a roaming activity score P. Scoring dimensions may include visual experience, sense of direction, willingness to explore, feeling of oppression, willingness to stay and interact, and room for activity. Negative dimensions are scored inversely and then weighted or averaged. The perception score is only used for model training or calibration; during deployment, a proxy prediction value SVP can be directly output for unscored segments.

[0082] In a more specific example, the heterogeneous graph is constructed as follows:

[0083] Construct a heterogeneous graph G=(V,E,X), where V=V COR ∪V SEG ∪V INT , respectively representing the channel node set V COR Fragment node set V SEG and the set of interface nodes V INT X represents the attributes of each type of node and relationship; E includes at least the following relationship types and establishes a reverse edge for each relationship to support bidirectional message passing; refer to Table 2 for heterogeneous graph edge relationships.

[0084] Table 2 Definition of Edge Relationships in Heterogeneous Graphs ; Channel nodes can record channel ID, path level, and overall connectivity; segment nodes can record L, W, CV, SOR, VDS, OIS, and other geometric / visual features; interface nodes can record IT, IL, CCR, CW, CA, TO, and NLV. During training, P is used as the supervision label for segment nodes, and the target value is not used as the deployment input. Categorical features are encoded using one-hot encoding or trainable embeddings, and continuous features are standardized according to training set statistics; missing values ​​are handled using a missing value mask, preset values, or neighborhood statistics.

[0085] The attribute categories, value names, and assignment methods for channel nodes, fragment nodes, and interface nodes are shown in Table 3:

[0086] Table 3. Attribute Categories, Value Names, and Assignment Methods for Channel Nodes, Fragment Nodes, and Interface Nodes

[0087] In a more specific example, the roaming vitality map agent predicts:

[0088] Using the perceptual score P obtained from a field survey questionnaire as the supervision signal and regression target, a graph neural network is used to learn the mapping relationship between spatial features of fragments and perceptual evaluation, and the model output is defined as the spatial vitality perception prediction value SVP. The specific operation mode is as follows:

[0089] 1. Relationship-specific graph message passing

[0090] For the k target node v For each type of relationship r Aggregate corresponding neighbor nodes u The representation of the node is then combined with the relation aggregation result and the node's own representation to obtain the next level node representation. Its general form can be written as: ; ;

[0091] in, k Network layer index in non-negative integer form; v Let u be the target node and u be the neighboring node. r It is a relation type; For the target node v In the k Layer representation, For neighboring nodes u In the k Layer representation; To pass through relationships r With the target node v The set of connected neighboring nodes; To the neighbor node u Point to target node v Optional edge attributes; For relationship r The corresponding aggregation functions can be mean, weighted mean, max pooling, or attention aggregation; For the first k Hierarchical Relationship r After aggregation, the data is passed to the target node. v The message; For the first k The trainable weight matrix represented by each layer node itself. For the first k Hierarchical Relationship rThe corresponding trainable weight matrix; For the first k Layer bias vector; σ For nonlinear activation functions; ∑ r This represents the summation over all relation types. By using relation-specific parameters, the model can distinguish the different contributions of channel affiliation, fragment order, and interface effects to fragment vitality.

[0092] 2. Fragment Sequence Context Enhancement

[0093] After obtaining the fragment embeddings output by the heterogeneous graph model, the fragments are further sorted according to the actual browsing order within each channel to construct a fragment embedding sequence:

[0094] in, n The number of segments within a single channel. z i For the first i The graph embedding obtained after encoding the fragments using HeteroSAGE is as follows. This embedding integrates heterogeneous graph information such as fragment attributes, relationships between adjacent fragments, interface attributes, and channel hierarchy. However, it mainly reflects the local spatial features of the fragments in the graph structure and is still relatively limited in expressing the temporal dependencies between fragments during continuous browsing.

[0095] To further characterize the contextual relationships of segments in a continuous row view, the sorted segments are embedded into a sequence input to a Bidirectional Gated Recurrent Unit (BiGRU). The BiGRU encodes the segment sequence along both the forward and reverse directions: ;

[0096] And concatenate the hidden states in the two directions to obtain the first... i Contextual representation of each fragment: ;

[0097] In the formula, For the first i The forward hidden state of each segment is used to encode the cumulative information of its preceding visited segments; This is a backward-hidden state used to encode contextual information of its subsequent segments; and These represent the forward and backward GRU units, respectively; This indicates vector concatenation; This is a bidirectional contextual representation formed by integrating pre- and post-processing information.

[0098] To simultaneously preserve the graph structure features of the fragment itself and the sequence context during continuous exploration, the original graph is embedded... With context representation Further integration: ;

[0099] And represent the enhanced fragment Enter the regression prediction header: ;

[0100] In the formula, This represents the segment augmentation representation after fusing graph structural information and sequence context information; Represents the regression prediction function; For the model to the first i Realistic perception score for each segment The prediction results.

[0101] This sequence enhancement process enables the model to not only identify the spatial state of a segment itself, but also to consider its relative position and spatial changes within a continuous tour path. This allows the model to characterize the experiential rhythms of compression-release, turning-unfolding, and concealment-revealing formed by continuous spatial changes during the traditional village tour. Ultimately, HeteroSAGE extracts the spatial structural features of the segments and their heterogeneous neighborhoods, while BiGRU supplements the bidirectional contextual information in the continuous tour sequence. Together, they constitute the HeteroSAGE-BiGRU sequence enhancement model.

[0102] 3. Model Training and Validation

[0103] In practical implementation, the segment perception score P is used as the regression target, and mean squared error, mean absolute error, or a combination thereof are employed for training. Overfitting can be controlled using the Adam optimizer, weight decay, random deactivation, and early stopping mechanisms. For small sample data, leave-one-out cross-validation is preferred to test in-sample stability, and leave-out-of-channel validation is used to test cross-path generalization ability. Model selection metrics should include at least MAE, RMSE, and R-squared. 2 The loss function expression is: ;

[0104] In the formula, This represents the total loss during model regression training; N The number of segment samples used in training; For the first i The segments were obtained through real-world perception scores obtained from on-site surveys and questionnaires; This is the model's predicted score for the perceived value of this segment; This represents the set of learnable parameters in the model that are used during training. This is the L2 regularization coefficient. The first term of the formula uses the mean squared error to measure the model's predicted value. Compared with the actual survey value The deviation between them is addressed by the second term, which constrains the model parameter size through L2 regularization to reduce the risk of overfitting under small sample conditions.

[0105] In this embodiment, the Adam optimizer is used with a learning rate of 0.01 and a weight decay of 1×10⁻⁶. -4 Early termination was set. The baseline model was GraphSAGE, and the control models included GAT, MLP, and linear regression; the heterogeneous model used was HeteroSAGE, with an interface attribute ablation group and a HeteroSAGE-BiGRU sequence enhancement group. The specific models and parameters mentioned above can be replaced and are not required limitations.

[0106] In a more specific example, space type diagnosis:

[0107] Fragment node embeddings are extracted from the trained graph surrogate predictor. The last layer message passing output, sequence fusion output, or a combination of both can be used as clustering features. After standardization and dimensionality reduction of the features, K-means, spectral clustering, hierarchical clustering, or density clustering are used to obtain the spatial type. The number of clusters can be determined based on the silhouette coefficient, Calinski-Harabasz index, or design requirements.

[0108] For each type, statistical parameters such as wall interface ratio (WIR), sky ratio (SOR), secondary alleyway entrance ratio (SLR), public interface ratio (PIR), average width (W), SVP, PGI, and SAI are calculated to form a type profile. The example yields four types of segments: spatial compression, roaming guidance, transitional hybrid, and spatial release. These type names are explanatory labels and can be renamed according to other items.

[0109] In a more specific example, multi-target interface optimization:

[0110] 1. Decision variables, derived features, and protective constraints

[0111] The adjustable interface type (IT), enclosure strength (CCR), vertical width (CW), and enclosure area (CA) are set as decision variables. The secondary entrance ratio (SLR), public interface ratio (PIR), open space ratio (OSR), and connectivity (CD) of the segment layer are recalculated based on the interface adjustment results. Locking masks are set for unalterable historical facades, main road networks, structural components, and protection boundaries. Discrete candidate sets, upper and lower limits, variation ranges, implementation costs, or reversibility constraints are set for adjustable variables.

[0112] For each candidate solution generated, the modified interface node features and derived fragment features are written back to the heterogeneous graph. The graph surrogate predictor then recalculates the fragment SVP and aggregates it to the channel or project layer. This allows local interface changes to influence adjacent fragments and the overall path evaluation through graph relationships.

[0113] 2. Optimization Objectives

[0114] The first objective is the Roaming Vitality Proxy (SVP), which can be achieved using the target segment mean, channel-weighted mean, low-quantile segment boost, or a combination thereof. The second objective is the Roaming Guidance Index (PGI), defined in one embodiment as:

[0115] PGI=0.35·SLR+0.20·PIR+0.20·OSR+0.25·CD

[0116] Wherein, SLR is the proportion of secondary roadway entrances, PIR is the proportion of public interfaces, OSR is the proportion of open space, and CD is connectivity. Weights can be determined by expert settings, hierarchical analysis, data learning, or constraint optimization. The third objective is semantic tendency indicator (SAI).

[0117] SAI=TL,T=weighted_mean(TO) / 5,L=weighted_mean(NLV) / 5

[0118] Here, weighted_mean represents the mean weighted by interface length, effect intensity, or the product of the two; the denominator 5 is used to normalize the five-point scale. The positive and negative directions of SAI only indicate the relative tendency between tour guidance and native life visibility; in actual optimization, it can be set to the target interval rather than unidirectional maximization.

[0119] 3. Multi-objective solution and solution output

[0120] Candidate solutions are generated using NSGA-II, NSGA-III, MOEA / D, particle swarm optimization, multi-objective Bayesian optimization, reinforcement learning, or enumeration search. Taking SVP maximization, PGI not lower than the baseline, and SAI approaching the target interval as examples, the solver iteratively performs variable encoding, candidate generation, constraint repair, graph feature writing back, surrogate evaluation, non-dominated sorting, and crowding selection until the number of iterations or convergence conditions are reached.

[0121] The output module should provide at least the Pareto solution set, the target value for each solution, the change relative to the baseline, the involved interface IDs, the values ​​of variables before and after the changes, the affected segments and channels, the constraint satisfaction status, and a visualization layer. Users can select representative solutions based on their preferences, such as vitality-first, guidance-first, semantic balance, or cost-first approaches.

[0122] This invention also provides a traditional street and alleyway activity representation and multi-objective optimization system based on heterogeneous graph neural networks, including:

[0123] The data access unit is used to acquire street and alley network data, spatial geometric data, human viewpoint image data, interface element data, functional semantic data, and perception evaluation data of the target area;

[0124] The object hierarchical unit is used to divide the target street into three levels: passage, segment, and interface.

[0125] Graph construction unit is used to calculate the feature data of nodes at each layer, establish the subordinate relationship edges between channels and segments, the order relationship edges between segments, and the interaction relationship edges between segments and interfaces, forming a heterogeneous graph;

[0126] The graph surrogate prediction unit is used to train a relation-specific graph neural network using fragment nodes with perceptual ratings as supervised samples, and to encode the fragment order context to obtain a roaming vitality surrogate predictor, which outputs the roaming vitality surrogate prediction value of the fragment.

[0127] The clustering diagnostic unit is used to extract the graph embedding of fragment nodes, identify spatial types through clustering, and locate fragments to be optimized.

[0128] The multi-objective optimization unit is used to set the interface type and enclosure features as decision variables, keep the main road network and immutable protection elements unchanged, and use roaming vitality, path guidance degree and semantic tendency as optimization objectives to search the non-dominated solution set using a multi-objective optimization algorithm;

[0129] The result output unit is used to perform constraint verification and output of candidate solutions.

[0130] In a more specific example, the edge relationships established by the graph construction unit include: subordinate relationship edges connecting channel nodes and fragment nodes, sequential relationship edges connecting adjacent fragment nodes within the same channel, and interaction relationship edges connecting fragment nodes and interface nodes.

[0131] The relation-specific graph neural network of the graph proxy prediction unit sets an independent trainable weight matrix for each relation type, and performs message passing and aggregation on channel dependency information, sequence context information and interface action information respectively.

[0132] The multi-objective optimization unit takes the roaming vitality agent prediction value, path guidance degree and semantic tendency degree as three optimization objectives, performs constrained multi-objective search on the type, enclosure strength, vertical width and enclosure area of ​​the adjustable interface, and outputs the Pareto non-dominated solution set.

[0133] The present invention also includes an electronic device whose processor executes a program in its memory to implement the above-described method steps; and a computer-readable storage medium on which a program stored is executed by a processor to implement the above-described method. Heterogeneous graphs can be stored as PyTorch Geometric data objects, graph database records, adjacency lists, or other equivalent data structures.

[0134] Taking a connecting pedestrian walkway (approximately 825m in total length) formed by section A of the main street and section B of the stream in a traditional village as an example, the technical solution of the present invention will be further explained. However, the application scope of the method described in the present invention is not limited to this; its processing objects can also be extended to spaces with continuous paths and multiple interface relationships, such as historical and cultural blocks, campuses, gardens, scenic spots, commercial pedestrian streets, and complex indoor passages.

[0135] A continuous walking path of approximately 825m was selected, consisting of section A of the main street and section B of the stream-side street in an ancient village. Starting from the village entrance, the path was divided into 23 segments based on the farthest visible point and the geometric changes of the path. A multi-source information model was established using high-resolution satellite imagery, low-altitude aerial photography, on-site surveys, and handheld video. Five keyframes were extracted from each segment during the entry, middle, and exit phases. SegFormer was used for semantic segmentation, and Depth Anything V2 was used for monocular depth estimation. SOR, VDS, and OIS were calculated.

[0136] The interfaces on both sides of each segment are split and numbered according to geometric continuity, and IT, IL, CCR, CW, CA, TO, and NLV are recorded. Twenty tourist volunteers aged 18-35, with a 1:1 gender ratio, are recruited to wander along the AB path in the afternoon of spring. They rate the visual experience, sense of direction, willingness to explore, sense of oppression, willingness to stay and interact, and room for activity of the 23 segments on a five-level scale. The average value of each dimension is calculated to obtain the segment score P.

[0137] The above data was used to train GraphSAGE, HeteroSAGE, and HeteroSAGE-BiGRU models. After introducing the interface enclosure relationship attribute, the HeteroSAGE model achieved MAE=0.351 and R0.05 in leave-one-out cross-validation. 2 =0.581; the model with added fragment sequence context achieved the lowest MAE of 0.507 in the channel-wise leave-out validation; the joint model of interface features and sequence context achieved a more balanced result, LOOCV MAE=0.355 and LCO-CV MAE=0.536; the prediction performance comparison of each model is shown in Table 4.

[0138] Table 4 Comparison of Model Prediction Performance ; K-means clustering was performed on the 23-dimensional fragment embeddings to obtain four spatial fragment classes. A sequence augmentation model with balanced overall performance was used as the SVP surrogate evaluator. Using IT, CCR, CW, and CA as variables, 38 Pareto solutions were obtained through offline search using NSGA-II. Compared to the baseline mean SVP=3.263, PGI=0.195, and SAI=-0.497, the candidate solutions achieved SVPs of 3.306 to 3.319, PGIs of 0.209 to 0.234, and SAIs of -0.436 to -0.376. Representative schemes can be categorized into three types: vitality-first, guidance-first, and tour semantic augmentation. A comparison of multi-objective optimization results is shown in Table 5.

[0139] Table 5 Comparison of Multi-Objective Optimization Results ; The locations, sample size, number of keyframes, visual model, evaluation dimensions, network structure, training parameters, number of clusters, optimization algorithm, and target weights mentioned above are all examples. Any implementation that uses multi-layered heterogeneous spatial objects and their relationships for continuous roaming agent evaluation and employs an adjustable interface variable write-back graph model for multi-objective solution search falls under the equivalent implementation methods covered by this technical concept.

[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A traditional street and alleyway activity representation and multi-objective optimization method based on heterogeneous graph neural networks, characterized in that, include: S1, acquire street and alley network data, spatial geometric data, human viewpoint image data, interface element data, functional semantic data and perception evaluation data of the target area; S2 divides the target streets and alleys into three levels: passage, segment, and interface; S3, calculate the feature data of each layer node, establish the subordinate relationship edge between channel and segment, the order relationship edge between segment and segment, and the interaction relationship edge between segment and interface to form a heterogeneous graph; S4 uses fragment nodes with perceptual ratings as supervised samples, employs a relation-specific graph neural network to perform message passing on the heterogeneous graph, and encodes the fragment order context to train a roaming vitality agent predictor, outputting the roaming vitality agent prediction value of the fragment. S5: Extract the graph embedding of the fragment nodes, identify the spatial type through clustering, and locate the fragment to be optimized; S6. Set the interface type and enclosure features as decision variables, keep the main road network and immutable protection elements unchanged, and use roaming vitality, path guidance degree and semantic tendency as optimization objectives to search for non-dominated solution set using a multi-objective optimization algorithm. S7 performs constraint verification and outputs the candidate solutions.

2. The method according to claim 1, characterized in that, In step S2: The passage is a linear spatial unit with continuous accessibility in the street and alley network; The segment is a local unit that is relatively continuous in terms of geometric shape and visual changes and belongs to the channel. The segment is divided based on the farthest visible point in the field of view, the geometric turning point of the path, the node space, the interface abrupt change point or the preset step size. The interface is a boundary unit that belongs to the segment and has an enclosing, visual, or functional effect on the walking experience. The segment boundary is divided into multiple interface elements by the geometric continuity of the building facade.

3. The method according to claim 1, characterized in that, In step S3: The subordinate relationship edge connects the channel node and the fragment node, and the edge attributes include the order within the channel and the belonging weight; The sequential relationship edges connect adjacent segment nodes within the same channel, and the edge attributes include distance, direction, order difference, and rotation angle. The interaction relationship connects the fragment node and the interface node, and the edge attributes include interface length, coverage ratio, interaction strength and relative orientation; For cases where the same interface affects multiple fragments, multiple fragment-interface relationship edges are established and their corresponding edge attributes are recorded respectively.

4. The method according to claim 1, characterized in that, In step S3: The channel node records the channel identifier, path level, and overall connectivity. The fragment node records the fragment length, width, curvature, sky ratio, line-of-sight depth, and foreground occlusion. The sky rate is the number of sky category pixels in the semantic segmentation result divided by the total number of valid image pixels; The line-of-sight depth is the high-quantile statistical value of the depth of the forward region after excluding the sky. The foreground occlusion is the percentage of pixels in the central area of ​​the foreground whose depth value is less than a preset threshold. The interface node records the interface type, bottom edge length, vertical width, enclosed area, enclosed strength, navigation guidance, and native visibility.

5. The method according to claim 1, characterized in that, In step S4, the method of using a relation-specific graph neural network to pass messages through heterogeneous graphs is as follows: For the k target node v For each type of relationship r Aggregate corresponding neighbor nodes u The representation of the node is then combined with the relation aggregation result and the node's own representation to obtain the next level node representation: ; in, k Network layer index in non-negative integer form; v Let u be the target node and u be the neighboring node. r It is a relation type; For the target node v In the k Layer representation, Neighboring nodes u In the k Layer representation; To pass through relationships r With the target node v The set of connected neighboring nodes; To the neighbor node u Point to target node v Optional edge attributes; For relationship r The corresponding aggregation functions can be mean, weighted mean, max pooling, or attention aggregation; For the first k Hierarchical Relationship r After aggregation, the data is passed to the target node. v The message; For the first k The trainable weight matrix represented by each layer node itself. For the first k Hierarchical Relationship r The corresponding trainable weight matrix; For the first k Layer bias vector; σ It is a non-linear activation function; This indicates summing over all relation types.

6. The method according to claim 1, characterized in that, The encoding segment order context method described in step S4 is as follows: Based on the actual browsing order of the segments within each channel, a segment embedding sequence is constructed: ; in, i The number of segments within a single channel. For the first i The graph embedding is obtained by encoding a segment using a relation-specific graph neural network; The sorted fragment embedding sequence is input into a bidirectional gated recurrent unit, and the fragment sequence is encoded along both the forward and reverse directions: ; The hidden states in the two directions are concatenated to obtain the first... i Contextual representation of each fragment: ; Embed the original image With context representation The enhanced fragment representation after fusion: ; Will Inputting the regression prediction header yields the roaming vitality proxy prediction value: ; in, This represents the segment augmentation representation after fusing graph structural information and sequence context information; Represents the regression prediction function; For the model to the first i Realistic perception score for each segment The prediction results.

7. The method according to claim 1, characterized in that, In step S5: Extract fragment node embeddings from the trained graph proxy predictor, and select the last layer message passing output, sequence fusion output, or a combination of both as clustering features; After standardizing and reducing the dimensionality of the clustering features, spatial types are obtained using K-means, spectral clustering, hierarchical clustering, or density clustering. For each type, statistics on wall interface ratio, sky ratio, secondary alleyway entrance ratio, public interface ratio, average width, roaming activity agent prediction value, path guidance degree, and semantic tendency degree are calculated to form a type profile.

8. The method according to claim 1, characterized in that, In step S6: The decision variables include the type of adjustable interface, enclosure strength, vertical width, and enclosure area; Locking masks should be installed for historical facades, main road networks, structural components, and protected boundaries that cannot be altered; The roaming guidance index (PGI) is defined as follows: PGI=0.35·SLR+0.20·PIR+0.20·OSR+0.25·CD; Wherein, SLR is the proportion of secondary alleyway entrances, PIR is the proportion of public interfaces, OSR is the proportion of open space, and CD is the connectivity. The semantic tendency (SAI) is defined as follows: SAI=TL, T=weighted_mean(TO) / 5, L=weighted_mean(NLV) / 5; Where, weighted_mean represents the mean weighted by interface length, effect intensity, or the product of the two; TO is the tour guidance degree, and NLV is the native visibility; The multi-objective optimization algorithm employs NSGA-II, NSGA-III, MOEA / D, particle swarm optimization, multi-objective Bayesian optimization, reinforcement learning, or enumeration search. The optimization objectives are to maximize SVP, ensure PGI is not lower than the baseline, and make SAI approach the target interval. The algorithm iteratively performs variable encoding, candidate generation, constraint repair, graph feature writing back, surrogate evaluation, non-dominated sorting, and crowding selection until the required number of iterations or convergence conditions are met.

9. A traditional street and alleyway activity representation and multi-objective optimization system based on heterogeneous graph neural networks, characterized in that, include: The data access unit is used to acquire street and alley network data, spatial geometric data, human viewpoint image data, interface element data, functional semantic data, and perception evaluation data of the target area; The object hierarchical unit is used to divide the target street into three levels: passage, segment, and interface. Graph construction unit is used to calculate the feature data of nodes at each layer, establish the subordinate relationship edges between channels and segments, the order relationship edges between segments, and the interaction relationship edges between segments and interfaces, forming a heterogeneous graph; The graph surrogate prediction unit is used to train a relation-specific graph neural network using fragment nodes with perceptual ratings as supervised samples, and to encode the fragment order context to obtain a roaming vitality surrogate predictor, which outputs the roaming vitality surrogate prediction value of the fragment. The clustering diagnostic unit is used to extract the graph embedding of fragment nodes, identify spatial types through clustering, and locate fragments to be optimized. The multi-objective optimization unit is used to set the interface type and enclosure features as decision variables, keep the main road network and immutable protection elements unchanged, and use roaming vitality, path guidance degree and semantic tendency as optimization objectives to search the non-dominated solution set using a multi-objective optimization algorithm; The result output unit is used to perform constraint verification and output of candidate solutions.

10. The system according to claim 9, characterized in that, The edge relationships established by the graph construction unit include: subordinate relationship edges connecting channel nodes and fragment nodes, sequential relationship edges connecting adjacent fragment nodes within the same channel, and interaction relationship edges connecting fragment nodes and interface nodes. The relation-specific graph neural network of the graph proxy prediction unit sets an independent trainable weight matrix for each relation type, and performs message passing and aggregation on channel dependency information, sequence context information and interface action information respectively. The multi-objective optimization unit takes the roaming vitality agent prediction value, path guidance degree and semantic tendency degree as three optimization objectives, performs constrained multi-objective search on the type, enclosure strength, vertical width and enclosure area of ​​the adjustable interface, and outputs the Pareto non-dominated solution set.