Urban space behavior simulation method, system, equipment and medium

By constructing a high-fidelity 3D urban environment in Unreal Engine and combining it with the BDI-DRL decision model, the problems of visual realism and individual behavioral intelligence in traditional urban simulation methods are solved. This enables realistic simulation and visualization of large-scale crowds and traffic flow, and is applicable to urban planning and traffic analysis.

CN121052115APending Publication Date: 2025-12-02浪潮智慧城市科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511123029.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

Existing methods for simulating urban spatial behavior struggle to balance visual realism and individual behavioral intelligence. Traditional macro-traffic flow models cannot accurately depict the complexity and heterogeneity of individual behaviors, while agent-based micro-models are deficient in environmental rendering and autonomous learning capabilities.

Method used

A high-fidelity 3D virtual city environment is constructed in Unreal Engine. The environmental state data is transmitted to the external AI intelligent agent decision core through a two-way data interaction interface. The BDI-DRL hybrid decision model is used to generate behavioral intentions, and the instructions are executed through Unreal Engine to achieve large-scale, high-fidelity and realistic dynamic simulation of the city.

Benefits of technology

It achieves a combination of high-fidelity visual effects and highly intelligent behavioral logic, which can accurately simulate the autonomous behavior of large-scale crowds and traffic flow in complex urban spaces, and can intuitively visualize the simulation results, providing a scientific basis for urban planning and traffic analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121052115A_ABST
    Figure CN121052115A_ABST
Patent Text Reader

Abstract

The invention discloses an urban space behavior simulation method, system and device and a medium, belongs to the technical field of computer simulation, and aims to solve the technical problem of how to accurately simulate autonomous behaviors of large-scale crowds and traffic flows in a complex urban space. According to the technical scheme, a simulation result is visually and vividly visualized, the defect that traditional city simulation is difficult to consider both visual reality and individual behavior intelligence is overcome, and the method comprises the steps that a high-fidelity environment and semantic information are constructed, specifically, a high-fidelity three-dimensional city virtual environment is constructed in an unreal engine UE5, and the semantic information of the environment is defined; bidirectional data interaction: transmitting the state data of the virtual environment to an external AI agent decision core in real time through a bidirectional data interaction interface; the AI agent decision-making core receives the environment state data of the virtual environment through a bidirectional data exchange interface, and updates the belief state in the AI agent decision-making core; generating a behavior intention; and executing behaviors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer simulation technology, specifically to a method, system, device, and medium for simulating urban spatial behavior. Background Technology

[0002] Urban spatial behavior simulation is an important tool for understanding and optimizing urban systems. Existing simulation methods are mainly divided into two categories:

[0003] ① Macro-level traffic flow models, such as cellular automata models, are good at simulating large-scale traffic flow phenomena, but they cannot accurately depict the complexity and heterogeneity of individual behaviors, resulting in a large gap between the simulation results and the micro-dynamics of the real world.

[0004] ② Agent-Based Models (ABM): These models assign independent decision-making logic to each individual (pedestrian, vehicle), enabling better simulation of complex individual interactions and emergent phenomena. However, traditional ABMs typically operate in two-dimensional or simplified three-dimensional environments, resulting in weak environment rendering capabilities, low visual fidelity, and difficulty in intuitively showcasing complex urban spatial interactions. Furthermore, their built-in AI logic is mostly simple rule-based scripts, leading to simplistic agent behavior patterns and a lack of autonomous learning and adaptation capabilities to complex environments.

[0005] In recent years, modern game engines, represented by Unreal Engine (UE), have been used to build high-fidelity virtual cities thanks to their powerful real-time rendering capabilities and physics simulation systems. However, UE's built-in AI systems (such as behavior trees and blackboard systems) are primarily designed for game entertainment, and their decision-making logic is relatively fixed, making it difficult to simulate the complex human behaviors in the real world that are driven by social norms and long-term goals.

[0006] Therefore, how to accurately simulate the autonomous behavior of large-scale crowds and traffic flows in complex urban spaces, and how to visualize the simulation results intuitively and realistically to overcome the shortcomings of traditional urban simulations in achieving both visual realism and individual behavioral intelligence, are urgent technical problems that need to be solved. Summary of the Invention

[0007] The technical objective of this invention is to provide a method, system, device, and medium for simulating urban spatial behavior, addressing the challenge of accurately simulating the autonomous behavior of large-scale crowds and traffic flows in complex urban spaces. It provides intuitive and realistic visualization of simulation results, overcoming the limitations of traditional urban simulations in simultaneously achieving visual realism and individual behavioral intelligence.

[0008] The technical objective of this invention is achieved in the following manner: a method for simulating urban spatial behavior, the specific method of which is as follows:

[0009] Constructing a high-fidelity environment and semantic information: Constructing a high-fidelity 3D city virtual environment in Unreal Engine 5 and defining the semantic information of the environment;

[0010] Two-way data interaction: The virtual environment's state data is transmitted in real time to an external AI intelligent agent's decision-making core through a two-way data interaction interface;

[0011] Update the AI ​​agent decision-making core: The AI ​​agent decision-making core receives environmental state data from the virtual environment through a two-way data exchange interface and updates the belief state within the AI ​​agent decision-making core.

[0012] Generate behavioral intentions: The AI ​​agent's decision-making core generates behavioral intentions based on its internal belief state and preset desire goals, and uses a pre-trained DRL model (deep reinforcement learning model) to calculate specific behavioral execution instructions;

[0013] Behavior execution: The AI ​​agent decision-making core sends behavior execution instructions to Unreal Engine UE5 through a two-way data exchange interface, and the corresponding virtual character in Unreal Engine UE5 executes the behavior execution instructions, thereby realizing large-scale, high-fidelity and realistic urban dynamic simulation.

[0014] As a preferred option, the construction of a high-fidelity environment and semantic information is as follows:

[0015] A visually highly realistic 3D city model was constructed using Lumen and Nanite technologies in Unreal Engine 5. The city 3D model includes roads, sidewalks, building functions, traffic facility status, and vegetation.

[0016] Define the semantic information of key elements in the environment: Define the semantic information of the environment through the Unreal Engine UE5's Data Layers or Gameplay Tags system. The semantic information will be provided as structured data to the AI ​​agent's decision-making core. Specifically, mark the road surface as "passable area", the sidewalk as "pedestrian area" and the shop as "commercial interest point" through the Unreal Engine UE5's Data Layers or Gameplay Tags system.

[0017] As a preferred option, the two-way data interaction is as follows:

[0018] Establish a low-latency, high-throughput bidirectional data interaction interface based on gRPC (gRPC Remote Procedure Calls) or WebSocket protocols;

[0019] From Unreal Engine UE5 to AI Agent Decision Core: The Unreal Engine UE5 client periodically (e.g., 10 times per second) collects semantic information (such as other agents in the field of view, traffic light status, reachable areas, etc.) around the AI ​​agent decision core through the environment perception module, and sends the serialized semantic information to the AI ​​agent decision core through a two-way data interaction interface.

[0020] AI Agent Decision Core to Unreal Engine UE5: The AI ​​Agent Decision Core transmits the calculated behavioral instructions (such as "move to target point (x,y,z)" and "interact with object A") back to Unreal Engine UE5 through a two-way data interaction interface.

[0021] Even better, the AI ​​agent's decision-making core adopts the BDI-DRL hybrid decision-making model, which combines the BDI (belief-desire-intention) model and the DRL (deep reinforcement learning) model.

[0022] The BDI model is used to handle the long-term goals and high-level logical reasoning of the AI ​​agent's decision-making core. The BDI model includes a Beliefs layer, a Desires layer, and an Intentions layer. The Beliefs layer stores environmental information and the agent's own state (such as location and current task) received from UE5. The Desires layer represents the long-term goals of the AI ​​agent's decision-making core (such as going to work, going home, or shopping). The Intentions layer selects the most urgent task to execute based on the current beliefs and desires.

[0023] The DRL model is used to handle low-to-medium level navigation and obstacle avoidance tasks. A DRL model based on the PPO (Proximal Policy Optimization) algorithm is pre-trained, and the reward function R comprehensively considers efficiency, safety, and standardization.

[0024] More preferably, the reward function for a pedestrian is designed as follows: R = w1 * Dgoal - w2 * Tstep - w3 * Ccoll - w4 * Psocial; where Dgoal represents the reduction in distance to the target; Tstep represents the time cost; Ccoll represents the collision penalty; Psocial represents the penalty for violating regulations (such as running a red light or walking on the road); and wi represents the weighting coefficient.

[0025] More specifically, the core decision-making process of the AI ​​agent is as follows:

[0026] The BDI model identifies high-level intents (such as "go to workstation") and passes the target point to the DRL model;

[0027] The DRL model generates specific, real-time movement and obstacle avoidance commands to achieve the corresponding intentions in the optimal way.

[0028] As a preferred option, the specific actions are executed as follows:

[0029] The character in Unreal Engine 5 receives behavioral instructions from the AI ​​agent decision core;

[0030] The Unreal Engine UE5's Behavior Tree and Animation Blueprint system is used to resolve abstract instructions (such as "move") into specific animations and physical movements; for example, the Behavior Tree executes a "MoveTo" task, while the Animation Blueprint smoothly blends walking, running, turning and other animations based on the character's speed and direction.

[0031] An urban spatial behavior simulation system is provided to implement the urban spatial behavior simulation method described above; the system includes:

[0032] The environment and semantic information construction module is used to build a high-fidelity 3D city virtual environment in Unreal Engine 5 and define the semantic information of the environment;

[0033] The two-way data interaction module is used to transmit the status data of the virtual environment to an external AI intelligent agent decision-making core in real time through a two-way data interaction interface;

[0034] The update module is used to utilize the environmental state data of the virtual environment received by the AI ​​agent decision core through the bidirectional data exchange interface, and to update the belief state inside the AI ​​agent decision core.

[0035] The behavioral intent generation module is used to generate behavioral intents based on the internal belief state and preset desire goals of the AI ​​agent decision-making core, and to calculate specific behavioral execution instructions using a pre-trained DRL model (deep reinforcement learning model).

[0036] The behavior execution module is used to send behavior execution instructions to Unreal Engine UE5 through a two-way data exchange interface via the AI ​​intelligent agent decision core, and the corresponding virtual character in Unreal Engine UE5 executes the behavior execution instructions, thereby realizing large-scale, high-fidelity and realistic urban dynamic simulation.

[0037] An electronic device includes: a memory and at least one processor;

[0038] The memory contains computer programs;

[0039] The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the urban spatial behavior simulation method as described above.

[0040] A computer-readable storage medium storing a computer program that can be executed by a processor to implement the urban spatial behavior simulation method described above.

[0041] The urban spatial behavior simulation method, system, device, and medium of the present invention have the following advantages:

[0042] (I) This invention first constructs a high-fidelity 3D virtual urban environment in Unreal Engine and defines the semantic information of the environment; secondly, through a low-latency, bidirectional data interaction interface, the state data of the virtual environment is transmitted in real time to an external AI intelligent agent decision-making core; based on the received environmental data, the AI ​​intelligent agent adopts a hybrid decision-making mechanism that combines the Belief-Desire-Intention (BDI) model with deep reinforcement learning (DRL) to generate highly autonomous and social behavioral decisions; finally, the decision results are sent back to Unreal Engine to drive the virtual character to perform corresponding actions, thereby realizing large-scale, high-fidelity and realistic urban dynamic simulation, solving the problem that traditional urban simulation is difficult to balance visual realism and individual behavioral intelligence, and providing a powerful simulation verification platform for urban planning, emergency management and traffic system analysis;

[0043] (II) This invention effectively combines a high-fidelity virtual environment with a highly intelligent behavioral decision-making model to achieve a city simulation system that is both "good-looking" and "easy to use". It realizes a high-fidelity, highly intelligent, and real-time interactive city simulation platform, which is particularly suitable for scenarios such as urban planning, traffic analysis, and public safety emergency plan evaluation.

[0044] (III) This invention decouples high-fidelity environmental simulation (Unreal Engine) from complex AI decision-making (external intelligent agent core) and connects them through an efficient data interaction interface. It can accurately simulate the autonomous behavior of large-scale crowds and traffic flow in complex urban spaces and visualize the simulation results intuitively and realistically, providing a scientific basis for decision-making in related fields.

[0045] (iv) This invention combines the top visual effects of UE with advanced AI decision-making models, so that the simulation process has both a movie-level visual experience and near-real individual behavioral logic, solving the problem that the two cannot be achieved at the same time, and realizing the unity of high fidelity and high intelligence.

[0046] (V) The hybrid AI decision-making model of this invention transforms intelligent agents from robots that execute rigid scripts into "digital humans" capable of making autonomous and rational decisions based on environmental changes and intrinsic motivations. This enables the emergence of more realistic traffic flows and crowd dynamics at the macro level, achieving both realism and emergence of behavior.

[0047] (vi) The separate architecture of the present invention enables the AI ​​decision core to be upgraded and replaced independently of the UE. Researchers can easily access different AI algorithms (such as AI based on large language models, more complex game theory models, etc.) for testing without modifying the huge UE project, thus achieving strong scalability and flexibility.

[0048] (vii) This invention supports real-time interaction and intervention: users can dynamically change the environment during simulation (such as setting up roadblocks or simulating traffic accidents) and observe in real time how the AI ​​agent adapts and reacts autonomously, which greatly improves the practicality and research value of the simulation system. Attached Figure Description

[0049] The invention will be further described below with reference to the accompanying drawings.

[0050] Appendix Figure 1 A flowchart illustrating the urban spatial behavior simulation method;

[0051] Appendix Figure 2 This is a schematic diagram of the internal decision-making process within a single decision-making cycle. Detailed Implementation

[0052] The urban spatial behavior simulation method, system, device, and medium of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0053] Example 1:

[0054] As attached Figure 1 As shown in the figure, this embodiment provides a method for simulating urban spatial behavior, which is as follows:

[0055] S1. Constructing a high-fidelity environment and semantic information: Constructing a high-fidelity 3D city virtual environment in Unreal Engine 5 and defining the semantic information of the environment;

[0056] S2, Two-way data interaction: The virtual environment's status data is transmitted in real time to an external AI intelligent agent's decision-making core through a two-way data interaction interface;

[0057] S3. Update the AI ​​agent decision-making core: The AI ​​agent decision-making core receives the environmental state data of the virtual environment through the two-way data exchange interface and updates the belief state inside the AI ​​agent decision-making core.

[0058] S4. Generate behavioral intentions: The AI ​​agent's decision-making core generates behavioral intentions based on its internal belief state and preset desire goals, and uses a pre-trained DRL model (deep reinforcement learning model) to calculate specific behavioral execution instructions.

[0059] S5. Behavior Execution: The AI ​​intelligent agent decision-making core sends behavior execution instructions to Unreal Engine UE5 through a two-way data exchange interface, and the corresponding virtual character in Unreal Engine UE5 executes the behavior execution instructions, thereby realizing large-scale, high-fidelity and realistic urban dynamic simulation.

[0060] The specific steps for constructing the high-fidelity environment and semantic information in step S1 of this embodiment are as follows:

[0061] S101. Construct a visually highly realistic 3D city model using Lumen and Nanite technologies in Unreal Engine 5; the city 3D model includes roads, sidewalks, building functions, traffic facility status, and vegetation;

[0062] S102. Define the semantic information of key elements in the environment: Define the semantic information of the environment through the Unreal Engine UE5's Data Layers or Gameplay Tags system. The semantic information will be provided as structured data to the AI ​​agent's decision-making core. Specifically, mark the road surface as "passable area", the sidewalk as "pedestrian area" and the shop as "commercial interest point" through the Unreal Engine UE5's Data Layers or Gameplay Tags system.

[0063] The bidirectional data interaction in step S2 of this embodiment is as follows:

[0064] S201. Establish a low-latency, high-throughput bidirectional data interaction interface based on gRPC (gRPC Remote Procedure Calls) or WebSocket protocol;

[0065] S202, Unreal Engine UE5 to AI Agent Decision Core: The Unreal Engine UE5 client periodically (e.g., 10 times per second) collects semantic information (such as other agents in the field of view, traffic light status, reachable areas, etc.) around the AI ​​agent decision core through the environment perception module, and sends the serialized semantic information to the AI ​​agent decision core through the two-way data interaction interface.

[0066] S203, AI Agent Decision Core to Unreal Engine UE5: The AI ​​Agent Decision Core transmits the calculated behavioral instructions (such as "move to target point (x,y,z)" and "interact with object A") back to Unreal Engine UE5 through a two-way data interaction interface.

[0067] In this embodiment, the AI ​​agent decision-making core adopts the BDI-DRL hybrid decision-making model, which combines the BDI (belief-desire-intention) model and the DRL (deep reinforcement learning) model.

[0068] The BDI model is used to handle the long-term goals and high-level logical reasoning of the AI ​​agent's decision-making core. The BDI model includes a Beliefs layer, a Desires layer, and an Intentions layer. The Beliefs layer stores environmental information and the agent's own state (such as location and current task) received from UE5. The Desires layer represents the long-term goals of the AI ​​agent's decision-making core (such as going to work, going home, or shopping). The Intentions layer selects the most urgent task to execute based on the current beliefs and desires.

[0069] The DRL model is used to handle low-to-medium level navigation and obstacle avoidance tasks. A DRL model based on the PPO (Proximal Policy Optimization) algorithm is pre-trained, and the reward function R comprehensively considers efficiency, safety, and standardization.

[0070] In this embodiment, the reward function for a pedestrian is designed as follows: R = w1 * Dgoal - w2 * Tstep - w3 * Ccoll - w4 * Psocial; where Dgoal represents the reduction in distance to the target; Tstep represents the time cost; Ccoll represents the collision penalty; Psocial represents the penalty for violating regulations (such as running a red light or walking on the road); and wi represents the weighting coefficient.

[0071] The core decision-making process of the AI ​​agent in this embodiment is as follows:

[0072] ① The BDI model identifies high-level intents (e.g., "go to workstation") and passes the target point to the DRL model;

[0073] ②The DRL model generates specific, real-time movement and obstacle avoidance commands to achieve the corresponding intentions in the optimal way.

[0074] As attached Figure 2 As shown, the internal decision-making process of the AI ​​agent within a single decision cycle begins with receiving environmental data from the UE and updating its "belief" library. Subsequently, the BDI model generates a specific "intention" (short-term goal) based on long-term "desires" and current "beliefs". This intention (e.g., a target point) is passed to the DRL model, which outputs specific, immediate action instructions (such as movement direction and speed). Finally, these instructions are sent back to the UE for execution via the data interface.

[0075] The specific actions performed in step S5 of this embodiment are as follows:

[0076] S501, the Unreal Engine UE5's intelligent agent character receives behavioral instructions from the AI ​​intelligent agent decision core;

[0077] S502 utilizes the Behavior Tree and Animation Blueprint system of Unreal Engine UE5 to parse abstract instructions (such as "move") into specific animations and physical movements; for example, the Behavior Tree executes a "Move To" task, while the Animation Blueprint smoothly blends walking, running, turning and other animations based on the character's speed and direction.

[0078] Example 2:

[0079] This embodiment provides an urban spatial behavior simulation system, which is used to implement the urban spatial behavior simulation method as described in Embodiment 1; the system includes:

[0080] The environment and semantic information construction module is used to build a high-fidelity 3D city virtual environment in Unreal Engine 5 and define the semantic information of the environment;

[0081] The two-way data interaction module is used to transmit the status data of the virtual environment to an external AI intelligent agent decision-making core in real time through a two-way data interaction interface;

[0082] The update module is used to utilize the environmental state data of the virtual environment received by the AI ​​agent decision core through the bidirectional data exchange interface, and to update the belief state inside the AI ​​agent decision core.

[0083] The behavioral intent generation module is used to generate behavioral intents based on the internal belief state and preset desire goals of the AI ​​agent decision-making core, and to calculate specific behavioral execution instructions using a pre-trained DRL model (deep reinforcement learning model).

[0084] The behavior execution module is used to send behavior execution instructions to Unreal Engine UE5 through a two-way data exchange interface via the AI ​​intelligent agent decision core, and the corresponding virtual character in Unreal Engine UE5 executes the behavior execution instructions, thereby realizing large-scale, high-fidelity and realistic urban dynamic simulation.

[0085] The working process of this system is as follows:

[0086] (1) Construct a three-dimensional virtual city environment containing semantic information in Unreal Engine;

[0087] (2) Establish a two-way data interaction interface between the virtual environment and an external AI intelligent agent decision-making core;

[0088] (3) The AI ​​intelligent agent decision-making core receives environmental state data from the virtual environment through a two-way data interaction interface and updates its internal belief state.

[0089] (4) The AI ​​agent decision-making core generates behavioral intentions based on its internal belief state and preset desire goals, and uses a pre-trained deep reinforcement learning model to calculate specific behavioral execution instructions.

[0090] (5) The AI ​​intelligent agent decision core sends the behavior execution instruction to the Unreal Engine through the data interaction interface, and the corresponding virtual character in the Unreal Engine executes the instruction.

[0091] The AI ​​agent decision-making core in this embodiment adopts a hybrid decision-making model that combines a belief-desire-intention (BDI) model for high-level logical planning with a deep reinforcement learning (DRL) model for mid-to-low-level path navigation and obstacle avoidance.

[0092] The bidirectional data interaction interface in this embodiment is implemented based on the gRPC (gRPC Remote Procedure Calls) or WebSocket protocol and is used for low-latency data transmission between the Unreal Engine instance and the AI ​​agent decision core process.

[0093] In this embodiment, the semantic information in the three-dimensional city virtual environment is defined by the Unreal Engine's Data Layers or Gameplay Tags system, including but not limited to roads, sidewalks, building functions, and traffic facility status.

[0094] Example 3:

[0095] This embodiment also provides an electronic device, including: a memory and a processor;

[0096] The memory stores the instructions executed by the computer.

[0097] The processor executes computer execution instructions stored in the memory, causing the processor to perform the urban spatial behavior simulation method in any embodiment of the present invention.

[0098] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.

[0099] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory devices, or other volatile solid-state storage devices.

[0100] Example 4:

[0101] This embodiment also provides a computer-readable storage medium storing multiple instructions, which are loaded by a processor to cause the processor to execute the urban spatial behavior simulation method of any embodiment of the present invention. Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.

[0102] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.

[0103] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.

[0104] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.

[0105] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.

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

Claims

1. A method for simulating urban spatial behavior, characterized in that, The method is as follows: Constructing a high-fidelity environment and semantic information: Constructing a high-fidelity 3D city virtual environment in Unreal Engine 5 and defining the semantic information of the environment; Two-way data interaction: The virtual environment's state data is transmitted in real time to an external AI intelligent agent's decision-making core through a two-way data interaction interface; Update the AI ​​agent decision-making core: The AI ​​agent decision-making core receives environmental state data from the virtual environment through a two-way data exchange interface and updates the belief state within the AI ​​agent decision-making core. Generate behavioral intentions: The AI ​​agent's decision-making core generates behavioral intentions based on its internal belief state and preset desire goals, and uses a pre-trained DRL model to calculate specific behavioral execution instructions; Behavior execution: The AI ​​agent decision-making core sends behavior execution instructions to Unreal Engine UE5 through a two-way data exchange interface, and the corresponding virtual character in Unreal Engine UE5 executes the behavior execution instructions, thereby realizing large-scale, high-fidelity and realistic urban dynamic simulation.

2. The urban spatial behavior simulation method according to claim 1, characterized in that, The construction of the high-fidelity environment and semantic information are detailed as follows: A visually highly realistic 3D city model was constructed using Lumen and Nanite technologies in Unreal Engine 5. The city 3D model includes roads, sidewalks, building functions, traffic facility status, and vegetation. Define the semantic information of key elements in the environment: Define the semantic information of the environment through the Unreal Engine UE5’s Data Layers or Gameplay Tags system. The semantic information will be provided as structured data to the AI ​​agent’s decision-making core. Specifically, mark the road surface as “passable area”, the sidewalk as “pedestrian area”, and the shop as “commercial interest point” through the Unreal Engine UE5’s Data Layers or Gameplay Tags system.

3. The urban spatial behavior simulation method according to claim 1, characterized in that, The two-way data interaction is as follows: Establish a low-latency, high-throughput bidirectional data interaction interface based on the gRPC or WebSocket protocol; From Unreal Engine UE5 to AI Agent Decision Core: The Unreal Engine UE5 client periodically collects semantic information around the AI ​​agent decision core through the environment perception module, and sends the serialized semantic information to the AI ​​agent decision core through a two-way data interaction interface. AI Agent Decision Core to Unreal Engine UE5: The AI ​​Agent Decision Core transmits the calculated behavioral instructions back to Unreal Engine UE5 through a two-way data interaction interface.

4. The urban spatial behavior simulation method according to any one of claims 1 to 3, characterized in that, The AI ​​agent's decision-making core adopts the BDI-DRL hybrid decision-making model, which combines the BDI model and the DRL model. The BDI model is used to process the long-term goals and advanced logical reasoning of the AI ​​agent's decision-making core. The BDI model includes a belief layer, a wish layer, and an intention layer. The belief layer is used to store environmental information and the agent's own state received from UE5. The wish layer represents the long-term goals of the AI ​​agent's decision-making core. The intention layer selects the most urgent task to execute based on the current beliefs and wishes. The DRL model is used to handle low-to-medium level navigation and obstacle avoidance tasks. A DRL model based on the PPO algorithm is pre-trained, and the reward function R comprehensively considers efficiency, safety, and standardization.

5. The urban spatial behavior simulation method, system, equipment, and medium according to claim 4, characterized in that, The reward function for a pedestrian is designed as follows: R = w1 * Dgoal - w2 * Tstep - w3 * Ccoll - w4 * Psocial; where Dgoal represents the reduction in distance to the target; Tstep represents the time cost; Ccoll represents the collision penalty; Psocial represents the penalty for violating the rules; and wi represents the weighting coefficient.

6. The urban spatial behavior simulation method according to claim 5, characterized in that, The core decision-making process of AI agents is as follows: The BDI model determines the high-level intent and passes the target point to the DRL model; The DRL model generates specific, real-time movement and obstacle avoidance commands to achieve the corresponding intentions in the optimal way.

7. The urban spatial behavior simulation method according to claim 1, characterized in that, The specific execution of the action is as follows: The agent character in Unreal Engine 5 receives behavioral instructions from the AI ​​agent decision core; The Unreal Engine UE5's behavior tree and animation blueprint system are used to parse abstract instructions into specific animations and physical movements.

8. A city spatial behavior simulation system, characterized in that, This system is used to implement the urban spatial behavior simulation method as described in any one of claims 1 to 7; the system comprises: The environment and semantic information construction module is used to build a high-fidelity 3D city virtual environment in Unreal Engine 5 and define the semantic information of the environment; The two-way data interaction module is used to transmit the status data of the virtual environment to an external AI intelligent agent decision-making core in real time through a two-way data interaction interface; The update module is used to utilize the environmental state data of the virtual environment received by the AI ​​agent decision core through the bidirectional data exchange interface, and to update the belief state inside the AI ​​agent decision core. The behavioral intent generation module is used to generate behavioral intents based on the internal belief state and preset desire goals of the AI ​​agent decision core, and to calculate specific behavioral execution instructions using a pre-trained DRL model. The behavior execution module is used to send behavior execution instructions to Unreal Engine UE5 through a two-way data exchange interface via the AI ​​intelligent agent decision core, and the corresponding virtual character in Unreal Engine UE5 executes the behavior execution instructions, thereby realizing large-scale, high-fidelity and realistic urban dynamic simulation.

9. An electronic device, characterized in that, include: Memory and at least one processor; The memory contains computer programs; The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the urban spatial behavior simulation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by a processor to implement the urban spatial behavior simulation method as described in any one of claims 1 to 7.