Urban travel simulation method, system and device based on functional area probability

By refining the road framework and introducing dynamic direction preferences and access penalty coefficients, the urban travel simulation method solves the problems of high path randomness and failure to reflect functional area differences in the random walk model, generating a highly reliable traffic heat map distribution to support urban planning and traffic optimization.

CN122346992APending Publication Date: 2026-07-07ZHEJIANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2026-05-29
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing random walk models lack directional preferences in path selection during urban travel simulations, fail to reflect functional zone differences, struggle to generate highly reliable traffic heatmaps, and cannot reflect real urban activity patterns.

Method used

The urban travel simulation method based on functional zone probability generates paths that conform to urban travel characteristics by refining the road skeleton, introducing a local dynamic weighted random search algorithm with dynamic direction preferences and access penalty coefficients, and statistically analyzing the frequency of passage to form a heat map.

Benefits of technology

It significantly improves the rationality and realism of the simulation path, accurately reflects the traffic intensity and commuter corridors of different functional areas, and enhances the interpretability and planning application value of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122346992A_ABST
    Figure CN122346992A_ABST
Patent Text Reader

Abstract

The application discloses a kind of city travel simulation method, system and equipment based on functional area probability.The application builds end travel model, comprehensively considers the spatial distance of node and target position and direction attenuation weight in node selection process, simultaneously, dynamic direction preference and cycle inhibition mechanism are integrated, so that simulation path presents obvious target orientation on the whole;The application is based on the refinement processing of neighborhood topology maintenance, extracts single-pixel-wide road skeleton, provides high-quality basic data for node identification and clustering optimization, solves the problem that traditional refinement method is prone to cause skeleton fracture or morphological distortion;The application sets the probability distribution of starting point and end point using functional zoning characteristics, combines the traffic frequency statistics and heat visualization processing of multiple simulations, obtains the city travel heat distribution reflecting the traffic intensity and main commuting corridor between different functional areas, and provides accurate data support for urban planning, traffic organization and building environment optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of urban traffic simulation and spatial data analysis technology, and more specifically, relates to an urban travel simulation method, system and equipment based on functional zone probability. Background Technology

[0002] With the acceleration of urbanization, the flow of people between functional areas such as residential areas, commercial areas, office areas, and public service areas within cities is becoming increasingly frequent, forming a complex travel network structure. In the absence of accurate survey data, how to simulate urban population movement patterns through computational models is a key issue in the fields of urban planning and transportation research.

[0003] Currently, urban travel simulations mostly employ random walk models. These models assume that individuals move randomly between adjacent nodes in an urban road network with a certain probability, simulating the overall travel distribution by overlaying and statistically analyzing a large number of individual trajectories. While simple to implement and capable of reflecting road connectivity and spatial accessibility, these models have the following significant limitations:

[0004] 1. The path selection lacks directional preference and fails to reflect the behavioral characteristics of people "moving towards their destination," easily generating invalid trajectories that do not match the real road network;

[0005] 2. The differences between functional zones were not considered, and all nodes were given an equal probability of access, which failed to reflect the impact of different functional areas on travel behavior.

[0006] 3. The simulation results only reflect structural accessibility and lack behavioral interpretability, making them difficult to use for extrapolating real urban activity patterns.

[0007] Therefore, there is an urgent need for an urban travel simulation method that combines urban functional zone division information, reflects the preference of purposeful travel directions, and can generate highly reliable traffic heat distribution, so as to efficiently simulate the movement patterns of urban populations and provide support for the study of the correlation between transportation networks and the built environment. Summary of the Invention

[0008] This invention aims to overcome the technical shortcomings of existing random walk models in urban travel simulation, such as high path randomness, lack of travel purpose, and inability to reflect the impact of functional zones on population flow. It provides an urban travel simulation method, system, and device based on functional zone probability to simulate the purposeful travel behavior of people between different functional zones, generate highly reliable traffic heat maps consistent with real traffic distribution characteristics, and provide accurate data support for urban planning, traffic organization, and built environment optimization.

[0009] According to a first aspect of this specification, a method for simulating urban travel based on functional zone probabilities is provided, the method comprising the following steps:

[0010] Step 1: Obtain the city road map and the heat map of the city functional areas and preprocess them to obtain the standardized road matrix and the gray-scale matrix of the functional areas;

[0011] Step 2: Based on the grayscale range of the urban functional area heat map, set the classification threshold, map the urban spatial pixels to the preset functional categories, and generate a functional area label matrix;

[0012] Step 3: Perform binarization and neighborhood topology preservation on the standardized road matrix to obtain a single-pixel wide road skeleton matrix; identify road intersections and endpoints to form an initial node set; use a distance clustering algorithm to merge redundant nodes and output the road node set;

[0013] Step 4: Establish category-level start and end point sampling parameters, including the start point category prior probability vector and Markov category transition probability matrix, and sample the start point category and end point category. Select specific start and end points in the corresponding node subset and output valid start and end point pairs.

[0014] Step 5: With effective origin-destination pairs as the target, a local dynamic weighted random search algorithm that introduces dynamic direction preference coefficients and dynamic access penalty coefficients is used on the set of road nodes to generate a path that conforms to the characteristics of urban travel.

[0015] Step 6: Statistically analyze the path set obtained from multiple path simulations, accumulate the access frequency corresponding to each node to form a traffic frequency matrix, and perform neighborhood smoothing and interpolation processing to obtain the city traffic heat map.

[0016] Furthermore, the refinement process for preserving the neighborhood topology includes:

[0017] For any foreground pixel, its 8 neighboring pixels are defined to form a ring sequence in a clockwise direction; for all foreground pixels in the road binary matrix, the boundary pixel deletion operation is performed alternately in two sub-iterations;

[0018] Sub-iteration I: If the following conditions are met simultaneously: the number of foreground pixels in the neighborhood is [2,6]; the number of 0→1 state transitions in the ring sequence is 1; the product of the values ​​of the neighboring pixels in the up, right, and down directions is 0, and the product of the values ​​of the neighboring pixels in the right, down, and left directions is 0; then the pixel mark is deleted.

[0019] Sub-iteration II: After completing sub-iteration I and updating the road binary matrix, for the remaining foreground pixels, if the following conditions are met simultaneously: the number of neighboring foreground pixels is [2,6]; the number of 0→1 state transitions in the ring sequence is 1; the product of the values ​​of the neighboring pixels in the up, right, and left directions is 0, and the product of the values ​​of the neighboring pixels in the up, down, and left directions is also 0; then the pixel is marked as deleted.

[0020] When no pixel satisfies the deletion condition in two consecutive sub-iterations, the iteration process stops, and the final road skeleton matrix is ​​output.

[0021] Furthermore, in step 4, based on the characteristics of personnel flow in urban functional areas, a prior probability vector of the starting point category and a Markov category transition probability matrix are set; the prior probability vector of the starting point category represents the prior probability distribution of each functional area as the starting point category; each row of the Markov category transition probability matrix represents the conditional probability distribution of the destination falling into each functional area category under the condition that the starting point belongs to the corresponding functional area category.

[0022] Furthermore, step 5 specifically includes:

[0023] For each candidate node in the neighborhood of the current iteration node, calculate its distance to the endpoint, and combine the dynamic direction preference coefficient, dynamic access penalty coefficient and access status identifier to construct a comprehensive transfer weight and normalize it to obtain the next node selection probability. The next iteration node is determined by random sampling according to this probability.

[0024] The node selection process is repeated from the starting point until the current node becomes the endpoint, or the path length reaches the maximum number of steps, or all candidate nodes in the neighborhood of the current iteration node are infeasible or the corresponding comprehensive transition weight is zero, at which point path generation is terminated.

[0025] Furthermore, the dynamic direction preference coefficient is used to control the strength of the path's convergence towards the endpoint, and its dynamic update process specifically involves: calculating the normalized remaining distance from the current iteration node to the endpoint. Dynamic directional preference coefficient Adaptive adjustment based on remaining distance: ,in These are the lower and upper limits of the directional preference coefficient, respectively. The exponential parameter of the adjustment curve is used to control the rate of change of preference intensity with the remaining distance.

[0026] Furthermore, the dynamic access penalty coefficient is used to suppress path loops in local nodes, and its dynamic update is achieved by a weighted fusion of the step enhancement term and the loop risk term;

[0027] Steps Enhancement The penalty intensity increases with the number of steps: ,in The current step number. The maximum number of steps to generate for a single path. These are the lower and upper limits of the access penalty coefficient, respectively;

[0028] Cyclic risk item Increase penalty intensity as path repetition increases: ,in The cyclical risk factor for the current path, This is the cyclic risk sensitivity coefficient, used to control the degree to which the intensity of punishment responds to cyclic risk.

[0029] According to a second aspect of this specification, a city travel simulation system based on functional zone probability is provided. This system is used to implement the city travel simulation method described in the first aspect. The system includes:

[0030] Image preprocessing module: acquires and preprocesses urban road maps and urban functional area heat maps to obtain standardized road matrices and functional area grayscale matrices;

[0031] Urban Functional Semantic Quantification Input Module: Based on the grayscale range of the urban functional area heat map, a classification threshold is set, and urban spatial pixels are mapped to preset functional categories to generate a functional area label matrix;

[0032] Urban road network refinement and road node generation module: Performs binarization and neighborhood topology preservation refinement processing on the standardized road matrix to obtain a single-pixel wide road skeleton matrix; identifies road intersections and endpoints to form an initial node set; uses a distance clustering algorithm to merge redundant nodes and outputs a road node set;

[0033] The start-end point sampling module based on functional area constraints: establishes category-level start-end point sampling parameters, samples the start point category and end point category, selects specific start points and end points in the corresponding node subsets, and outputs valid start-end point pairs;

[0034] Path generation module: Taking effective origin-destination pairs as the target, it uses a local dynamic weighted random search algorithm that introduces dynamic direction preference coefficients and dynamic access penalty coefficients on the set of road nodes to generate paths that conform to the characteristics of urban travel.

[0035] The city traffic heat map generation module: statistically analyzes the path set obtained from multiple path simulations, accumulates the access frequency corresponding to each node, forms a traffic frequency matrix, and performs neighborhood smoothing and interpolation processing to obtain the city traffic heat map.

[0036] According to a third aspect of this specification, an electronic device is provided, including a memory and a processor, the memory being coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the urban travel simulation method as described in the first aspect.

[0037] According to a fourth aspect of this specification, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the urban travel simulation method as described in the first aspect.

[0038] According to a fifth aspect of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the urban travel simulation method as described in the first aspect.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] 1. Existing technologies lack directional preference control during the path selection stage, causing simulated individuals to move randomly within the urban road network. This fails to reflect the behavioral characteristics of people "moving towards their destination" and easily generates invalid trajectories that do not match the real road network. This invention constructs an Origin-Destination (OD) travel model, comprehensively considering the spatial distance and directional attenuation weights between nodes and target locations during node selection. It also incorporates dynamic directional preference and cyclic suppression mechanisms, enabling the simulated path to exhibit clear target orientation globally. This mechanism effectively reduces invalid detours and local drift, significantly improving the rationality of the simulated path and its consistency with real-world travel behavior.

[0041] 2. Existing technologies typically fail to consider differences in urban functional zoning and lack sufficient accuracy in road skeleton extraction, making it difficult to accurately support subsequent node matching and path generation. This invention utilizes a single-pixel-wide road refinement algorithm (based on a two-iteration stripping logic that preserves neighborhood topology) to extract accurate single-pixel-wide road skeletons while retaining the road network connectivity topology. This provides high-quality foundational data for node identification (intersections, endpoints) and clustering optimization, solving the problem of skeleton breakage or morphological distortion that traditional refinement methods easily lead to, and improving the accuracy of road network modeling.

[0042] 3. Existing simulation results only reflect structural accessibility and lack the ability to explain travel behavior, making them difficult to use for the deduction and analysis of real urban activity patterns. This invention deeply couples the OD travel model with functional zone probabilities, uses the functional zoning characteristics of aerial heat maps to set the origin-destination probability distribution, and combines multiple simulations of traffic frequency statistics and heat map visualization processing to obtain the urban travel heat distribution reflecting the traffic intensity of different functional zones and major commuter corridors. This result can not only reflect the accessibility structure of the road network, but also reveal the directional preferences and behavioral patterns of people's activities in urban space, significantly enhancing the interpretability and planning application value of the model. Attached Figure Description

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

[0044] Figure 1 A flowchart illustrating an exemplary urban travel simulation method;

[0045] Figure 2 An original urban road map shown as an exemplary embodiment;

[0046] Figure 3 A heat map of urban functional areas is shown as an exemplary embodiment.

[0047] Figure 4 A schematic diagram of a road skeleton with a thinned single-pixel width, as shown in an exemplary embodiment;

[0048] Figure 5 A generated urban traffic heatmap is shown as an exemplary embodiment.

[0049] Figure 6 A schematic diagram of the structure of an urban travel simulation system as an exemplary embodiment is shown.

[0050] Figure 7 This is a schematic diagram of the structure of an electronic device as an exemplary embodiment. Detailed Implementation

[0051] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0052] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0053] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0054] This embodiment uses the original urban road map and urban functional area heat map as basic data. It addresses the technical problems of existing random walk models in urban travel simulation, such as strong path randomness, lack of travel purpose, and failure to reflect the impact of functional areas on travel behavior. The present invention implements the urban travel simulation method based on functional area probability.

[0055] This embodiment preprocesses urban road maps and urban functional area heat maps, classifies functional areas based on grayscale features, establishes category-level OD sampling parameters, completes origin-destination sampling, generates travel routes through a direction preference weighting algorithm, and finally statistically analyzes the frequency of route travel to obtain an urban traffic heat map, thereby achieving accurate simulation of the purposeful travel behavior of urban populations.

[0056] like Figure 1 As shown in the figure, the specific implementation steps of the urban travel simulation method based on functional area probability provided in this embodiment are as follows:

[0057] Step 1: Obtain two types of core spatial data: urban road map (representing the range of passable space) and urban functional area heat map (representing the semantics of functional zoning). After preprocessing, obtain the standardized road matrix and functional area grayscale matrix.

[0058] Specifically, the city road map is created by capturing urban road network images using drone aerial photography. After image binarization and filtering, the navigable areas of the city are clearly identified. Figure 2 As shown; the urban functional zone heat map is a manually annotated color functional zone distribution map, such as... Figure 3 As shown, the following settings are made in this embodiment, but not limited to: gray areas correspond to high-traffic areas such as commercial complexes, hospitals, stations, and tourist attractions; pink areas correspond to residential areas; purple areas correspond to office areas, schools, and public service institutions; and the remaining areas are low-traffic or undefined areas.

[0059] Specifically, the urban road map and urban functional area heat map are preprocessed by performing grayscale conversion, scale normalization, and noise filtering in sequence: converting the two types of color images into grayscale matrices to achieve a unified representation of image information; scaling the original resolution to 1 / 10 of the original size to improve computational efficiency while ensuring spatial accuracy meets simulation requirements; using a median filtering algorithm to remove isolated noise pixels in the image and eliminate errors caused by background interference; and finally outputting a standardized road matrix and functional area grayscale matrix as the basic data for subsequent processing.

[0060] Step 2: Based on the grayscale range of the urban functional zone heatmap, set a classification threshold to map urban spatial pixels to preset functional categories, generating a functional zone label matrix. The elements of this label matrix correspond to the functional category of each pixel, achieving quantitative input of urban functional semantics. Specifically:

[0061] Based on the functional area grayscale matrix output in step 1, classification thresholds are set according to preset grayscale ranges to accurately map urban spatial pixels into four preset functional categories: Category A (core activity zones, corresponding to commercial complexes, hospitals, stations, scenic spots, etc.), Category B (residential living zones), Category C (work and education zones, corresponding to office areas, schools, and public service institutions), and Category E (non-core zones, corresponding to low-activity, undefined areas). Specifically, the thresholds are set as follows: grayscale values ​​of 230–240 correspond to Category A functional areas, 210–230 to Category B functional areas, 180–210 to Category C functional areas, and the remaining grayscale values ​​to Category E functional areas.

[0062] According to the above classification rules, each pixel in the grayscale matrix of the functional area is assigned a unique corresponding functional category label to generate a functional area label matrix. The element values ​​of this matrix are directly related to the functional category of the pixel, realizing the standardized and quantitative input of urban functional semantics, and providing a clear semantic mapping basis for subsequent partition selection probability vector configuration and start-end weighted sampling.

[0063] Step 3: Perform binarization and neighborhood topology preservation refinement on the standardized road matrix to obtain a single-pixel wide road skeleton matrix; identify candidate nodes such as road intersections and endpoints through connectivity analysis to form an initial node set, which contains nodes corresponding to all potentially passable locations in the urban road network; use the Euclidean distance clustering algorithm to merge spatially similar redundant nodes, and output the optimized road node set. Specifically, it includes the following sub-steps:

[0064] Step 3.1: Perform binarization on the standardized road matrix output from Step 1 to generate a road binary matrix. The pixel value in the road area is 1, and the pixel value in the non-road area is 0.

[0065] Step 3.2: Process the road binary matrix A neighborhood-topology-preserving thinning process is performed, gradually stripping boundary pixels while retaining the core skeleton to obtain a single-pixel-wide road skeleton matrix. To ensure that the road connectivity topology remains intact, the specific implementation process is as follows:

[0066] 1. Neighborhood definition: For any foreground pixel... Define its 8 neighboring pixels as a clockwise circular sequence, represented as:

[0067]

[0068] in, to Corresponding to pixels Adjacent pixels in the top, top right, right, bottom right, bottom, bottom left, left, and top left directions.

[0069] 2. Number of foreground pixels in the neighborhood:

[0070]

[0071] in, The value is assigned to the neighboring pixels, with 1 representing the foreground and 0 representing the background, and is used to determine the local connectivity of the pixel.

[0072] 3. Number of 0→1 transitions: The number of 0→1 state transitions in a clockwise circular sequence is defined as:

[0073]

[0074] Among them, the regulations To form a closed-loop sequence, This is an indicator function. It takes the value 1 when the current pixel is 0 and the next pixel is 1, and otherwise takes the value 0. It is used to identify whether a pixel is an endpoint or boundary point of the road skeleton.

[0075] 4. Double-iteration deletion rule: For the road binary matrix For all foreground pixels with a value of 1, the boundary pixel deletion operation is performed alternately in two sub-iterations to avoid skeleton breakage or shape distortion caused by a single iteration.

[0076] Sub-iteration I: If the foreground pixel point Simultaneously satisfy:

[0077]

[0078]

[0079]

[0080]

[0081] Then the pixel marker will be deleted.

[0082] Sub-iteration II: After completing sub-iteration I and updating the road binary matrix Then, for the remaining foreground pixels... If the following conditions are met simultaneously:

[0083]

[0084]

[0085]

[0086]

[0087] Then the pixel marker will be deleted.

[0088] 5. Termination condition: When no pixel satisfies the deletion condition in two consecutive sub-iterations, the iteration process stops, and the final road skeleton matrix is ​​output.

[0089]

[0090] in, This indicates a refinement operation. The road skeleton matrix... The road centerline is a single pixel wide, preserving the connectivity of the original urban road network, such as... Figure 4 As shown.

[0091] Step 3.3: Based on the road skeleton matrix output in Step 3.2 By using connectivity analysis, candidate nodes such as road intersections and endpoints in the matrix are identified to form an initial node set. This initial node set contains nodes corresponding to all potentially passable locations in the urban road network, providing a foundation for subsequent node optimization.

[0092] Step 3.4: The initial node set is clustered and merged using the Euclidean distance clustering algorithm. A clustering distance threshold is set to control the node resolution (in this embodiment, the clustering distance threshold is set to 30 pixels). By merging spatially similar redundant nodes, redundant subsequent path calculations caused by repeated node identification are avoided. Finally, the optimized road node set is output. Each node represents a unique passable location in the urban road network, providing a node basis for subsequent start-end point selection and route generation.

[0093] Step 4: To reflect the differences in attractiveness of different functional categories to travel behavior and to characterize the "conditional influence of origin category on destination category", establish category-level OD sampling parameters, including the origin category prior probability vector. With Markov class transition probability matrix ;based on and Sampling to obtain the starting point category With End Category Select a specific starting point from the corresponding subset of nodes. and the finish line and constraints Output valid start and end point pairs Specifically, it includes the following sub-steps:

[0094] Step 4.1: Based on the functional categories obtained in Step 2, divide the urban space into four categories: Category A (Core Activity Zone), Category B (Residential Zone), Category C (Work and Education Zone), and Category E (Non-Core Zone); establish category-level OD sampling parameters, including:

[0095] 1. Prior probability vector of the starting category:

[0096]

[0097] in, The probability of travel corresponds to the four functional areas.

[0098] 2. Markov class transition probability matrix:

[0099]

[0100] in, This indicates that when the starting category is When, the endpoint category is The conditional probability, and for any satisfy:

[0101]

[0102] In this embodiment, the prior probability vector of the starting point category is specifically set as follows, taking into account the characteristics of population flow in urban functional areas. , ,in, When each row corresponds to a starting category of A, B, C, and E, the ending category is... The conditional probability distribution on the array has a sum of 1 for each row.

[0103] Step 4.2: Based on the prior probability vector of the starting category established in Step 4.1 With Markov class transition probability matrix The starting point category was obtained by sampling. With End Category The set of road nodes output in step 3 Extract the corresponding candidate node subsets from each. and .from and Randomly select specific starting points respectively and the finish line and constraints The final output is a valid start and end point pair. This is used in subsequent path generation steps.

[0104] Step 5: Using the valid start and end point pairs output in Step 4 For the objective, the set of road nodes obtained in step 3 The algorithm employs a locally dynamic weighted random search algorithm to generate paths that conform to urban travel characteristics. Dynamic direction preference coefficients and dynamic access penalty coefficients are introduced into the algorithm to guide paths towards the target while suppressing repeated visits and loops. Specifically, it includes the following sub-steps:

[0105] Step 5.1: Let the current iteration node be... Define its neighborhood candidate node set as:

[0106]

[0107] in, This represents the Euclidean distance between nodes. The maximum search radius is used to limit the movement range of each step to ensure path continuity; in this embodiment, it is set as follows: .

[0108] Step 5.2: For each candidate node Calculate its distance to the target node Euclidean distance And construct a comprehensive transfer weight:

[0109]

[0110] in, This serves as an access status identifier; if a candidate node... If already visited ,otherwise ; This is a dynamic direction preference coefficient used to control the strength of the path's tendency towards the endpoint; This is a dynamic access penalty coefficient used to suppress path loops in local nodes and improve path generation efficiency.

[0111] 1. Dynamic directional preference coefficient Dynamic updates. Define the current iteration node. To the finish line Normalized residual distance:

[0112]

[0113] in, Starting from, To avoid extremely small positive numbers with a denominator of 0.

[0114] Dynamic orientation preference coefficient Adaptive adjustment based on remaining distance:

[0115]

[0116] in, These are the lower and upper limits of the directional preference coefficient, respectively. In this embodiment, they are set as follows: , ; To adjust the exponential parameter of the curve, which controls the rate of change of preference intensity with remaining distance, this embodiment sets... .

[0117] When the path is far from the destination (i.e.) When it is large), Slightly smaller, retaining the exploratory nature of the road network; near the finish line (i.e. When it is smaller), It is too large, which strengthens the guidance towards the destination.

[0118] 2. Dynamic access penalty coefficient The dynamic update is achieved by a weighted fusion of the step enhancement term and the loop risk term, taking into account both the characteristics of the path generation stage and the requirements for loop suppression.

[0119] Step-based enhancement: The penalty intensity increases with the number of steps taken.

[0120]

[0121] in, This is the current step number; To limit the maximum number of steps generated in a single path, this embodiment sets... ; These are the lower and upper limits of the access penalty coefficient, respectively. In this embodiment, they are set as follows: , .

[0122] Cyclic risk items have increased penalty intensity as path repetition rate increases:

[0123] set up Represents a node The cumulative number of visits defines the cycle risk factor for the current path:

[0124]

[0125] in, This is the set of nodes that have been visited during the path generation process. This is an indicator function that takes the value 1 when the condition is true and 0 otherwise. The larger the value, the more severe the path loop.

[0126] The cyclic risk term driven by cyclic risk is defined as follows:

[0127]

[0128] in, This is the cyclic risk sensitivity coefficient, used to control the degree to which the penalty intensity responds to cyclic risk. In this embodiment, it is set to... .

[0129] The comprehensive dynamic access penalty coefficient is obtained by weighted fusion of the step enhancement term and the loop risk term:

[0130]

[0131] in, To integrate weights and balance the step enhancement and cycle risk adaptive mechanism, this embodiment sets... Initial stage of path generation Smaller, allowing for a small number of repeated visits to explore road network connectivity; during the middle stage of path generation, Gradually increase, suppressing mild cycles; in the later stages of path generation, Once the limit is reached, the system will forcibly avoid already visited nodes to prevent unnecessary detours.

[0132] Step 5.3: Normalize the overall transition weights of the candidate nodes to obtain the probability of selecting the next node:

[0133]

[0134] The next iteration node is determined by random sampling based on this probability. The probabilistic sampling mechanism can simulate the differences in individual path selection during urban travel, making the generated paths statistically realistic.

[0135] Step 5.4: From the starting point Begin repeating steps 5.1 through 5.3 to form a path sequence:

[0136]

[0137] Path generation terminates when either of the following conditions is met: the current node is the destination node, i.e. The path length has reached the maximum number of steps. If all candidate nodes in the neighborhood of the current node are infeasible or the corresponding comprehensive transfer weight is zero.

[0138] Step 6: Statistically analyze the path sets obtained from multiple path simulations, accumulate the access frequency corresponding to each node, and form a traffic frequency matrix. For the frequency matrix Perform neighborhood smoothing and interpolation to obtain a smoothed urban traffic heatmap. Specifically, it includes the following sub-steps:

[0139] Step 6.1: Prior probability vectors of the same class starting point With Markov class transition probability matrix Under the specified settings, new valid origin-endpoint pairs are randomly generated each time. Repeat this process several times, and accumulate the access frequency of each node along the path into the frequency matrix. This matrix is ​​used to characterize the traffic intensity distribution of each node in the urban road network, providing a data foundation for the subsequent generation of urban traffic heat maps.

[0140] Step 6.2: Eliminate the frequency matrix through neighborhood smoothing Discrete noise generated by random sampling of a single path is eliminated, and interpolation is used to fill the spatial gaps in the matrix, making the traffic intensity distribution more consistent with the continuous spatial characteristics of the urban road network, ultimately resulting in a smooth urban traffic heatmap. ,like Figure 5 As shown, this is a heat map of traffic in the city. In this study, pixel brightness is positively correlated with the frequency of traffic in the corresponding area: higher brightness indicates more frequent visits and greater traffic intensity to the nodes / pixels in that area. This can intuitively present the differences in traffic intensity and major commuter corridors in different functional areas of the city, providing visualized traffic distribution data support for the study of the correlation between urban transportation networks and the built environment.

[0141] On the other hand, this application also provides an urban travel simulation system based on functional zone probability, used to implement the above-mentioned urban travel simulation method based on functional zone probability, such as... Figure 6 As shown, the system includes:

[0142] Image preprocessing module: acquires and preprocesses urban road maps and urban functional area heat maps to obtain standardized road matrices and functional area grayscale matrices;

[0143] Urban Functional Semantic Quantification Input Module: Based on the grayscale range of the urban functional area heat map, a classification threshold is set, and urban spatial pixels are mapped to preset functional categories to generate a functional area label matrix;

[0144] Urban road network refinement and road node generation module: Performs binarization and neighborhood topology preservation refinement processing on the standardized road matrix to obtain a single-pixel wide road skeleton matrix; identifies road intersections and endpoints to form an initial node set; uses a distance clustering algorithm to merge redundant nodes and outputs a road node set;

[0145] The start-end point sampling module based on functional area constraints: establishes category-level start-end point sampling parameters, samples the start point category and end point category, selects specific start points and end points in the corresponding node subsets, and outputs valid start-end point pairs;

[0146] Path generation module: Taking effective origin-destination pairs as the target, it uses a local dynamic weighted random search algorithm that introduces dynamic direction preference coefficients and dynamic access penalty coefficients on the set of road nodes to generate paths that conform to the characteristics of urban travel.

[0147] The city traffic heat map generation module: statistically analyzes the path set obtained from multiple path simulations, accumulates the access frequency corresponding to each node, forms a traffic frequency matrix, and performs neighborhood smoothing and interpolation processing to obtain the city traffic heat map.

[0148] Regarding the system in the above embodiments, the specific ways in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0149] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0150] Accordingly, this application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the urban travel simulation method based on functional zone probabilities as described above. Figure 7 The diagram shown illustrates a hardware structure of any data processing-capable device for implementing the urban travel simulation method based on functional zone probabilities provided in this embodiment of the invention, except... Figure 7 In addition to the processor, memory, and network interface shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.

[0151] Accordingly, this application also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the urban travel simulation method based on functional area probabilities as described above. The computer-readable storage medium can be an internal storage unit of any data-processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data-processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data-processing device, and can also be used to temporarily store data that has been output or will be output.

[0152] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.

[0153] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

[0154] The above description is merely a preferred embodiment of the present invention. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make many possible variations and modifications to the technical solutions of the present invention using the methods and techniques disclosed above, or modify them into equivalent embodiments with equivalent changes, without departing from the scope of the technical solutions of the present invention. Therefore, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solutions of the present invention shall still fall within the protection scope of the technical solutions of the present invention.

Claims

1. A method for simulating urban travel based on functional zone probability, characterized in that, The method includes: Step 1: Obtain the city road map and the heat map of the city functional areas and preprocess them to obtain the standardized road matrix and the gray-scale matrix of the functional areas; Step 2: Based on the grayscale range of the urban functional area heat map, set the classification threshold, map the urban spatial pixels to the preset functional categories, and generate a functional area label matrix; Step 3: Perform binarization and neighborhood topology preservation on the standardized road matrix to obtain a single-pixel wide road skeleton matrix; identify road intersections and endpoints to form an initial node set; use a distance clustering algorithm to merge redundant nodes and output the road node set; Step 4: Establish category-level start and end point sampling parameters, including the start point category prior probability vector and Markov category transition probability matrix, and sample the start point category and end point category. Select specific start and end points in the corresponding node subset and output valid start and end point pairs. Step 5: With effective origin-destination pairs as the target, a local dynamic weighted random search algorithm that introduces dynamic direction preference coefficients and dynamic access penalty coefficients is used on the set of road nodes to generate a path that conforms to the characteristics of urban travel. Step 6: Statistically analyze the path set obtained from multiple path simulations, accumulate the access frequency corresponding to each node to form a traffic frequency matrix, and perform neighborhood smoothing and interpolation processing to obtain the city traffic heat map.

2. The urban travel simulation method based on functional zone probability according to claim 1, characterized in that, The refinement process that preserves the neighborhood topology includes: For any foreground pixel, its 8 neighboring pixels are defined to form a ring sequence in a clockwise direction; for all foreground pixels in the road binary matrix, the boundary pixel deletion operation is performed alternately in two sub-iterations; Sub-iteration I: If the following conditions are met simultaneously: the number of foreground pixels in the neighborhood is [2,6]; the number of 0→1 state transitions in the ring sequence is 1; the product of the values ​​of the neighboring pixels in the up, right, and down directions is 0, and the product of the values ​​of the neighboring pixels in the right, down, and left directions is 0; then the pixel mark is deleted. Sub-iteration II: After completing sub-iteration I and updating the road binary matrix, for the remaining foreground pixels, if the following conditions are met simultaneously: the number of neighboring foreground pixels is [2,6]; the number of 0→1 state transitions in the ring sequence is 1; the product of the values ​​of the neighboring pixels in the up, right, and left directions is 0, and the product of the values ​​of the neighboring pixels in the up, down, and left directions is also 0; then the pixel is marked as deleted. When no pixel satisfies the deletion condition in two consecutive sub-iterations, the iteration process stops, and the final road skeleton matrix is ​​output.

3. The urban travel simulation method based on functional zone probability according to claim 1, characterized in that, In step 4, based on the characteristics of population flow in urban functional areas, a prior probability vector of the starting point category and a Markov category transition probability matrix are set; the prior probability vector of the starting point category represents the prior probability distribution of each functional area as the starting point category of travel. Each row of the Markov category transition probability matrix represents the conditional probability distribution of the endpoint falling into each functional area category, given that the starting point belongs to the corresponding functional area category.

4. The urban travel simulation method based on functional zone probability according to claim 1, characterized in that, Step 5 specifically involves: For each candidate node in the neighborhood of the current iteration node, calculate its distance to the endpoint, and combine the dynamic direction preference coefficient, dynamic access penalty coefficient and access status identifier to construct a comprehensive transfer weight and normalize it to obtain the next node selection probability. The next iteration node is determined by random sampling according to this probability. The node selection process is repeated from the starting point until the current node becomes the endpoint, or the path length reaches the maximum number of steps, or all candidate nodes in the neighborhood of the current iteration node are infeasible or the corresponding comprehensive transition weight is zero, at which point path generation is terminated.

5. The urban travel simulation method based on functional zone probability according to claim 4, characterized in that, The dynamic direction preference coefficient is used to control the strength of the path's convergence towards the endpoint. Its dynamic update process specifically involves calculating the normalized remaining distance from the current iteration node to the endpoint. Dynamic directional preference coefficient Adaptive adjustment based on remaining distance: ,in These are the lower and upper limits of the directional preference coefficient, respectively. The exponential parameter of the adjustment curve is used to control the rate of change of preference intensity with the remaining distance.

6. The urban travel simulation method based on functional zone probability according to claim 4, characterized in that, The dynamic access penalty coefficient is used to suppress path loops in local nodes, and its dynamic update is achieved by a weighted fusion of the step enhancement term and the loop risk term. Steps Enhancement The penalty intensity increases with the number of steps: ,in The current step number. The maximum number of steps to generate for a single path. These are the lower and upper limits of the access penalty coefficient, respectively; Cyclic risk item Increase penalty intensity as path repetition increases: ,in The cyclical risk factor for the current path, This is the cyclic risk sensitivity coefficient, used to control the degree to which the intensity of punishment responds to cyclic risk.

7. A city travel simulation system based on functional zone probability, characterized in that, The system for implementing the urban travel simulation method based on functional zone probability as described in any one of claims 1-6 includes: Image preprocessing module: acquires and preprocesses urban road maps and urban functional area heat maps to obtain standardized road matrices and functional area grayscale matrices; Urban Functional Semantic Quantification Input Module: Based on the grayscale range of the urban functional area heat map, a classification threshold is set, and urban spatial pixels are mapped to preset functional categories to generate a functional area label matrix; Urban road network refinement and road node generation module: Performs binarization and neighborhood topology preservation refinement processing on the standardized road matrix to obtain a single-pixel wide road skeleton matrix; identifies road intersections and endpoints to form an initial node set; uses a distance clustering algorithm to merge redundant nodes and outputs a road node set; The start-end point sampling module based on functional area constraints: establishes category-level start-end point sampling parameters, samples the start point category and end point category, selects specific start points and end points in the corresponding node subsets, and outputs valid start-end point pairs; Path generation module: Taking effective origin-destination pairs as the target, it uses a local dynamic weighted random search algorithm that introduces dynamic direction preference coefficients and dynamic access penalty coefficients on the set of road nodes to generate paths that conform to the characteristics of urban travel. The city traffic heat map generation module: statistically analyzes the path set obtained from multiple path simulations, accumulates the access frequency corresponding to each node, forms a traffic frequency matrix, and performs neighborhood smoothing and interpolation processing to obtain the city traffic heat map.

8. An electronic device comprising a memory and a processor, characterized in that, The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the urban travel simulation method based on functional zone probability as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the urban travel simulation method based on functional zone probability as described in any one of claims 1-6.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the urban travel simulation method based on functional zone probability as described in any one of claims 1-6.