A subway station space layout division method based on multi-stage mechanical simulation and region growing algorithm
By employing multi-stage mechanical simulation and region growth algorithms, the problem of low efficiency in traditional rail transit design has been solved, enabling rapid optimization and rational division of subway station spatial layout, supporting dynamic adjustments, and improving design efficiency and adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HARBIN INST OF TECH
- Filing Date
- 2025-08-01
- Publication Date
- 2026-06-30
Smart Images

Figure CN120974594B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of civil engineering technology, and in particular to a method for dividing the spatial layout of subway stations based on multi-stage mechanical simulation and region growth algorithm. Background Technology
[0002] With the acceleration of urbanization in China, rail transit, as a key driver of urban development, is playing an increasingly important role in improving traffic conditions, promoting regional economic growth, and advancing society. Currently, rail transit networks are evolving from single-line systems to a grid-like layout, and the introduction of artificial intelligence technology has brought unprecedented opportunities for transformation to this field.
[0003] Traditional rail transit design models face numerous challenges: on the one hand, designers must rely on experience and standards for repeated adjustments, dealing with massive amounts of data and complex engineering problems; on the other hand, the design process involves a large amount of repetitive work, including drawing, proofreading, and updating, which is not only inefficient but also prone to errors. This rigid design system is difficult to adapt to dynamically changing needs, often resulting in unnecessary resource consumption.
[0004] To address the aforementioned issues, there is an urgent need to develop new intelligent design solutions. A subway station spatial layout partitioning method based on multi-stage mechanical simulation and region growing algorithms can enable rapid generation and optimization of multiple design options, significantly improving design efficiency and shortening project cycles. Summary of the Invention
[0005] The purpose of this invention is to address the problems in existing technologies by proposing a spatial layout partitioning method for subway stations based on multi-stage mechanical simulation and region growing algorithms. This method is applicable to the intelligent design of subway room locations.
[0006] This invention is achieved through the following technical solution: This invention proposes a method for spatial layout partitioning of subway stations based on multi-stage mechanical simulation and region growing algorithm, the method comprising:
[0007] Step 1: Modeling the spatial topology of the subway station: Based on the topology and area of the room to be designed, define a set of surrogate points and their weights, and define a correlation matrix to describe the topological connection relationship and strength between surrogate points; at the same time, assign a unique visual identifier to each surrogate point.
[0008] Step 2, Multi-stage mechanical optimization layout: Apply a multi-stage force-directed algorithm to arrange surrogate points in two-dimensional space; This multi-stage force-directed algorithm iteratively optimizes the positions of surrogate points by simulating the attractive and repulsive forces between surrogate points, and combining boundary constraints and simulated annealing strategies, until the system reaches a stable equilibrium state, thereby generating the final spatial coordinates of the surrogate points;
[0009] Step 3: Intelligent Region Growth and Division: Using the surrogate point coordinates obtained in Step 2 as the growth seed points, a region growth algorithm is used to divide the space. The region growth algorithm calculates the target area ratio of each surrogate point according to its weight, and through an iterative and competitive pixel allocation mechanism, the region of each surrogate point grows continuously until its area reaches the preset ratio, generating an initial spatial layout in which each region is filled with a unique color and satisfies topological and area constraints. Finally, a simplified spatial layout diagram is generated through image translation.
[0010] Furthermore, in step one, for the multiple rooms to be designed, the topological relationships between these rooms and the area required for each room are understood; based on the topological relationships and areas of these rooms, a set of surrogate points are defined, the weights of the surrogate points are set according to the area ratio, and a correlation matrix is defined to describe the topological connection relationships and strength between the surrogate points; a unique color identifier is assigned to each surrogate point.
[0011] Furthermore, in step two, multiple forces are defined as follows:
[0012] Repulsive force Apply this to all pairs of surrogate points. Its magnitude is proportional to the product of the weights of the two surrogate points and inversely proportional to the square of the distance between them, to ensure that all surrogate points are separated from each other. The surrogate point with the larger weight has a stronger ability to push away other surrogate points.
[0013] attraction It is applied only between surrogate pairs that are connected as defined by the correlation matrix, and its effect is to bring the connected surrogates closer to an ideal distance related to the connection strength and the surrogate weight.
[0014] Boundary constraints Apply a strong repulsive force at the preset canvas boundary to prevent any proxy point from moving out of the effective area;
[0015] Central gravity Apply a weak gravitational pull towards the center of the canvas to proxy points that are too far from the center to maintain the compactness of the layout;
[0016] Damping force Used to consume system energy and help the system reach stability faster;
[0017] random disturbances Used to escape local optima in the early stages of optimization.
[0018] Furthermore, in step two, a simulated annealing strategy is used for iterative optimization, specifically as follows:
[0019] The optimization process is divided into multiple stages; the repulsion coefficient and system "temperature" are dynamically adjusted at different stages. In the early stage, high "temperature" and strong repulsion are used to promote the global exploration and distribution of agent points. In the later stage, the parameters are gradually reduced to achieve smooth convergence and fine-tuning of the layout. Random perturbations are introduced during the iteration process to help the system escape local optima.
[0020] Furthermore, in step two, the state of the proxy points is updated, specifically as follows: In each iteration, the acceleration of each proxy point is calculated based on the resultant force, and its velocity and position are updated in conjunction with the damping force. For any proxy point... , its in acceleration at any moment It is determined by the vector sum of the following forces:
[0021]
[0022] Finally, stable proxy point coordinates were obtained through multiple iterations.
[0023] Furthermore, in step three,
[0024] Calculate the target area: Normalize the weights of all proxy points to obtain the proportion of pixel area occupied by each proxy point in the total canvas, and calculate the number of target pixels for each point accordingly.
[0025] Initialize the growth queue: Map the final coordinates of each proxy point determined in step two to a seed pixel on the canvas, and create a leading edge pixel queue for each proxy point, initially containing the unassigned pixels adjacent to its seed point.
[0026] Furthermore, in step three, alternating region growth is performed, specifically: through a loop, all active regions, i.e. regions that have not reached the target area, are grown in turn; in each round, one or more pixels are taken from the leading edge queue of a region, assigned to the region and marked with the corresponding color, and its new unassigned neighbors are added to the queue; when the actual number of pixels in a region reaches its target number, the region stops growing.
[0027] Furthermore, in step three, the remaining space is processed as follows: after all major regions have been grown, if there are still unallocated pixels, they are allocated to the nearest or most common allocated regions according to their proximity relationship to ensure that the canvas is completely filled and to generate the initial spatial layout.
[0028] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the subway station spatial layout division method based on multi-stage mechanical simulation and region growing algorithm.
[0029] The present invention also proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the subway station spatial layout partitioning method based on multi-stage mechanical simulation and region growing algorithm.
[0030] The beneficial effects of this invention are:
[0031] 1. This invention proposes a method for dividing the spatial layout of subway stations based on multi-stage mechanical simulation and region growth algorithm, which can achieve efficient optimization of building space layout based on physical model and intelligent algorithm.
[0032] 2. This invention utilizes mechanical simulation and competitive growth mechanisms to precisely control the spatial location, area ratio, and topological relationship of functional zones in subway stations, ensuring the rationality and continuity of the layout scheme.
[0033] 3. This invention provides a complete process for modeling and dividing the spatial layout of subway stations, overcoming the limitations of traditional methods that cannot simultaneously meet the requirements of functional zoning ratio, spatial continuity, and overall coordination, and supports dynamic adjustment and optimization migration of the scheme.
[0034] 4. This invention can automatically and quickly generate multiple layout schemes, thereby quickly finding the optimal solution, greatly shortening the design cycle. The data output by the mechanical simulation system can be stored, providing important reference information for subsequent maintenance and modification work. In addition, when project requirements change, the design method can quickly recalculate and provide new layout schemes, facilitating the modification of room location layouts and improving the adaptability of the design scheme. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0036] Figure 1 This is a flowchart of a subway station spatial layout partitioning method based on multi-stage mechanical simulation and region growth algorithm as described in this invention.
[0037] Figure 2 This is a schematic diagram of the architectural spatial topology modeling involved in this invention.
[0038] Figure 3 This is a schematic diagram of the correlation matrix describing the topological connections and strengths between agent points.
[0039] Figure 4 This is a schematic diagram of the forces acting on the agent point.
[0040] Figure 5 This is a schematic diagram of the region growing algorithm.
[0041] Figure 6 This is a diagram showing the comparison between the initial and final positions of the agent point.
[0042] Figure 7 This is a schematic diagram of a simplified spatial layout generated from an initial layout diagram through image translation. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.
[0044] This invention proposes a spatial layout partitioning method for subway stations based on multi-stage mechanical simulation and region growing algorithms. The method comprises three core processes: subway station spatial topology modeling, multi-stage mechanical optimization layout, and intelligent region growing partitioning with image translation. First, the topological relationships and areas of subway station functional units are transformed into mechanical model parameters. Through adaptive mechanical simulation involving three stages—global layout, fine-tuning, and stable convergence—the optimal distribution of each subway station functional unit's location is achieved. Then, based on the mechanical simulation results, a multi-region competitive growing algorithm is used to generate an initial spatial layout that meets the area ratio requirements of each functional zone. Finally, image translation yields a simplified spatial layout diagram, ensuring the rationality and integrity of the subway station's functional partitioning. This method, through the organic combination of multi-stage mechanical simulation and region growing algorithms, achieves automatic generation from subway station functional requirements to spatial layout schemes. The final output layout scheme not only meets the area ratio requirements of each functional zone but also maintains the overall coordination and functional continuity of the subway station space, providing a scientific and efficient preliminary spatial partitioning scheme for subway station design.
[0045] Specifically, in combination Figures 1-7 The method includes the following steps:
[0046] Step 1: Architectural Space Topology Modeling: Based on the topology and area of the rooms to be designed, define a set of surrogate points and their weights (quality), and define a correlation matrix to describe the topological connection relationships and strength between surrogate points; at the same time, assign a unique visual identifier (such as color) to each surrogate point.
[0047] Step 2, Multi-stage Mechanical Optimization Layout: A multi-stage force-directed algorithm is applied to arrange surrogate points in a two-dimensional space. This algorithm iteratively optimizes the surrogate point positions by simulating the attractive forces (based on the correlation matrix) and repulsive forces (based on the surrogate point weights) between surrogate points, combined with boundary constraints and simulated annealing strategies, until the system reaches a stable equilibrium state, thereby generating the final spatial coordinates of the surrogate points.
[0048] Step 3: Intelligent Region Growth and Partitioning: Using the surrogate point coordinates obtained in Step 2 as growth seed points, a region growth algorithm is used to partition the space. This algorithm calculates the target area ratio of each surrogate point based on its weight (quality), and through an iterative and competitive pixel allocation mechanism, the region of each surrogate point grows continuously until its area reaches the preset ratio, ultimately generating an initial layout map where each region is filled with a unique color and satisfies topology and area constraints.
[0049] Step one specifically involves:
[0050] Step 1.1: For the multiple rooms to be designed, understand the topological relationship between these rooms and the required area of each room.
[0051] Step 1.2: Based on the topological relationships and areas of these rooms, define a set of proxy points, set the weights (quality) of the proxy points according to the area ratio, and define a correlation matrix to describe the topological connection relationships and strength between the proxy points.
[0052] Step 1.3: Assign a unique visual identifier (such as a color) to each agent point.
[0053] Step two specifically involves:
[0054] Step 2.1, Define multiple forces:
[0055] Repulsive force Apply this to all pairs of surrogate points. Its magnitude is proportional to the product of the weights (masses) of the two surrogate points and inversely proportional to the square of the distance between them. This ensures that all surrogate points are separated from each other, and the surrogate point with the larger weight has a stronger ability to push away other surrogate points.
[0056] attraction It is applied only between surrogate pairs that are connected as defined by the correlation matrix. It acts like a spring, pulling the connected surrogates closer to an ideal distance that is related to the connection strength and the surrogate weight.
[0057] Boundary constraints Apply a strong repulsive force at the preset canvas boundary to prevent any proxy point from moving out of the effective area;
[0058] Central gravity Apply a weak gravitational pull towards the center of the canvas to proxy points that are too far from the center to maintain the compactness of the layout.
[0059] Damping force Used to consume system energy and help the system reach stability faster.
[0060] random disturbances Used to escape local optima in the early stages of optimization.
[0061] Step 2.2: Iterative optimization using simulated annealing strategy:
[0062] The optimization process is divided into multiple stages (global layout, fine-tuning, and stable convergence).
[0063] The repulsion coefficient and system "temperature" are dynamically adjusted at different stages. In the early stage, high "temperature" and strong repulsion are used to promote the global exploration and distribution of agent points. In the later stage, the parameters are gradually reduced to achieve stable convergence and fine-tuning of the layout.
[0064] During the iteration process, random perturbations (related to "temperature") are introduced to help the system escape local optima.
[0065] Step 2.3: Update the surrogate point state: In each iteration, calculate the acceleration of each surrogate point based on the resultant force, and update its velocity and position in conjunction with the damping force. For any surrogate point... , its in acceleration at any moment It is determined by the vector sum of the following forces:
[0066]
[0067] Finally, stable proxy point coordinates were obtained through multiple iterations.
[0068] Step three specifically involves:
[0069] Step 3.1 Calculate the target area: Normalize the weights (quality) of all proxy points to obtain the proportion of pixel area that each proxy point should occupy in the total canvas, and calculate the number of target pixels for each point accordingly.
[0070] Step 3.2 Initialize the growth queue: Map the final coordinates of each proxy point determined in Step 2 to a seed pixel on the canvas, and create a leading edge pixel queue for each proxy point (region), which initially contains the unassigned pixels adjacent to its seed point.
[0071] Step 3.3: Perform alternating region growth:
[0072] By cycling, all active areas (i.e. areas that have not reached the target area) are allowed to grow in turn;
[0073] In each round, one or more pixels are taken from the leading queue of a region, assigned to that region and marked with the corresponding color, while its new unassigned neighbors are added to the queue;
[0074] When the actual number of pixels in a region reaches its target number, that region stops growing.
[0075] Step 3.4: Handling Remaining Space: After all major areas have been grown, if there are still unassigned pixels, assign them to the nearest or most frequently assigned areas based on their proximity to ensure that the canvas is completely filled.
[0076] Step 3.5: Initial spatial layout. The pre-trained CGAN model translates and generates a simplified spatial layout diagram.
[0077] Example
[0078] This embodiment applies the invention to the task of intelligent generation of subway station layouts. Figure 1 A flowchart of the method described in this invention is provided. Figure 2 A schematic diagram of the architectural spatial topology modeling is provided. Figure 3 A schematic diagram of the correlation matrix describing the topological connectivity and strength between agent points is provided. Figure 4 Force diagram of the agent point. Figure 5 This is a schematic diagram of the region growing algorithm. Figure 6 This is a comparison diagram of the initial and final positions of the rational point. Figure 7 This is a schematic diagram of a simplified spatial layout generated from an initial layout diagram through image translation.
[0079] This invention proposes a method for spatial layout partitioning of subway stations based on multi-stage mechanical simulation and region growing algorithm. The method specifically includes:
[0080] Step 1: Architectural Space Topology Modeling: Based on the topology and area of the rooms to be designed, define a set of surrogate points and their weights (quality), and define a correlation matrix to describe the topological connection relationships and strength between surrogate points; at the same time, assign a unique visual identifier (such as color) to each surrogate point.
[0081] Step one specifically involves:
[0082] For multiple rooms to be designed, understand the topological relationships between these rooms and the required area of each room. Figure 2 (See the topology diagram shown). This step aims to structure the abstract input data to prepare for subsequent physics simulations and image generation.
[0083] Define surrogate weights: Define a one-dimensional array (or list) M to represent the weights (or qualities) of N surrogate points:
[0084]
[0085] in Representing the The weight of each proxy point will affect its inertia in the physics simulation, the magnitude of the repulsive force it generates, and the area it occupies in the final layout diagram.
[0086] Define topological relationships: Define an N×N correlation matrix C to describe the connection relationships and strengths between agent points.
[0087]
[0088] in ∈[0,1]. If = 0, indicating a proxy point and There is no direct connection between them; if A value greater than 0 indicates the existence of a connection, and its magnitude represents the tightness of the connection (e.g., ...). =1.0 indicates a strong connection. = 0.5 indicates a weak connection. This matrix is typically symmetric, i.e. = .
[0089] Define visual identifiers: Assign a unique color identifier to each of the N proxy points, usually stored in RGB or BGR format, for use in the final image rendering.
[0090] Step 2, Multi-stage Mechanical Optimization Layout: A multi-stage force-directed algorithm is applied to arrange surrogate points in a two-dimensional space. This algorithm iteratively optimizes the surrogate point positions by simulating the attractive forces (based on the correlation matrix) and repulsive forces (based on the surrogate point weights) between surrogate points, combined with boundary constraints and simulated annealing strategies, until the system reaches a stable equilibrium state, thereby generating the final spatial coordinates of the surrogate points.
[0091] Step two specifically involves:
[0092] The core of this step is the Force-Directed Algorithm. It treats surrogate points as particles in the physical world, abstracts connections as spring forces between particles, and also introduces a repulsive force similar to electric charge between all particles. By iteratively calculating the net force acting on all particles and updating their positions, the system eventually reaches a stable state with lower energy. At this point, the layout is visually clear and conforms to topological intuition. This invention employs a multi-stage optimization strategy that incorporates the concept of simulated annealing. This strategy updates the state of each surrogate point by iteratively calculating the net force acting on it.
[0093] Define multiple forces: for any agent point , its in acceleration at any moment It is determined by the vector sum of the following forces:
[0094]
[0095] Repulsion force Used to prevent surrogate points from overlapping, ensuring a clear and readable layout. This force acts between all pairs of surrogate points, following an inverse square law similar to Coulomb's law, and is related to the mass of the surrogate point. Surrogate Point For agents The repulsive force is:
[0096]
[0097] in, It is the repulsive force coefficient. It is the distance between two points. It is a unit vector in direction. (Mass factor) This results in a stronger rejection effect from higher-quality agents.
[0098] attraction By bringing connected surrogate points closer together, the topological structure is reflected. This force acts between connected surrogate point pairs defined by the correlation matrix C; the model is based on Hooke's Law (spring force). Surrogate Points For agents Its appeal is:
[0099]
[0100] in, It's the attraction coefficient. It is the "ideal length" of the spring, which depends on the connection strength. And the quality of the agency points, for example:
[0101]
[0102] s is the base length (a shorter length corresponds to a strong connection), and s is a scaling factor.
[0103] Boundary constraints Restrict all proxy points to a preset canvas area. When proxy points a certain coordinate component When approaching the boundary (e.g., less than padding), apply a linear restoring force:
[0104]
[0105] Central gravity It is a subtle force directed towards the center of the canvas, preventing the layout from becoming too scattered.
[0106] Damping force It is a force inversely proportional to velocity. It is used to consume system energy and help the system reach stability faster.
[0107] random disturbances It is a random force proportional to the temperature T, used to escape local optima in the early stages of optimization.
[0108] A simulated annealing strategy is employed: by introducing a "temperature" parameter T and gradually decreasing it over time (the number of iterations) (annealing), the randomness and convergence of the system are controlled. The iterative process is divided into different stages. In the first stage (global setup), a high temperature T and a high repulsion coefficient are set. This allows for significant movement and exploration of agent points. In the second phase (fine-tuning), T and... To reduce randomness, local optimization is performed. In the third stage (stable convergence), T is set to 0, and the system enters deterministic fine-tuning until it stabilizes.
[0109] Updating agent point status: Based on Newton's laws of motion, the velocity and position of each agent point are updated using the Euler integral (forward Euler method).
[0110]
[0111]
[0112] in This is the simulation time step (set to 1.0 in the code).
[0113] Step 3: Intelligent Region Growth and Partitioning: Using the surrogate point coordinates obtained in Step 2 as growth seed points, a region growth algorithm is used to partition the space. This algorithm calculates the target area ratio of each surrogate point based on its weight (quality), and through an iterative and competitive pixel allocation mechanism, the region of each surrogate point grows continuously until its area reaches the preset ratio, ultimately generating an initial layout map where each region is filled with a unique color and satisfies topology and area constraints.
[0114] Step three specifically involves:
[0115] This step employs a competitive queue-based region growing algorithm. It uses the surrogate point locations determined in the previous step as "seeds." Starting from these seeds, each region expands outward simultaneously, competing for pixel space on the canvas through a round-robin, fair competition mechanism, until the area of each region reaches its target proportion determined by its weight. It expands discrete seed points into continuous regions that satisfy area constraints through a fair pixel allocation mechanism.
[0116] Calculate the target area: The final area of each region should be proportional to the weight of its proxy point. For proxy points... Its target area (number of pixels) The calculation is as follows:
[0117]
[0118] in This is the total number of pixels on the canvas. To ensure that all pixels are allocated, rounding errors in the calculation can be uniformly distributed to the regions with the highest weights.
[0119] Initialize the growth queue: Maintain a data structure (such as a deque) for each region to store its "front edge" pixels. The front edge refers to pixels that are adjacent to the already allocated portion of the region but have not yet been allocated themselves. This is the core idea of Breadth-First Search (BFS). This process will use the positions of each surrogate point obtained in step two... As the seed pixel for its corresponding region, mark it as assigned on the canvas. Add the unassigned pixels in the four (or eight) neighboring regions of each seed pixel to the leading edge queue of its corresponding region.
[0120] Alternating region growth is implemented: To prevent a region from expanding too quickly due to seed location advantage, the algorithm employs a round-robin scheduling method. All "active" regions (those that have not reached the target area) take turns getting growth opportunities.
[0121] The specific process is as follows:
[0122] 1. Enter a main loop, which continues until all regions reach the target area or its front queue is empty.
[0123] 2. Inside the loop, iterate through all active regions.
[0124] 3. For the currently assigned area It takes a certain number of pixels (e.g., 5 in the code or until the queue is empty) from its front queue.
[0125] 4. Assign these pixels to the region Update its color and current area count. .
[0126] 5. Add the unassigned neighbors of the newly assigned pixels to the region. The leading queue.
[0127] 6. If Then the region Marked as "inactive".
[0128] Handling Remaining Space and Smoothing: After the main growth cycle ends, a small number of unallocated "gaps" may remain due to the complex boundary shape.
[0129] The specific process is as follows:
[0130] Gap filling: Iterate through all unassigned pixels and check which region their neighbors belong to. Assign the pixel to the neighbor region that appears most frequently.
[0131] Post-processing (optional): Apply an image smoothing filter, such as a median filter, to the generated color layout image.
[0132]
[0133] Median filtering can effectively remove small noise points or isolated pixels, making the area boundaries smoother, while maintaining the sharpness of the boundaries well, unlike Gaussian blur which causes color bleeding.
[0134] Image translation: The previous steps generate an initial spatial layout, and the pre-trained CGAN model can then translate the image to generate a simplified spatial layout map.
[0135] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the subway station spatial layout division method based on multi-stage mechanical simulation and region growing algorithm.
[0136] The present invention also proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the subway station spatial layout partitioning method based on multi-stage mechanical simulation and region growing algorithm.
[0137] The memory in this application embodiment can be volatile memory or non-volatile memory, or it can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the methods described in this invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0138] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0139] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0140] It should be noted that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuitry in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied as execution by a hardware decoding processor, or as a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above methods.
[0141] The above provides a detailed description of a subway station spatial layout partitioning method based on multi-stage mechanical simulation and region growth algorithm proposed in this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A method for spatial layout partitioning of subway stations based on multi-stage mechanical simulation and region growing algorithm, characterized in that, The method includes: Step 1: Modeling the spatial topology of the subway station: Based on the topology and area of the room to be designed, define a set of surrogate points and their weights, and define a correlation matrix to describe the topological connection relationship and strength between surrogate points; at the same time, assign a unique visual identifier to each surrogate point. Step 2, Multi-stage mechanical optimization layout: Apply a multi-stage force-directed algorithm to arrange surrogate points in two-dimensional space; This multi-stage force-directed algorithm iteratively optimizes the positions of surrogate points by simulating the attractive and repulsive forces between surrogate points, and combining boundary constraints and simulated annealing strategies, until the system reaches a stable equilibrium state, thereby generating the final spatial coordinates of the surrogate points; Step 3: Intelligent Region Growth and Division: Using the proxy point coordinates obtained in Step 2 as the growth seed points, a region growth algorithm is used to divide the space. The region growth algorithm calculates the target area ratio of each proxy point according to its weight, and through an iterative and competitive pixel allocation mechanism, the region of each proxy point grows continuously until its area reaches the preset ratio, generating an initial spatial layout in which each region is filled with a unique color and satisfies topological and area constraints. Finally, a simplified spatial layout diagram is generated through image translation. In step one, for the multiple rooms to be designed, understand the topological relationships between these rooms and the area required for each room; based on the topological relationships and areas of these rooms, define a set of surrogate points, set the weights of the surrogate points according to the area ratio, and define a correlation matrix to describe the topological connection relationships and strength between the surrogate points; assign a unique color identifier to each surrogate point. In step two, multiple forces are defined as follows: Repulsive force Apply this to all pairs of surrogate points. Its magnitude is proportional to the product of the weights of the two surrogate points and inversely proportional to the square of the distance between them, to ensure that all surrogate points are separated from each other. The surrogate point with the larger weight has a stronger ability to push away other surrogate points. attraction It is applied only between surrogate pairs that are connected as defined by the correlation matrix, and its effect is to bring the connected surrogates closer to an ideal distance related to the connection strength and the surrogate weight. Boundary constraints Apply a repulsive force at the preset canvas boundary to prevent any proxy point from moving out of the effective area; Central gravity Apply a gravitational pull towards the center of the canvas to proxy points that are too far from the center to maintain the compactness of the layout; Damping force Used to consume system energy and help the system reach stability faster; random disturbance Used to escape local optima in the early stages of optimization.
2. The method according to claim 1, characterized in that, In step two, a simulated annealing strategy is used for iterative optimization, specifically as follows: The optimization process is divided into multiple stages; the repulsion coefficient and system temperature are dynamically adjusted at different stages, and the parameters are gradually reduced in the later stage to achieve smooth convergence and fine-tuning of the layout; random perturbations are introduced during the iteration process to help the system escape local optima.
3. The method according to claim 2, characterized in that, In step two, the state of the surrogate points is updated. Specifically, in each iteration, the acceleration of each surrogate point is calculated based on the resultant force, and its velocity and position are updated in conjunction with the damping force. For any surrogate point... , its in acceleration at any moment It is determined by the vector sum of the following forces: Finally, stable proxy point coordinates were obtained through multiple iterations.
4. The method according to claim 3, characterized in that, In step three, Calculate the target area: Normalize the weights of all proxy points to obtain the pixel area ratio of each proxy point in the total canvas, and calculate the number of target pixels for each point accordingly. Initialize the growth queue: Map the final coordinates of each proxy point determined in step two to a seed pixel on the canvas, and create a leading edge pixel queue for each proxy point, initially containing the unassigned pixels adjacent to its seed point.
5. The method according to claim 4, characterized in that, In step three, alternating region growth is performed, specifically: through a loop, all active regions, i.e. regions that have not reached the target area, are grown in turn; in each round, one or more pixels are taken from the leading edge queue of a region, assigned to the region and marked with the corresponding color, and its new unassigned neighbors are added to the queue; when the actual number of pixels in a region reaches its target number, the region stops growing.
6. The method according to claim 5, characterized in that, In step three, the remaining space is processed as follows: after all major regions have been grown, if there are still unassigned pixels, they are assigned to the nearest or most common assigned regions according to their proximity relationship to ensure that the canvas is completely filled and to generate the initial spatial layout.
7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-6.
8. A computer-readable storage medium for storing computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-6.